Re: [PATCH v6 02/10] extcon: usb-gpio: add support for ACPI gpio interface
Hi, On 04/26/2016 07:51 AM, Chanwoo Choi wrote: > Hi Lu, > > On 2016년 04월 25일 17:04, Lu Baolu wrote: >> GPIO resource could be retrieved through APCI as well. >> >> Signed-off-by: Lu Baolu>> Reviewed-by: Felipe Balbi >> Acked-by: Chanwoo Choi >> --- >> 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 >> #include >> #include >> +#include >> >> #define USB_GPIO_DEBOUNCE_MS20 /* 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(>dev, sizeof(*info), GFP_KERNEL); >> > Applied it. > > Thanks, > Chanwoo Choi > Thank you. Best regards, Baolu >
Re: [PATCH v6 02/10] extcon: usb-gpio: add support for ACPI gpio interface
Hi, On 04/26/2016 07:51 AM, Chanwoo Choi wrote: > Hi Lu, > > On 2016년 04월 25일 17:04, Lu Baolu wrote: >> GPIO resource could be retrieved through APCI as well. >> >> Signed-off-by: Lu Baolu >> Reviewed-by: Felipe Balbi >> Acked-by: Chanwoo Choi >> --- >> 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 >> #include >> #include >> +#include >> >> #define USB_GPIO_DEBOUNCE_MS20 /* 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(>dev, sizeof(*info), GFP_KERNEL); >> > Applied it. > > Thanks, > Chanwoo Choi > Thank you. Best regards, Baolu >
Re: [PATCH v6 02/10] extcon: usb-gpio: add support for ACPI gpio interface
Hi Lu, On 2016년 04월 25일 17:04, Lu Baolu wrote: > GPIO resource could be retrieved through APCI as well. > > Signed-off-by: Lu Baolu> Reviewed-by: Felipe Balbi > Acked-by: Chanwoo Choi > --- > 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 > #include > #include > +#include > > #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(>dev, sizeof(*info), GFP_KERNEL); > Applied it. Thanks, Chanwoo Choi
Re: [PATCH v6 02/10] extcon: usb-gpio: add support for ACPI gpio interface
Hi Lu, On 2016년 04월 25일 17:04, Lu Baolu wrote: > GPIO resource could be retrieved through APCI as well. > > Signed-off-by: Lu Baolu > Reviewed-by: Felipe Balbi > Acked-by: Chanwoo Choi > --- > 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 > #include > #include > +#include > > #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(>dev, sizeof(*info), GFP_KERNEL); > Applied it. Thanks, Chanwoo Choi
[PATCH v6 02/10] extcon: usb-gpio: add support for ACPI gpio interface
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu BaoluReviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- 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 #include #include +#include #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(>dev, sizeof(*info), GFP_KERNEL); -- 2.1.4
[PATCH v6 02/10] extcon: usb-gpio: add support for ACPI gpio interface
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- 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 #include #include +#include #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(>dev, sizeof(*info), GFP_KERNEL); -- 2.1.4