extcon: usb-gpio: add support for ACPI gpio interface
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 25 Apr 2016 23:35:54 +0000 (08:35 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 21 Jun 2016 05:09:53 +0000 (14:09 +0900)
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>
drivers/extcon/extcon-usb-gpio.c

index 8969606e629b5e287d0a00e7abaab1e5486e2a5e..2512660dc4b9508c5dd26a2a63177a7681f52d56 100644 (file)
@@ -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);
This page took 0.027255 seconds and 5 git commands to generate.