aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/extcon.h
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2018-02-27 13:22:07 +0100
committerChanwoo Choi <cw00.choi@samsung.com>2018-03-08 10:34:44 +0900
commit370ed7a9b9176d68c7b13e6cef32efa6ac5b2d97 (patch)
treecb032778a60b92a82ef550f46c49d9b42a4e132a /include/linux/extcon.h
parentdt-bindings: add bindings for Samsung micro-USB 11-pin connector (diff)
downloadwireguard-linux-370ed7a9b9176d68c7b13e6cef32efa6ac5b2d97.tar.xz
wireguard-linux-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.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,
* 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)
{