diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2018-02-27 13:22:07 +0100 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2018-03-08 10:34:44 +0900 |
commit | 370ed7a9b9176d68c7b13e6cef32efa6ac5b2d97 (patch) | |
tree | cb032778a60b92a82ef550f46c49d9b42a4e132a /include/linux/extcon.h | |
parent | 14217173217e021c1f354269e61f3c1d5affc42e (diff) | |
download | lwn-370ed7a9b9176d68c7b13e6cef32efa6ac5b2d97.tar.gz lwn-370ed7a9b9176d68c7b13e6cef32efa6ac5b2d97.zip |
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.h | 6 |
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, * Following APIs get the extcon_dev from devicetree or by through extcon name. */ extern struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name); +extern struct extcon_dev *extcon_find_edev_by_node(struct device_node *node); extern struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index); @@ -283,6 +284,11 @@ static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name) return ERR_PTR(-ENODEV); } +static inline struct extcon_dev *extcon_find_edev_by_node(struct device_node *node) +{ + return ERR_PTR(-ENODEV); +} + static inline struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) { |