diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2014-03-18 20:31:33 +0900 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-05-15 07:28:39 +0200 |
commit | 7fa3a826a1967e31b90aecfcd0994c6c664ec6f4 (patch) | |
tree | 69792a579a3d6c1b0a32cb2aefea3d623824f262 /include | |
parent | 3303647842d1a726498c42f32732a3829d36c818 (diff) | |
download | linux-3.10-7fa3a826a1967e31b90aecfcd0994c6c664ec6f4.tar.gz linux-3.10-7fa3a826a1967e31b90aecfcd0994c6c664ec6f4.tar.bz2 linux-3.10-7fa3a826a1967e31b90aecfcd0994c6c664ec6f4.zip |
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()
Change-Id: I37fd827f945e3d713cfe15607689eab6792007b1
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/extcon.h | 12 | ||||
-rw-r--r-- | include/linux/extcon/of_extcon.h | 31 |
2 files changed, 12 insertions, 31 deletions
diff --git a/include/linux/extcon.h b/include/linux/extcon.h index fcb51c88319..d948d873ba8 100644 --- a/include/linux/extcon.h +++ b/include/linux/extcon.h @@ -237,6 +237,12 @@ extern int extcon_register_notifier(struct extcon_dev *edev, struct notifier_block *nb); extern int extcon_unregister_notifier(struct extcon_dev *edev, struct notifier_block *nb); + +/* + * Following API get the extcon device from devicetree. + * This function use phandle of devicetree to get extcon device directly. + */ +extern struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index); #else /* CONFIG_EXTCON */ static inline int extcon_dev_register(struct extcon_dev *edev, struct device *dev) @@ -322,5 +328,11 @@ static inline int extcon_unregister_interest(struct extcon_specific_cable_nb { return 0; } + +static inline struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, + int index) +{ + return ERR_PTR(-ENODEV); +} #endif /* CONFIG_EXTCON */ #endif /* __LINUX_EXTCON_H__ */ diff --git a/include/linux/extcon/of_extcon.h b/include/linux/extcon/of_extcon.h deleted file mode 100644 index 0ebfeff1b55..00000000000 --- a/include/linux/extcon/of_extcon.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * OF helpers for External connector (extcon) framework - * - * Copyright (C) 2013 Texas Instruments, Inc. - * Kishon Vijay Abraham I <kishon@ti.com> - * - * Copyright (C) 2013 Samsung Electronics - * Chanwoo Choi <cw00.choi@samsung.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ - -#ifndef __LINUX_OF_EXTCON_H -#define __LINUX_OF_EXTCON_H - -#include <linux/err.h> - -#if IS_ENABLED(CONFIG_OF_EXTCON) -extern struct extcon_dev - *of_extcon_get_extcon_dev(struct device *dev, int index); -#else -static inline struct extcon_dev - *of_extcon_get_extcon_dev(struct device *dev, int index) -{ - return ERR_PTR(-ENOSYS); -} -#endif /* CONFIG_OF_EXTCON */ -#endif /* __LINUX_OF_EXTCON_H */ |