Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1352706

[PATCH v3 2/7] extcon: usb-gpio: add support for ACPI gpio interface

From Lu Baolu <baolu.lu@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v3 2/7] extcon: usb-gpio: add support for ACPI gpio interface
Date 2016-03-08 09:00 +0100
Message-ID <rakII-6lY-35@gated-at.bofh.it> (permalink)
References <rakIG-6lY-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/extcon/extcon-usb-gpio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c
index af9c8b0..472c431 100644
--- a/drivers/extcon/extcon-usb-gpio.c
+++ b/drivers/extcon/extcon-usb-gpio.c
@@ -26,6 +26,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
+#include <linux/acpi.h>
 
 #define USB_GPIO_DEBOUNCE_MS	20	/* ms */
 
@@ -91,7 +92,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);
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/7] usb: add support for Intel dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-03-08 09:00 +0100
  [PATCH v3 7/7] mfd: intel_vuport: Add Intel virtual USB port MFD Driver Lu Baolu <baolu.lu@linux.intel.com> - 2016-03-08 09:00 +0100
  [PATCH v3 1/7] extcon: usb-gpio: add device binding for platform device Lu Baolu <baolu.lu@linux.intel.com> - 2016-03-08 09:00 +0100
  [PATCH v3 2/7] extcon: usb-gpio: add support for ACPI gpio interface Lu Baolu <baolu.lu@linux.intel.com> - 2016-03-08 09:00 +0100
  Re: [PATCH v3 0/7] usb: add support for Intel dual role port mux Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-11 01:10 +0100
    Re: [PATCH v3 0/7] usb: add support for Intel dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-03-11 01:30 +0100
      Re: [PATCH v3 0/7] usb: add support for Intel dual role port mux Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-11 02:50 +0100

csiph-web