mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
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>
This commit is contained in:
parent
ca48824117
commit
1ad94ffef2
7 changed files with 55 additions and 95 deletions
|
@ -240,6 +240,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)
|
||||
{
|
||||
|
@ -324,5 +330,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__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue