~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/framer/framer-provider.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/framer/framer-provider.h (Version linux-6.11-rc3) and /include/linux/framer/framer-provider.h (Version linux-6.7.12)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 
  2 /*                                                
  3  * Generic framer profider header file            
  4  *                                                
  5  * Copyright 2023 CS GROUP France                 
  6  *                                                
  7  * Author: Herve Codina <herve.codina@bootlin.    
  8  */                                               
  9                                                   
 10 #ifndef __DRIVERS_PROVIDER_FRAMER_H               
 11 #define __DRIVERS_PROVIDER_FRAMER_H               
 12                                                   
 13 #include <linux/export.h>                         
 14 #include <linux/framer/framer.h>                  
 15 #include <linux/types.h>                          
 16                                                   
 17 #define FRAMER_FLAG_POLL_STATUS  BIT(0)           
 18                                                   
 19 /**                                               
 20  * struct framer_ops - set of function pointer    
 21  * @init: operation to be performed for initia    
 22  * @exit: operation to be performed while exit    
 23  * @power_on: powering on the framer              
 24  * @power_off: powering off the framer            
 25  * @flags: OR-ed flags (FRAMER_FLAG_*) to ask     
 26  *          - @FRAMER_FLAG_POLL_STATUS:           
 27  *            Ask the core to perform a pollin    
 28  *            notify consumers on change.         
 29  *            The framer should call @framer_n    
 30  *            detects a status change. This is    
 31  *            If the framer cannot detect this    
 32  *            a status polling. The core will     
 33  *            and, on change detected, it will    
 34  *            the @get_status()                   
 35  * @owner: the module owner containing the ops    
 36  */                                               
 37 struct framer_ops {                               
 38         int     (*init)(struct framer *framer)    
 39         void    (*exit)(struct framer *framer)    
 40         int     (*power_on)(struct framer *fra    
 41         int     (*power_off)(struct framer *fr    
 42                                                   
 43         /**                                       
 44          * @get_status:                           
 45          *                                        
 46          * Optional.                              
 47          *                                        
 48          * Used to get the framer status. fram    
 49          * been called on the framer.             
 50          *                                        
 51          * Returns: 0 if successful, an negati    
 52          */                                       
 53         int     (*get_status)(struct framer *f    
 54                                                   
 55         /**                                       
 56          * @set_config:                           
 57          *                                        
 58          * Optional.                              
 59          *                                        
 60          * Used to set the framer configuratio    
 61          * been called on the framer.             
 62          *                                        
 63          * Returns: 0 if successful, an negati    
 64          */                                       
 65         int     (*set_config)(struct framer *f    
 66                                                   
 67         /**                                       
 68          * @get_config:                           
 69          *                                        
 70          * Optional.                              
 71          *                                        
 72          * Used to get the framer configuratio    
 73          * been called on the framer.             
 74          *                                        
 75          * Returns: 0 if successful, an negati    
 76          */                                       
 77         int     (*get_config)(struct framer *f    
 78                                                   
 79         u32 flags;                                
 80         struct module *owner;                     
 81 };                                                
 82                                                   
 83 /**                                               
 84  * struct framer_provider - represents the fra    
 85  * @dev: framer provider device                   
 86  * @owner: the module owner having of_xlate       
 87  * @list: to maintain a linked list of framer     
 88  * @of_xlate: function pointer to obtain frame    
 89  */                                               
 90 struct framer_provider {                          
 91         struct device           *dev;             
 92         struct module           *owner;           
 93         struct list_head        list;             
 94         struct framer * (*of_xlate)(struct dev    
 95                                     const stru    
 96 };                                                
 97                                                   
 98 static inline void framer_set_drvdata(struct f    
 99 {                                                 
100         dev_set_drvdata(&framer->dev, data);      
101 }                                                 
102                                                   
103 static inline void *framer_get_drvdata(struct     
104 {                                                 
105         return dev_get_drvdata(&framer->dev);     
106 }                                                 
107                                                   
108 #if IS_ENABLED(CONFIG_GENERIC_FRAMER)             
109                                                   
110 /* Create and destroy a framer */                 
111 struct framer *framer_create(struct device *de    
112                              const struct fram    
113 void framer_destroy(struct framer *framer);       
114                                                   
115 /* devm version */                                
116 struct framer *devm_framer_create(struct devic    
117                                   const struct    
118                                                   
119 struct framer *framer_provider_simple_of_xlate    
120                                                   
121                                                   
122 struct framer_provider *                          
123 __framer_provider_of_register(struct device *d    
124                               struct framer *(    
125                                                   
126                                                   
127 void framer_provider_of_unregister(struct fram    
128                                                   
129 struct framer_provider *                          
130 __devm_framer_provider_of_register(struct devi    
131                                    struct fram    
132                                                   
133                                                   
134 void framer_notify_status_change(struct framer    
135                                                   
136 #else /* IS_ENABLED(CONFIG_GENERIC_FRAMER) */     
137                                                   
138 static inline struct framer *framer_create(str    
139                                            con    
140 {                                                 
141         return ERR_PTR(-ENOSYS);                  
142 }                                                 
143                                                   
144 static inline void framer_destroy(struct frame    
145 {                                                 
146 }                                                 
147                                                   
148 /* devm version */                                
149 static inline struct framer *devm_framer_creat    
150                                                   
151 {                                                 
152         return ERR_PTR(-ENOSYS);                  
153 }                                                 
154                                                   
155 static inline struct framer *framer_provider_s    
156                                                   
157 {                                                 
158         return ERR_PTR(-ENOSYS);                  
159 }                                                 
160                                                   
161 static inline struct framer_provider *            
162 __framer_provider_of_register(struct device *d    
163                               struct framer *(    
164                                                   
165 {                                                 
166         return ERR_PTR(-ENOSYS);                  
167 }                                                 
168                                                   
169 void framer_provider_of_unregister(struct fram    
170 {                                                 
171 }                                                 
172                                                   
173 static inline struct framer_provider *            
174 __devm_framer_provider_of_register(struct devi    
175                                    struct fram    
176                                                   
177 {                                                 
178         return ERR_PTR(-ENOSYS);                  
179 }                                                 
180                                                   
181 void framer_notify_status_change(struct framer    
182 {                                                 
183 }                                                 
184                                                   
185 #endif /* IS_ENABLED(CONFIG_GENERIC_FRAMER) */    
186                                                   
187 #define framer_provider_of_register(dev, xlate    
188         __framer_provider_of_register((dev), T    
189                                                   
190 #define devm_framer_provider_of_register(dev,     
191         __devm_framer_provider_of_register((de    
192                                                   
193 #endif /* __DRIVERS_PROVIDER_FRAMER_H */          
194                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php