diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2016-04-26 08:35:54 +0900 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2016-06-21 14:09:53 +0900 |
commit | 942c7924a51edb75baf805679141e97140e07218 (patch) | |
tree | 0ba2362b5d91f03dabdc08fddeb3b748c5895c57 /drivers | |
parent | 058b6659e98ffa8bc2781dba9ca56893be577ca3 (diff) | |
download | linux-stable-942c7924a51edb75baf805679141e97140e07218.tar.gz linux-stable-942c7924a51edb75baf805679141e97140e07218.tar.bz2 linux-stable-942c7924a51edb75baf805679141e97140e07218.zip |
extcon: usb-gpio: add support for ACPI gpio interface
GPIO resource could be retrieved through APCI as well.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Felipe Balbi <balbi@kernel.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/extcon/extcon-usb-gpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index 8969606e629b..2512660dc4b9 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c @@ -27,6 +27,7 @@ #include <linux/pm_wakeirq.h> #include <linux/slab.h> #include <linux/workqueue.h> +#include <linux/acpi.h> #define USB_GPIO_DEBOUNCE_MS 20 /* ms */ @@ -92,7 +93,7 @@ static int usb_extcon_probe(struct platform_device *pdev) struct usb_extcon_info *info; int ret; - if (!np) + if (!np && !ACPI_HANDLE(dev)) return -EINVAL; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); |