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

TOMOYO Linux Cross Reference
Linux/include/linux/hte.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/hte.h (Version linux-6.12-rc7) and /include/linux/hte.h (Version linux-2.4.37.11)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2                                                   
  3 #ifndef __LINUX_HTE_H                             
  4 #define __LINUX_HTE_H                             
  5                                                   
  6 #include <linux/errno.h>                          
  7                                                   
  8 struct hte_chip;                                  
  9 struct hte_device;                                
 10 struct of_phandle_args;                           
 11                                                   
 12 /**                                               
 13  * enum hte_edge - HTE line edge flags.           
 14  *                                                
 15  * @HTE_EDGE_NO_SETUP: No edge setup. In this     
 16  * for example during request irq call.           
 17  * @HTE_RISING_EDGE_TS: Rising edge.              
 18  * @HTE_FALLING_EDGE_TS: Falling edge.            
 19  *                                                
 20  */                                               
 21 enum hte_edge {                                   
 22         HTE_EDGE_NO_SETUP = 1U << 0,              
 23         HTE_RISING_EDGE_TS = 1U << 1,             
 24         HTE_FALLING_EDGE_TS = 1U << 2,            
 25 };                                                
 26                                                   
 27 /**                                               
 28  * enum hte_return - HTE subsystem return valu    
 29  *                                                
 30  * @HTE_CB_HANDLED: The consumer handled the d    
 31  * @HTE_RUN_SECOND_CB: The consumer needs furt    
 32  * HTE subsystem calls secondary callback prov    
 33  * is allowed to sleep.                           
 34  */                                               
 35 enum hte_return {                                 
 36         HTE_CB_HANDLED,                           
 37         HTE_RUN_SECOND_CB,                        
 38 };                                                
 39                                                   
 40 /**                                               
 41  * struct hte_ts_data - HTE timestamp data.       
 42  *                                                
 43  * @tsc: Timestamp value.                         
 44  * @seq: Sequence counter of the timestamps.      
 45  * @raw_level: Level of the line at the timest    
 46  * -1 otherwise.                                  
 47  */                                               
 48 struct hte_ts_data {                              
 49         u64 tsc;                                  
 50         u64 seq;                                  
 51         int raw_level;                            
 52 };                                                
 53                                                   
 54 /**                                               
 55  * struct hte_clk_info - Clock source info tha    
 56  *                                                
 57  * @hz: Supported clock rate in HZ, for exampl    
 58  * @type: Supported clock type.                   
 59  */                                               
 60 struct hte_clk_info {                             
 61         u64 hz;                                   
 62         clockid_t type;                           
 63 };                                                
 64                                                   
 65 /**                                               
 66  * typedef hte_ts_cb_t - HTE timestamp data pr    
 67  *                                                
 68  * The callback is used to push timestamp data    
 69  * not allowed to sleep.                          
 70  *                                                
 71  * @ts: HW timestamp data.                        
 72  * @data: Client supplied data.                   
 73  */                                               
 74 typedef enum hte_return (*hte_ts_cb_t)(struct     
 75                                                   
 76 /**                                               
 77  * typedef hte_ts_sec_cb_t - HTE timestamp dat    
 78  *                                                
 79  * This is used when the client needs further     
 80  * allowed to sleep.                              
 81  *                                                
 82  * @data: Client supplied data.                   
 83  *                                                
 84  */                                               
 85 typedef enum hte_return (*hte_ts_sec_cb_t)(voi    
 86                                                   
 87 /**                                               
 88  * struct hte_line_attr - Line attributes.        
 89  *                                                
 90  * @line_id: The logical ID understood by the     
 91  * @line_data: Line data related to line_id.      
 92  * @edge_flags: Edge setup flags.                 
 93  * @name: Descriptive name of the entity that     
 94  * hardware timestamping. If null, HTE core wi    
 95  *                                                
 96  */                                               
 97 struct hte_line_attr {                            
 98         u32 line_id;                              
 99         void *line_data;                          
100         unsigned long edge_flags;                 
101         const char *name;                         
102 };                                                
103                                                   
104 /**                                               
105  * struct hte_ts_desc - HTE timestamp descript    
106  *                                                
107  * This structure is a communication token bet    
108  * and subsystem to providers.                    
109  *                                                
110  * @attr: The line attributes.                    
111  * @hte_data: Subsystem's private data, set by    
112  */                                               
113 struct hte_ts_desc {                              
114         struct hte_line_attr attr;                
115         void *hte_data;                           
116 };                                                
117                                                   
118 /**                                               
119  * struct hte_ops - HTE operations set by prov    
120  *                                                
121  * @request: Hook for requesting a HTE timesta    
122  * non-zero for failures.                         
123  * @release: Hook for releasing a HTE timestam    
124  * non-zero for failures.                         
125  * @enable: Hook to enable the specified times    
126  * non-zero for failures.                         
127  * @disable: Hook to disable specified timesta    
128  * non-zero for failures.                         
129  * @get_clk_src_info: Hook to get the clock in    
130  * to timestamp. Returns 0 for success and neg    
131  * success HTE subsystem fills up provided str    
132  *                                                
133  * xlated_id parameter is used to communicate     
134  * providers and is translated by the provider    
135  */                                               
136 struct hte_ops {                                  
137         int (*request)(struct hte_chip *chip,     
138                        u32 xlated_id);            
139         int (*release)(struct hte_chip *chip,     
140                        u32 xlated_id);            
141         int (*enable)(struct hte_chip *chip, u    
142         int (*disable)(struct hte_chip *chip,     
143         int (*get_clk_src_info)(struct hte_chi    
144                                 struct hte_clk    
145 };                                                
146                                                   
147 /**                                               
148  * struct hte_chip - Abstract HTE chip.           
149  *                                                
150  * @name: functional name of the HTE IP block.    
151  * @dev: device providing the HTE.                
152  * @ops: callbacks for this HTE.                  
153  * @nlines: number of lines/signals supported     
154  * @xlate_of: Callback which translates consum    
155  * physical ids, return 0 for the success and     
156  * It stores (between 0 to @nlines) in xlated_    
157  * @xlate_plat: Same as above but for the cons    
158  * @match_from_linedata: Match HTE device usin    
159  * @of_hte_n_cells: Number of cells used to fo    
160  * @gdev: HTE subsystem abstract device, inter    
161  * @data: chip specific private data.             
162  */                                               
163 struct hte_chip {                                 
164         const char *name;                         
165         struct device *dev;                       
166         const struct hte_ops *ops;                
167         u32 nlines;                               
168         int (*xlate_of)(struct hte_chip *gc,      
169                         const struct of_phandl    
170                         struct hte_ts_desc *de    
171         int (*xlate_plat)(struct hte_chip *gc,    
172                          u32 *xlated_id);         
173         bool (*match_from_linedata)(const stru    
174                                     const stru    
175         u8 of_hte_n_cells;                        
176                                                   
177         struct hte_device *gdev;                  
178         void *data;                               
179 };                                                
180                                                   
181 #if IS_ENABLED(CONFIG_HTE)                        
182 /* HTE APIs for the providers */                  
183 int devm_hte_register_chip(struct hte_chip *ch    
184 int hte_push_ts_ns(const struct hte_chip *chip    
185                    struct hte_ts_data *data);     
186                                                   
187 /* HTE APIs for the consumers */                  
188 int hte_init_line_attr(struct hte_ts_desc *des    
189                        unsigned long edge_flag    
190                        void *data);               
191 int hte_ts_get(struct device *dev, struct hte_    
192 int hte_ts_put(struct hte_ts_desc *desc);         
193 int hte_request_ts_ns(struct hte_ts_desc *desc    
194                       hte_ts_sec_cb_t tcb, voi    
195 int devm_hte_request_ts_ns(struct device *dev,    
196                            hte_ts_cb_t cb, hte    
197 int of_hte_req_count(struct device *dev);         
198 int hte_enable_ts(struct hte_ts_desc *desc);      
199 int hte_disable_ts(struct hte_ts_desc *desc);     
200 int hte_get_clk_src_info(const struct hte_ts_d    
201                          struct hte_clk_info *    
202                                                   
203 #else /* !CONFIG_HTE */                           
204 static inline int devm_hte_register_chip(struc    
205 {                                                 
206         return -EOPNOTSUPP;                       
207 }                                                 
208                                                   
209 static inline int hte_push_ts_ns(const struct     
210                                  u32 xlated_id    
211                                  const struct     
212 {                                                 
213         return -EOPNOTSUPP;                       
214 }                                                 
215                                                   
216 static inline int hte_init_line_attr(struct ht    
217                                      unsigned     
218                                      const cha    
219 {                                                 
220         return -EOPNOTSUPP;                       
221 }                                                 
222                                                   
223 static inline int hte_ts_get(struct device *de    
224                              int index)           
225 {                                                 
226         return -EOPNOTSUPP;                       
227 }                                                 
228                                                   
229 static inline int hte_ts_put(struct hte_ts_des    
230 {                                                 
231         return -EOPNOTSUPP;                       
232 }                                                 
233                                                   
234 static inline int hte_request_ts_ns(struct hte    
235                                     hte_ts_sec    
236 {                                                 
237         return -EOPNOTSUPP;                       
238 }                                                 
239                                                   
240 static inline int devm_hte_request_ts_ns(struc    
241                                          struc    
242                                          hte_t    
243                                          hte_t    
244                                          void     
245 {                                                 
246         return -EOPNOTSUPP;                       
247 }                                                 
248                                                   
249 static inline int of_hte_req_count(struct devi    
250 {                                                 
251         return -EOPNOTSUPP;                       
252 }                                                 
253                                                   
254 static inline int hte_enable_ts(struct hte_ts_    
255 {                                                 
256         return -EOPNOTSUPP;                       
257 }                                                 
258                                                   
259 static inline int hte_disable_ts(struct hte_ts    
260 {                                                 
261         return -EOPNOTSUPP;                       
262 }                                                 
263                                                   
264 static inline int hte_get_clk_src_info(const s    
265                                        struct     
266 {                                                 
267         return -EOPNOTSUPP;                       
268 }                                                 
269 #endif /* !CONFIG_HTE */                          
270                                                   
271 #endif                                            
272                                                   

~ [ 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