Lines Matching +full:int +full:- +full:property
1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * - linux/include/linux/extcon.h for extcon consumer device driver.
74 #define EXTCON_DISP_HDMI 40 /* High-Definition Multimedia Interface */
75 #define EXTCON_DISP_MHL 41 /* Mobile High-Definition Link */
79 #define EXTCON_DISP_HMD 45 /* Head-Mounted Display */
93 * When adding the new extcon property, they *must* have
99 * The naming style of property
100 * : EXTCON_PROP_[type]_[property name]
102 * EXTCON_PROP_USB_[property name] : USB property
103 * EXTCON_PROP_CHG_[property name] : Charger property
104 * EXTCON_PROP_JACK_[property name] : Jack property
105 * EXTCON_PROP_DISP_[property name] : Display property
111 * - EXTCON_PROP_USB_VBUS
115 * - EXTCON_PROP_USB_TYPEC_POLARITY
119 * - EXTCON_PROP_USB_SS (SuperSpeed)
131 #define EXTCON_PROP_USB_CNT (EXTCON_PROP_USB_MAX - EXTCON_PROP_USB_MIN + 1)
136 #define EXTCON_PROP_CHG_CNT (EXTCON_PROP_CHG_MAX - EXTCON_PROP_CHG_MIN + 1)
141 #define EXTCON_PROP_JACK_CNT (EXTCON_PROP_JACK_MAX - EXTCON_PROP_JACK_MIN + 1)
146 * - EXTCON_PROP_DISP_HPD (Hot Plug Detect)
157 #define EXTCON_PROP_DISP_CNT (EXTCON_PROP_DISP_MAX - EXTCON_PROP_DISP_MIN + 1)
160 * Define the type of property's value.
162 * Define the property's value as union type. Because each property
166 int intval; /* type : integer (intval) */
176 int extcon_get_state(struct extcon_dev *edev, unsigned int id);
179 * Following APIs get the property of each external connector.
181 * and the 'prop' indicates the extcon property.
183 * And extcon_get_property_capability() get the capability of the property
185 * property of each external connector based on the id and property.
187 int extcon_get_property(struct extcon_dev *edev, unsigned int id,
188 unsigned int prop,
190 int extcon_get_property_capability(struct extcon_dev *edev,
191 unsigned int id, unsigned int prop);
195 * the change of both state and property value for each external connector.
202 int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
204 int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
206 int devm_extcon_register_notifier(struct device *dev,
207 struct extcon_dev *edev, unsigned int id,
210 struct extcon_dev *edev, unsigned int id,
213 int extcon_register_notifier_all(struct extcon_dev *edev,
215 int extcon_unregister_notifier_all(struct extcon_dev *edev,
217 int devm_extcon_register_notifier_all(struct device *dev,
230 int index);
236 static inline int extcon_get_state(struct extcon_dev *edev, unsigned int id) in extcon_get_state()
241 static inline int extcon_get_property(struct extcon_dev *edev, unsigned int id, in extcon_get_property()
242 unsigned int prop, in extcon_get_property()
248 static inline int extcon_get_property_capability(struct extcon_dev *edev, in extcon_get_property_capability()
249 unsigned int id, unsigned int prop) in extcon_get_property_capability()
254 static inline int extcon_register_notifier(struct extcon_dev *edev, in extcon_register_notifier()
255 unsigned int id, struct notifier_block *nb) in extcon_register_notifier()
260 static inline int extcon_unregister_notifier(struct extcon_dev *edev, in extcon_unregister_notifier()
261 unsigned int id, struct notifier_block *nb) in extcon_unregister_notifier()
266 static inline int devm_extcon_register_notifier(struct device *dev, in devm_extcon_register_notifier()
267 struct extcon_dev *edev, unsigned int id, in devm_extcon_register_notifier()
270 return -ENOSYS; in devm_extcon_register_notifier()
274 struct extcon_dev *edev, unsigned int id, in devm_extcon_unregister_notifier()
277 static inline int extcon_register_notifier_all(struct extcon_dev *edev, in extcon_register_notifier_all()
283 static inline int extcon_unregister_notifier_all(struct extcon_dev *edev, in extcon_unregister_notifier_all()
289 static inline int devm_extcon_register_notifier_all(struct device *dev, in devm_extcon_register_notifier_all()
302 return ERR_PTR(-ENODEV); in extcon_get_extcon_dev()
307 return ERR_PTR(-ENODEV); in extcon_find_edev_by_node()
311 int index) in extcon_get_edev_by_phandle()
313 return ERR_PTR(-ENODEV); in extcon_get_edev_by_phandle()
328 int cable_index;
333 static inline int extcon_register_interest(struct extcon_specific_cable_nb *obj, in extcon_register_interest()
337 return -EINVAL; in extcon_register_interest()
340 static inline int extcon_unregister_interest(struct extcon_specific_cable_nb *obj) in extcon_unregister_interest()
342 return -EINVAL; in extcon_unregister_interest()