xref: /linux-6.15/include/linux/extcon.h (revision 52e4e287)
19c92ab61SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2de55d871SMyungJoo Ham /*
36ab6094fSChanwoo Choi  * External Connector (extcon) framework
4176aa360SChanwoo Choi  * - linux/include/linux/extcon.h for extcon consumer device driver.
5de55d871SMyungJoo Ham  *
62a9de9c0SChanwoo Choi  * Copyright (C) 2015 Samsung Electronics
72a9de9c0SChanwoo Choi  * Author: Chanwoo Choi <[email protected]>
82a9de9c0SChanwoo Choi  *
9de55d871SMyungJoo Ham  * Copyright (C) 2012 Samsung Electronics
10de55d871SMyungJoo Ham  * Author: Donggeun Kim <[email protected]>
11de55d871SMyungJoo Ham  * Author: MyungJoo Ham <[email protected]>
12de55d871SMyungJoo Ham  *
13de55d871SMyungJoo Ham  * based on switch class driver
14de55d871SMyungJoo Ham  * Copyright (C) 2008 Google, Inc.
15de55d871SMyungJoo Ham  * Author: Mike Lockwood <[email protected]>
16de55d871SMyungJoo Ham  */
17de55d871SMyungJoo Ham 
18de55d871SMyungJoo Ham #ifndef __LINUX_EXTCON_H__
19de55d871SMyungJoo Ham #define __LINUX_EXTCON_H__
20de55d871SMyungJoo Ham 
21d851718fSChanwoo Choi #include <linux/device.h>
22806d9dd7SMyungJoo Ham 
2373b6ecdbSChanwoo Choi /*
2455e4e2f1SChanwoo Choi  * Define the type of supported external connectors
2555e4e2f1SChanwoo Choi  */
2655e4e2f1SChanwoo Choi #define EXTCON_TYPE_USB		BIT(0)	/* USB connector */
2755e4e2f1SChanwoo Choi #define EXTCON_TYPE_CHG		BIT(1)	/* Charger connector */
2855e4e2f1SChanwoo Choi #define EXTCON_TYPE_JACK	BIT(2)	/* Jack connector */
2955e4e2f1SChanwoo Choi #define EXTCON_TYPE_DISP	BIT(3)	/* Display connector */
3055e4e2f1SChanwoo Choi #define EXTCON_TYPE_MISC	BIT(4)	/* Miscellaneous connector */
3155e4e2f1SChanwoo Choi 
3255e4e2f1SChanwoo Choi /*
3373b6ecdbSChanwoo Choi  * Define the unique id of supported external connectors
3473b6ecdbSChanwoo Choi  */
3573b6ecdbSChanwoo Choi #define EXTCON_NONE		0
36806d9dd7SMyungJoo Ham 
3711eecf91SChanwoo Choi /* USB external connector */
3811eecf91SChanwoo Choi #define EXTCON_USB		1
3973b6ecdbSChanwoo Choi #define EXTCON_USB_HOST		2
402a9de9c0SChanwoo Choi 
41db622861SBaolin Wang /*
42db622861SBaolin Wang  * Charging external connector
43db622861SBaolin Wang  *
44db622861SBaolin Wang  * When one SDP charger connector was reported, we should also report
45db622861SBaolin Wang  * the USB connector, which means EXTCON_CHG_USB_SDP should always
46db622861SBaolin Wang  * appear together with EXTCON_USB. The same as ACA charger connector,
47db622861SBaolin Wang  * EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST.
4862a37443SBaolin Wang  *
4962a37443SBaolin Wang  * The EXTCON_CHG_USB_SLOW connector can provide at least 500mA of
5062a37443SBaolin Wang  * current at 5V. The EXTCON_CHG_USB_FAST connector can provide at
5162a37443SBaolin Wang  * least 1A of current at 5V.
52db622861SBaolin Wang  */
5311eecf91SChanwoo Choi #define EXTCON_CHG_USB_SDP	5	/* Standard Downstream Port */
5411eecf91SChanwoo Choi #define EXTCON_CHG_USB_DCP	6	/* Dedicated Charging Port */
5511eecf91SChanwoo Choi #define EXTCON_CHG_USB_CDP	7	/* Charging Downstream Port */
5611eecf91SChanwoo Choi #define EXTCON_CHG_USB_ACA	8	/* Accessory Charger Adapter */
5711eecf91SChanwoo Choi #define EXTCON_CHG_USB_FAST	9
5811eecf91SChanwoo Choi #define EXTCON_CHG_USB_SLOW	10
597fe95fb8SChanwoo Choi #define EXTCON_CHG_WPT		11	/* Wireless Power Transfer */
603c5f0e07SChanwoo Choi #define EXTCON_CHG_USB_PD	12	/* USB Power Delivery */
612a9de9c0SChanwoo Choi 
6211eecf91SChanwoo Choi /* Jack external connector */
6311eecf91SChanwoo Choi #define EXTCON_JACK_MICROPHONE	20
6411eecf91SChanwoo Choi #define EXTCON_JACK_HEADPHONE	21
6511eecf91SChanwoo Choi #define EXTCON_JACK_LINE_IN	22
6611eecf91SChanwoo Choi #define EXTCON_JACK_LINE_OUT	23
6711eecf91SChanwoo Choi #define EXTCON_JACK_VIDEO_IN	24
6811eecf91SChanwoo Choi #define EXTCON_JACK_VIDEO_OUT	25
6911eecf91SChanwoo Choi #define EXTCON_JACK_SPDIF_IN	26	/* Sony Philips Digital InterFace */
7011eecf91SChanwoo Choi #define EXTCON_JACK_SPDIF_OUT	27
712a9de9c0SChanwoo Choi 
7211eecf91SChanwoo Choi /* Display external connector */
7311eecf91SChanwoo Choi #define EXTCON_DISP_HDMI	40	/* High-Definition Multimedia Interface */
7411eecf91SChanwoo Choi #define EXTCON_DISP_MHL		41	/* Mobile High-Definition Link */
7511eecf91SChanwoo Choi #define EXTCON_DISP_DVI		42	/* Digital Visual Interface */
7611eecf91SChanwoo Choi #define EXTCON_DISP_VGA		43	/* Video Graphics Array */
772164188dSChris Zhong #define EXTCON_DISP_DP		44	/* Display Port */
789c0595d6SChanwoo Choi #define EXTCON_DISP_HMD		45	/* Head-Mounted Display */
79*3a06ed80SMichael Wu #define EXTCON_DISP_CVBS	46	/* Composite Video Broadcast Signal */
80*3a06ed80SMichael Wu #define EXTCON_DISP_EDP		47	/* Embedded Display Port */
8111eecf91SChanwoo Choi 
8211eecf91SChanwoo Choi /* Miscellaneous external connector */
8311eecf91SChanwoo Choi #define EXTCON_DOCK		60
8411eecf91SChanwoo Choi #define EXTCON_JIG		61
8511eecf91SChanwoo Choi #define EXTCON_MECHANICAL	62
8611eecf91SChanwoo Choi 
8711eecf91SChanwoo Choi #define EXTCON_NUM		63
88806d9dd7SMyungJoo Ham 
89792e7e9eSChanwoo Choi /*
906ab6094fSChanwoo Choi  * Define the properties of supported external connectors.
91792e7e9eSChanwoo Choi  *
92792e7e9eSChanwoo Choi  * When adding the new extcon property, they *must* have
93792e7e9eSChanwoo Choi  * the type/value/default information. Also, you *have to*
94792e7e9eSChanwoo Choi  * modify the EXTCON_PROP_[type]_START/END definitions
95792e7e9eSChanwoo Choi  * which mean the range of the supported properties
96792e7e9eSChanwoo Choi  * for each extcon type.
97792e7e9eSChanwoo Choi  *
98792e7e9eSChanwoo Choi  * The naming style of property
99792e7e9eSChanwoo Choi  * : EXTCON_PROP_[type]_[property name]
100792e7e9eSChanwoo Choi  *
101792e7e9eSChanwoo Choi  * EXTCON_PROP_USB_[property name]	: USB property
102792e7e9eSChanwoo Choi  * EXTCON_PROP_CHG_[property name]	: Charger property
103792e7e9eSChanwoo Choi  * EXTCON_PROP_JACK_[property name]	: Jack property
104792e7e9eSChanwoo Choi  * EXTCON_PROP_DISP_[property name]	: Display property
105792e7e9eSChanwoo Choi  */
106792e7e9eSChanwoo Choi 
107792e7e9eSChanwoo Choi /*
108792e7e9eSChanwoo Choi  * Properties of EXTCON_TYPE_USB.
109792e7e9eSChanwoo Choi  *
110792e7e9eSChanwoo Choi  * - EXTCON_PROP_USB_VBUS
111792e7e9eSChanwoo Choi  * @type:	integer (intval)
112792e7e9eSChanwoo Choi  * @value:	0 (low) or 1 (high)
113792e7e9eSChanwoo Choi  * @default:	0 (low)
1142164188dSChris Zhong  * - EXTCON_PROP_USB_TYPEC_POLARITY
1152164188dSChris Zhong  * @type:	integer (intval)
1162164188dSChris Zhong  * @value:	0 (normal) or 1 (flip)
1172164188dSChris Zhong  * @default:	0 (normal)
1188457a1b4SGuenter Roeck  * - EXTCON_PROP_USB_SS (SuperSpeed)
1198457a1b4SGuenter Roeck  * @type:       integer (intval)
1208457a1b4SGuenter Roeck  * @value:      0 (USB/USB2) or 1 (USB3)
1218457a1b4SGuenter Roeck  * @default:    0 (USB/USB2)
1228457a1b4SGuenter Roeck  *
123792e7e9eSChanwoo Choi  */
124792e7e9eSChanwoo Choi #define EXTCON_PROP_USB_VBUS		0
1252164188dSChris Zhong #define EXTCON_PROP_USB_TYPEC_POLARITY	1
1268457a1b4SGuenter Roeck #define EXTCON_PROP_USB_SS		2
127792e7e9eSChanwoo Choi 
128792e7e9eSChanwoo Choi #define EXTCON_PROP_USB_MIN		0
1298457a1b4SGuenter Roeck #define EXTCON_PROP_USB_MAX		2
130792e7e9eSChanwoo Choi #define EXTCON_PROP_USB_CNT	(EXTCON_PROP_USB_MAX - EXTCON_PROP_USB_MIN + 1)
131792e7e9eSChanwoo Choi 
132792e7e9eSChanwoo Choi /* Properties of EXTCON_TYPE_CHG. */
133792e7e9eSChanwoo Choi #define EXTCON_PROP_CHG_MIN		50
134792e7e9eSChanwoo Choi #define EXTCON_PROP_CHG_MAX		50
135792e7e9eSChanwoo Choi #define EXTCON_PROP_CHG_CNT	(EXTCON_PROP_CHG_MAX - EXTCON_PROP_CHG_MIN + 1)
136792e7e9eSChanwoo Choi 
137792e7e9eSChanwoo Choi /* Properties of EXTCON_TYPE_JACK. */
138792e7e9eSChanwoo Choi #define EXTCON_PROP_JACK_MIN		100
139792e7e9eSChanwoo Choi #define EXTCON_PROP_JACK_MAX		100
140792e7e9eSChanwoo Choi #define EXTCON_PROP_JACK_CNT (EXTCON_PROP_JACK_MAX - EXTCON_PROP_JACK_MIN + 1)
141792e7e9eSChanwoo Choi 
142c7914e8dSChris Zhong /*
143c7914e8dSChris Zhong  * Properties of EXTCON_TYPE_DISP.
144c7914e8dSChris Zhong  *
145c7914e8dSChris Zhong  * - EXTCON_PROP_DISP_HPD (Hot Plug Detect)
146c7914e8dSChris Zhong  * @type:       integer (intval)
147c7914e8dSChris Zhong  * @value:      0 (no hpd) or 1 (hpd)
148c7914e8dSChris Zhong  * @default:    0 (no hpd)
149c7914e8dSChris Zhong  *
150c7914e8dSChris Zhong  */
151c7914e8dSChris Zhong #define EXTCON_PROP_DISP_HPD		150
152c7914e8dSChris Zhong 
153792e7e9eSChanwoo Choi /* Properties of EXTCON_TYPE_DISP. */
154792e7e9eSChanwoo Choi #define EXTCON_PROP_DISP_MIN		150
155c7914e8dSChris Zhong #define EXTCON_PROP_DISP_MAX		151
156792e7e9eSChanwoo Choi #define EXTCON_PROP_DISP_CNT (EXTCON_PROP_DISP_MAX - EXTCON_PROP_DISP_MIN + 1)
157792e7e9eSChanwoo Choi 
158792e7e9eSChanwoo Choi /*
159792e7e9eSChanwoo Choi  * Define the type of property's value.
160792e7e9eSChanwoo Choi  *
161792e7e9eSChanwoo Choi  * Define the property's value as union type. Because each property
162792e7e9eSChanwoo Choi  * would need the different data type to store it.
163792e7e9eSChanwoo Choi  */
164792e7e9eSChanwoo Choi union extcon_property_value {
165792e7e9eSChanwoo Choi 	int intval;	/* type : integer (intval) */
166792e7e9eSChanwoo Choi };
167792e7e9eSChanwoo Choi 
168e6cf0465SChanwoo Choi struct extcon_dev;
169806d9dd7SMyungJoo Ham 
170de55d871SMyungJoo Ham #if IS_ENABLED(CONFIG_EXTCON)
17174c5d09bSDonggeun Kim /*
172176aa360SChanwoo Choi  * Following APIs get the connected state of each external connector.
1736ab6094fSChanwoo Choi  * The 'id' argument indicates the defined external connector.
1746ab6094fSChanwoo Choi  */
175b7365587SChanwoo Choi int extcon_get_state(struct extcon_dev *edev, unsigned int id);
1766ab6094fSChanwoo Choi 
1776ab6094fSChanwoo Choi /*
178176aa360SChanwoo Choi  * Following APIs get the property of each external connector.
1796ab6094fSChanwoo Choi  * The 'id' argument indicates the defined external connector
1806ab6094fSChanwoo Choi  * and the 'prop' indicates the extcon property.
1816ab6094fSChanwoo Choi  *
182176aa360SChanwoo Choi  * And extcon_get_property_capability() get the capability of the property
183176aa360SChanwoo Choi  * for each external connector. They are used to get the capability of the
1846ab6094fSChanwoo Choi  * property of each external connector based on the id and property.
185792e7e9eSChanwoo Choi  */
186b7365587SChanwoo Choi int extcon_get_property(struct extcon_dev *edev, unsigned int id,
187792e7e9eSChanwoo Choi 				unsigned int prop,
188792e7e9eSChanwoo Choi 				union extcon_property_value *prop_val);
189b7365587SChanwoo Choi int extcon_get_property_capability(struct extcon_dev *edev,
1907f2a0a16SChanwoo Choi 				unsigned int id, unsigned int prop);
1917f2a0a16SChanwoo Choi 
1927f2a0a16SChanwoo Choi /*
1936ab6094fSChanwoo Choi  * Following APIs register the notifier block in order to detect
1946ab6094fSChanwoo Choi  * the change of both state and property value for each external connector.
1956ab6094fSChanwoo Choi  *
196815429b3SChanwoo Choi  * extcon_register_notifier(*edev, id, *nb) : Register a notifier block
197815429b3SChanwoo Choi  *			for specific external connector of the extcon.
198815429b3SChanwoo Choi  * extcon_register_notifier_all(*edev, *nb) : Register a notifier block
199815429b3SChanwoo Choi  *			for all supported external connectors of the extcon.
20074c5d09bSDonggeun Kim  */
201b7365587SChanwoo Choi int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
20274c5d09bSDonggeun Kim 				struct notifier_block *nb);
203b7365587SChanwoo Choi int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
20474c5d09bSDonggeun Kim 				struct notifier_block *nb);
205b7365587SChanwoo Choi int devm_extcon_register_notifier(struct device *dev,
20658f38656SChanwoo Choi 				struct extcon_dev *edev, unsigned int id,
20758f38656SChanwoo Choi 				struct notifier_block *nb);
208b7365587SChanwoo Choi void devm_extcon_unregister_notifier(struct device *dev,
20958f38656SChanwoo Choi 				struct extcon_dev *edev, unsigned int id,
21058f38656SChanwoo Choi 				struct notifier_block *nb);
2111ad94ffeSChanwoo Choi 
212b7365587SChanwoo Choi int extcon_register_notifier_all(struct extcon_dev *edev,
213815429b3SChanwoo Choi 				struct notifier_block *nb);
214b7365587SChanwoo Choi int extcon_unregister_notifier_all(struct extcon_dev *edev,
215815429b3SChanwoo Choi 				struct notifier_block *nb);
216b7365587SChanwoo Choi int devm_extcon_register_notifier_all(struct device *dev,
217815429b3SChanwoo Choi 				struct extcon_dev *edev,
218815429b3SChanwoo Choi 				struct notifier_block *nb);
219b7365587SChanwoo Choi void devm_extcon_unregister_notifier_all(struct device *dev,
220815429b3SChanwoo Choi 				struct extcon_dev *edev,
221815429b3SChanwoo Choi 				struct notifier_block *nb);
222815429b3SChanwoo Choi 
2231ad94ffeSChanwoo Choi /*
2246ab6094fSChanwoo Choi  * Following APIs get the extcon_dev from devicetree or by through extcon name.
2251ad94ffeSChanwoo Choi  */
226b7365587SChanwoo Choi struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name);
227b7365587SChanwoo Choi struct extcon_dev *extcon_find_edev_by_node(struct device_node *node);
228b7365587SChanwoo Choi struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
229b9ec23c0SChanwoo Choi 						     int index);
230707d7550SChanwoo Choi 
2316ab6094fSChanwoo Choi /* Following API get the name of extcon device. */
232b7365587SChanwoo Choi const char *extcon_get_edev_name(struct extcon_dev *edev);
233707d7550SChanwoo Choi 
234de55d871SMyungJoo Ham #else /* CONFIG_EXTCON */
extcon_get_state(struct extcon_dev * edev,unsigned int id)235575c2b86SChanwoo Choi static inline int extcon_get_state(struct extcon_dev *edev, unsigned int id)
236806d9dd7SMyungJoo Ham {
237806d9dd7SMyungJoo Ham 	return 0;
238806d9dd7SMyungJoo Ham }
239806d9dd7SMyungJoo Ham 
extcon_get_property(struct extcon_dev * edev,unsigned int id,unsigned int prop,union extcon_property_value * prop_val)240792e7e9eSChanwoo Choi static inline int extcon_get_property(struct extcon_dev *edev, unsigned int id,
241792e7e9eSChanwoo Choi 				unsigned int prop,
242792e7e9eSChanwoo Choi 				union extcon_property_value *prop_val)
243792e7e9eSChanwoo Choi {
244792e7e9eSChanwoo Choi 	return 0;
245792e7e9eSChanwoo Choi }
246cb9850d0SKishon Vijay Abraham I 
extcon_get_property_capability(struct extcon_dev * edev,unsigned int id,unsigned int prop)2477f2a0a16SChanwoo Choi static inline int extcon_get_property_capability(struct extcon_dev *edev,
2487f2a0a16SChanwoo Choi 				unsigned int id, unsigned int prop)
2497f2a0a16SChanwoo Choi {
2507f2a0a16SChanwoo Choi 	return 0;
2517f2a0a16SChanwoo Choi }
2527f2a0a16SChanwoo Choi 
extcon_register_notifier(struct extcon_dev * edev,unsigned int id,struct notifier_block * nb)25374c5d09bSDonggeun Kim static inline int extcon_register_notifier(struct extcon_dev *edev,
254ab8a8fbeSChanwoo Choi 				unsigned int id, struct notifier_block *nb)
25574c5d09bSDonggeun Kim {
25674c5d09bSDonggeun Kim 	return 0;
25774c5d09bSDonggeun Kim }
25874c5d09bSDonggeun Kim 
extcon_unregister_notifier(struct extcon_dev * edev,unsigned int id,struct notifier_block * nb)25974c5d09bSDonggeun Kim static inline int extcon_unregister_notifier(struct extcon_dev *edev,
260ab8a8fbeSChanwoo Choi 				unsigned int id, struct notifier_block *nb)
26174c5d09bSDonggeun Kim {
26274c5d09bSDonggeun Kim 	return 0;
26374c5d09bSDonggeun Kim }
26474c5d09bSDonggeun Kim 
devm_extcon_register_notifier(struct device * dev,struct extcon_dev * edev,unsigned int id,struct notifier_block * nb)26558f38656SChanwoo Choi static inline int devm_extcon_register_notifier(struct device *dev,
26658f38656SChanwoo Choi 				struct extcon_dev *edev, unsigned int id,
26758f38656SChanwoo Choi 				struct notifier_block *nb)
26858f38656SChanwoo Choi {
26958f38656SChanwoo Choi 	return -ENOSYS;
27058f38656SChanwoo Choi }
27158f38656SChanwoo Choi 
devm_extcon_unregister_notifier(struct device * dev,struct extcon_dev * edev,unsigned int id,struct notifier_block * nb)27258f38656SChanwoo Choi static inline  void devm_extcon_unregister_notifier(struct device *dev,
27358f38656SChanwoo Choi 				struct extcon_dev *edev, unsigned int id,
27458f38656SChanwoo Choi 				struct notifier_block *nb) { }
27558f38656SChanwoo Choi 
extcon_register_notifier_all(struct extcon_dev * edev,struct notifier_block * nb)276c9570d4aSKrzysztof Kozlowski static inline int extcon_register_notifier_all(struct extcon_dev *edev,
277c9570d4aSKrzysztof Kozlowski 					       struct notifier_block *nb)
278c9570d4aSKrzysztof Kozlowski {
279c9570d4aSKrzysztof Kozlowski 	return 0;
280c9570d4aSKrzysztof Kozlowski }
281c9570d4aSKrzysztof Kozlowski 
extcon_unregister_notifier_all(struct extcon_dev * edev,struct notifier_block * nb)282c9570d4aSKrzysztof Kozlowski static inline int extcon_unregister_notifier_all(struct extcon_dev *edev,
283c9570d4aSKrzysztof Kozlowski 						 struct notifier_block *nb)
284c9570d4aSKrzysztof Kozlowski {
285c9570d4aSKrzysztof Kozlowski 	return 0;
286c9570d4aSKrzysztof Kozlowski }
287c9570d4aSKrzysztof Kozlowski 
devm_extcon_register_notifier_all(struct device * dev,struct extcon_dev * edev,struct notifier_block * nb)288c9570d4aSKrzysztof Kozlowski static inline int devm_extcon_register_notifier_all(struct device *dev,
289c9570d4aSKrzysztof Kozlowski 						    struct extcon_dev *edev,
290c9570d4aSKrzysztof Kozlowski 						    struct notifier_block *nb)
291c9570d4aSKrzysztof Kozlowski {
292c9570d4aSKrzysztof Kozlowski 	return 0;
293c9570d4aSKrzysztof Kozlowski }
294c9570d4aSKrzysztof Kozlowski 
devm_extcon_unregister_notifier_all(struct device * dev,struct extcon_dev * edev,struct notifier_block * nb)295c9570d4aSKrzysztof Kozlowski static inline void devm_extcon_unregister_notifier_all(struct device *dev,
296c9570d4aSKrzysztof Kozlowski 						       struct extcon_dev *edev,
297c9570d4aSKrzysztof Kozlowski 						       struct notifier_block *nb) { }
298c9570d4aSKrzysztof Kozlowski 
extcon_get_extcon_dev(const char * extcon_name)2996ab6094fSChanwoo Choi static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name)
3006ab6094fSChanwoo Choi {
30158e4a2d2SDan Carpenter 	return NULL;
3026ab6094fSChanwoo Choi }
3036ab6094fSChanwoo Choi 
extcon_find_edev_by_node(struct device_node * node)304370ed7a9SAndrzej Hajda static inline struct extcon_dev *extcon_find_edev_by_node(struct device_node *node)
305370ed7a9SAndrzej Hajda {
306370ed7a9SAndrzej Hajda 	return ERR_PTR(-ENODEV);
307370ed7a9SAndrzej Hajda }
308370ed7a9SAndrzej Hajda 
extcon_get_edev_by_phandle(struct device * dev,int index)3091ad94ffeSChanwoo Choi static inline struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
3101ad94ffeSChanwoo Choi 				int index)
3111ad94ffeSChanwoo Choi {
3121ad94ffeSChanwoo Choi 	return ERR_PTR(-ENODEV);
3131ad94ffeSChanwoo Choi }
314995bb109SMayank Rana 
extcon_get_edev_name(struct extcon_dev * edev)315995bb109SMayank Rana static inline const char *extcon_get_edev_name(struct extcon_dev *edev)
316995bb109SMayank Rana {
317995bb109SMayank Rana 	return NULL;
318995bb109SMayank Rana }
319de55d871SMyungJoo Ham #endif /* CONFIG_EXTCON */
320830ae442SChanwoo Choi 
321830ae442SChanwoo Choi /*
322830ae442SChanwoo Choi  * Following structure and API are deprecated. EXTCON remains the function
323830ae442SChanwoo Choi  * definition to prevent the build break.
324830ae442SChanwoo Choi  */
325830ae442SChanwoo Choi struct extcon_specific_cable_nb {
326830ae442SChanwoo Choi        struct notifier_block *user_nb;
327830ae442SChanwoo Choi        int cable_index;
328830ae442SChanwoo Choi        struct extcon_dev *edev;
329830ae442SChanwoo Choi        unsigned long previous_value;
330830ae442SChanwoo Choi };
331de55d871SMyungJoo Ham #endif /* __LINUX_EXTCON_H__ */
332