extcon: Add an API to get extcon device from dt node

Added an API of_extcon_get_extcon_dev() to be used by drivers to get
extcon device in the case of dt boot (this can be used instead of
extcon_get_extcon_dev()).

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
This commit is contained in:
Kishon Vijay Abraham I
2013-06-11 20:48:02 +09:00
committed by Chanwoo Choi
parent 5ae90d8e46
commit 6eee5b3b49
5 changed files with 103 additions and 1 deletions

View File

@@ -602,7 +602,8 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev)
edev->dev->class = extcon_class;
edev->dev->release = extcon_dev_release;
dev_set_name(edev->dev, "%s", edev->name ? edev->name : dev_name(dev));
edev->name = edev->name ? edev->name : dev_name(dev);
dev_set_name(edev->dev, "%s", edev->name);
if (edev->max_supported) {
char buf[10];