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.
73 #define EXTCON_DISP_HDMI 40 /* High-Definition Multimedia Interface */
74 #define EXTCON_DISP_MHL 41 /* Mobile High-Definition Link */
78 #define EXTCON_DISP_HMD 45 /* Head-Mounted Display */
90 * When adding the new extcon property, they *must* have
96 * The naming style of property
97 * : EXTCON_PROP_[type]_[property name]
99 * EXTCON_PROP_USB_[property name] : USB property
100 * EXTCON_PROP_CHG_[property name] : Charger property
101 * EXTCON_PROP_JACK_[property name] : Jack property
102 * EXTCON_PROP_DISP_[property name] : Display property
108 * - EXTCON_PROP_USB_VBUS
112 * - EXTCON_PROP_USB_TYPEC_POLARITY
116 * - EXTCON_PROP_USB_SS (SuperSpeed)
128 #define EXTCON_PROP_USB_CNT (EXTCON_PROP_USB_MAX - EXTCON_PROP_USB_MIN + 1)
133 #define EXTCON_PROP_CHG_CNT (EXTCON_PROP_CHG_MAX - EXTCON_PROP_CHG_MIN + 1)
138 #define EXTCON_PROP_JACK_CNT (EXTCON_PROP_JACK_MAX - EXTCON_PROP_JACK_MIN + 1)
143 * - EXTCON_PROP_DISP_HPD (Hot Plug Detect)
154 #define EXTCON_PROP_DISP_CNT (EXTCON_PROP_DISP_MAX - EXTCON_PROP_DISP_MIN + 1)
157 * Define the type of property's value.
159 * Define the property's value as union type. Because each property
163 int intval; /* type : integer (intval) */
173 int extcon_get_state(struct extcon_dev *edev, unsigned int id);
176 * Following APIs get the property of each external connector.
178 * and the 'prop' indicates the extcon property.
180 * And extcon_get_property_capability() get the capability of the property
182 * property of each external connector based on the id and property.
184 int extcon_get_property(struct extcon_dev *edev, unsigned int id,
185 unsigned int prop,
187 int extcon_get_property_capability(struct extcon_dev *edev,
188 unsigned int id, unsigned int prop);
192 * the change of both state and property value for each external connector.
199 int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
201 int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
203 int devm_extcon_register_notifier(struct device *dev,
204 struct extcon_dev *edev, unsigned int id,
207 struct extcon_dev *edev, unsigned int id,
210 int extcon_register_notifier_all(struct extcon_dev *edev,
212 int extcon_unregister_notifier_all(struct extcon_dev *edev,
214 int devm_extcon_register_notifier_all(struct device *dev,
227 int index);
233 static inline int extcon_get_state(struct extcon_dev *edev, unsigned int id) in extcon_get_state()
238 static inline int extcon_get_property(struct extcon_dev *edev, unsigned int id, in extcon_get_property()
239 unsigned int prop, in extcon_get_property()
245 static inline int extcon_get_property_capability(struct extcon_dev *edev, in extcon_get_property_capability()
246 unsigned int id, unsigned int prop) in extcon_get_property_capability()
251 static inline int extcon_register_notifier(struct extcon_dev *edev, in extcon_register_notifier()
252 unsigned int id, struct notifier_block *nb) in extcon_register_notifier()
257 static inline int extcon_unregister_notifier(struct extcon_dev *edev, in extcon_unregister_notifier()
258 unsigned int id, struct notifier_block *nb) in extcon_unregister_notifier()
263 static inline int devm_extcon_register_notifier(struct device *dev, in devm_extcon_register_notifier()
264 struct extcon_dev *edev, unsigned int id, in devm_extcon_register_notifier()
267 return -ENOSYS; in devm_extcon_register_notifier()
271 struct extcon_dev *edev, unsigned int id, in devm_extcon_unregister_notifier()
276 return ERR_PTR(-ENODEV); in extcon_get_extcon_dev()
281 return ERR_PTR(-ENODEV); in extcon_find_edev_by_node()
285 int index) in extcon_get_edev_by_phandle()
287 return ERR_PTR(-ENODEV); in extcon_get_edev_by_phandle()
302 int cable_index;
307 static inline int extcon_register_interest(struct extcon_specific_cable_nb *obj, in extcon_register_interest()
311 return -EINVAL; in extcon_register_interest()
314 static inline int extcon_unregister_interest(struct extcon_specific_cable_nb *obj) in extcon_unregister_interest()
316 return -EINVAL; in extcon_unregister_interest()