summaryrefslogtreecommitdiffstats
path: root/include/linux/extcon.h
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2018-02-27 07:22:07 -0500
committerChanwoo Choi <cw00.choi@samsung.com>2018-03-07 20:34:44 -0500
commit370ed7a9b9176d68c7b13e6cef32efa6ac5b2d97 (patch)
treecb032778a60b92a82ef550f46c49d9b42a4e132a /include/linux/extcon.h
parent14217173217e021c1f354269e61f3c1d5affc42e (diff)
extcon: add possibility to get extcon device by OF node
Since extcon property is not allowed in DT, extcon subsystem requires another way to get extcon device. Lets try the simplest approach - get edev by of_node. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'include/linux/extcon.h')
-rw-r--r--include/linux/extcon.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 6d94e82c8ad9..7f033b1ea568 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -230,6 +230,7 @@ extern void devm_extcon_unregister_notifier_all(struct device *dev,
230 * Following APIs get the extcon_dev from devicetree or by through extcon name. 230 * Following APIs get the extcon_dev from devicetree or by through extcon name.
231 */ 231 */
232extern struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name); 232extern struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name);
233extern struct extcon_dev *extcon_find_edev_by_node(struct device_node *node);
233extern struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, 234extern struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
234 int index); 235 int index);
235 236
@@ -283,6 +284,11 @@ static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name)
283 return ERR_PTR(-ENODEV); 284 return ERR_PTR(-ENODEV);
284} 285}
285 286
287static inline struct extcon_dev *extcon_find_edev_by_node(struct device_node *node)
288{
289 return ERR_PTR(-ENODEV);
290}
291
286static inline struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, 292static inline struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
287 int index) 293 int index)
288{ 294{