aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/extcon.h
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2014-03-18 06:55:46 -0400
committerChanwoo Choi <cw00.choi@samsung.com>2014-03-19 01:41:58 -0400
commit1ad94ffef22c0a6e2ee6ba90a800c32fd29ffa1f (patch)
tree1cacdc1749c8ca3d47e3ef8fc19fa5228db4354e /include/linux/extcon.h
parentca48824117b3ceaa4e35a7c5d651b95c288308e6 (diff)
extcon: Move OF helper function to extcon core and change function name
This patch move simply OF helper function to extcon core and change function name as following: - of_extcon_get_extcon_dev() -> extcon_get_edev_by_phandle() Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/extcon.h')
-rw-r--r--include/linux/extcon.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 21c59af1150b..f488145bb2d4 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -240,6 +240,12 @@ extern int extcon_register_notifier(struct extcon_dev *edev,
240 struct notifier_block *nb); 240 struct notifier_block *nb);
241extern int extcon_unregister_notifier(struct extcon_dev *edev, 241extern int extcon_unregister_notifier(struct extcon_dev *edev,
242 struct notifier_block *nb); 242 struct notifier_block *nb);
243
244/*
245 * Following API get the extcon device from devicetree.
246 * This function use phandle of devicetree to get extcon device directly.
247 */
248extern struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index);
243#else /* CONFIG_EXTCON */ 249#else /* CONFIG_EXTCON */
244static inline int extcon_dev_register(struct extcon_dev *edev) 250static inline int extcon_dev_register(struct extcon_dev *edev)
245{ 251{
@@ -324,5 +330,11 @@ static inline int extcon_unregister_interest(struct extcon_specific_cable_nb
324{ 330{
325 return 0; 331 return 0;
326} 332}
333
334static inline struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
335 int index)
336{
337 return ERR_PTR(-ENODEV);
338}
327#endif /* CONFIG_EXTCON */ 339#endif /* CONFIG_EXTCON */
328#endif /* __LINUX_EXTCON_H__ */ 340#endif /* __LINUX_EXTCON_H__ */