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

TOMOYO Linux Cross Reference
Linux/include/media/cec-notifier.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/media/cec-notifier.h (Version linux-6.12-rc7) and /include/media/cec-notifier.h (Version unix-v6-master)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 
  2 /*                                                
  3  * cec-notifier.h - notify CEC drivers of phys    
  4  *                                                
  5  * Copyright 2016 Russell King.                   
  6  * Copyright 2016-2017 Cisco Systems, Inc. and    
  7  */                                               
  8                                                   
  9 #ifndef LINUX_CEC_NOTIFIER_H                      
 10 #define LINUX_CEC_NOTIFIER_H                      
 11                                                   
 12 #include <linux/err.h>                            
 13 #include <media/cec.h>                            
 14                                                   
 15 struct device;                                    
 16 struct edid;                                      
 17 struct cec_adapter;                               
 18 struct cec_notifier;                              
 19                                                   
 20 #if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLE    
 21                                                   
 22 /**                                               
 23  * cec_notifier_conn_register - find or create    
 24  * HDMI device and connector tuple.               
 25  * @hdmi_dev: HDMI device that sends the event    
 26  * @port_name: the connector name from which t    
 27  * if there is always only one HDMI connector     
 28  * @conn_info: the connector info from which t    
 29  *                                                
 30  * If a notifier for device @dev and connector    
 31  * increase the refcount and return that notif    
 32  *                                                
 33  * If it doesn't exist, then allocate a new no    
 34  * pointer to that new struct.                    
 35  *                                                
 36  * Return NULL if the memory could not be allo    
 37  */                                               
 38 struct cec_notifier *                             
 39 cec_notifier_conn_register(struct device *hdmi    
 40                            const struct cec_co    
 41                                                   
 42 /**                                               
 43  * cec_notifier_conn_unregister - decrease ref    
 44  * refcount reaches 0.                            
 45  * @n: notifier. If NULL, then this function d    
 46  */                                               
 47 void cec_notifier_conn_unregister(struct cec_n    
 48                                                   
 49 /**                                               
 50  * cec_notifier_cec_adap_register - find or cr    
 51  * given device.                                  
 52  * @hdmi_dev: HDMI device that sends the event    
 53  * @port_name: the connector name from which t    
 54  * if there is always only one HDMI connector     
 55  * @adap: the cec adapter that registered this    
 56  *                                                
 57  * If a notifier for device @dev and connector    
 58  * increase the refcount and return that notif    
 59  *                                                
 60  * If it doesn't exist, then allocate a new no    
 61  * pointer to that new struct.                    
 62  *                                                
 63  * Return NULL if the memory could not be allo    
 64  */                                               
 65 struct cec_notifier *                             
 66 cec_notifier_cec_adap_register(struct device *    
 67                                struct cec_adap    
 68                                                   
 69 /**                                               
 70  * cec_notifier_cec_adap_unregister - decrease    
 71  * refcount reaches 0.                            
 72  * @n: notifier. If NULL, then this function d    
 73  * @adap: the cec adapter that registered this    
 74  */                                               
 75 void cec_notifier_cec_adap_unregister(struct c    
 76                                       struct c    
 77                                                   
 78 /**                                               
 79  * cec_notifier_set_phys_addr - set a new phys    
 80  * @n: the CEC notifier                           
 81  * @pa: the CEC physical address                  
 82  *                                                
 83  * Set a new CEC physical address.                
 84  * Does nothing if @n == NULL.                    
 85  */                                               
 86 void cec_notifier_set_phys_addr(struct cec_not    
 87                                                   
 88 /**                                               
 89  * cec_notifier_set_phys_addr_from_edid - set     
 90  * @n: the CEC notifier                           
 91  * @edid: the struct edid pointer                 
 92  *                                                
 93  * Parses the EDID to obtain the new CEC physi    
 94  * Does nothing if @n == NULL.                    
 95  */                                               
 96 void cec_notifier_set_phys_addr_from_edid(stru    
 97                                           cons    
 98                                                   
 99 /**                                               
100  * cec_notifier_parse_hdmi_phandle - find the     
101  * @dev: the device with the "hdmi-phandle" de    
102  *                                                
103  * Returns the device pointer referenced by th    
104  * Note that the refcount of the returned devi    
105  * This device pointer is only used as a key v    
106  * list, but it is never accessed by the CEC d    
107  */                                               
108 struct device *cec_notifier_parse_hdmi_phandle    
109                                                   
110 #else                                             
111                                                   
112 static inline struct cec_notifier *               
113 cec_notifier_conn_register(struct device *hdmi    
114                            const struct cec_co    
115 {                                                 
116         /* A non-NULL pointer is expected on s    
117         return (struct cec_notifier *)0xdeadfe    
118 }                                                 
119                                                   
120 static inline void cec_notifier_conn_unregiste    
121 {                                                 
122 }                                                 
123                                                   
124 static inline struct cec_notifier *               
125 cec_notifier_cec_adap_register(struct device *    
126                                struct cec_adap    
127 {                                                 
128         /* A non-NULL pointer is expected on s    
129         return (struct cec_notifier *)0xdeadfe    
130 }                                                 
131                                                   
132 static inline void cec_notifier_cec_adap_unreg    
133                                                   
134 {                                                 
135 }                                                 
136                                                   
137 static inline void cec_notifier_set_phys_addr(    
138 {                                                 
139 }                                                 
140                                                   
141 static inline void cec_notifier_set_phys_addr_    
142                                                   
143 {                                                 
144 }                                                 
145                                                   
146 static inline struct device *cec_notifier_pars    
147 {                                                 
148         return ERR_PTR(-ENODEV);                  
149 }                                                 
150                                                   
151 #endif                                            
152                                                   
153 /**                                               
154  * cec_notifier_phys_addr_invalidate() - set t    
155  *                                                
156  * @n: the CEC notifier                           
157  *                                                
158  * This is a simple helper function to invalid    
159  * address. Does nothing if @n == NULL.           
160  */                                               
161 static inline void cec_notifier_phys_addr_inva    
162 {                                                 
163         cec_notifier_set_phys_addr(n, CEC_PHYS    
164 }                                                 
165                                                   
166 #endif                                            
167                                                   

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