* [PATCH] NFC: nxp-nci: Fix probing without ACPI
@ 2019-12-09 18:53 Stephan Gerhold
2019-12-09 19:16 ` Andy Shevchenko
2019-12-10 4:16 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Stephan Gerhold @ 2019-12-09 18:53 UTC (permalink / raw)
To: David S. Miller
Cc: Clément Perrochaud, Charles Gorand, linux-nfc, netdev,
linux-kernel, Stephan Gerhold, Andy Shevchenko
devm_acpi_dev_add_driver_gpios() returns -ENXIO if CONFIG_ACPI
is disabled (e.g. on device tree platforms).
In this case, nxp-nci will silently fail to probe.
The other NFC drivers only log a debug message if
devm_acpi_dev_add_driver_gpios() fails.
Do the same in nxp-nci to fix this problem.
Fixes: ad0acfd69add ("NFC: nxp-nci: Get rid of code duplication in ->probe()")
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
drivers/nfc/nxp-nci/i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index 4d1909aecd6c..9f60e4dc5a90 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -278,7 +278,7 @@ static int nxp_nci_i2c_probe(struct i2c_client *client,
r = devm_acpi_dev_add_driver_gpios(dev, acpi_nxp_nci_gpios);
if (r)
- return r;
+ dev_dbg(dev, "Unable to add GPIO mapping table\n");
phy->gpiod_en = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
if (IS_ERR(phy->gpiod_en)) {
--
2.24.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] NFC: nxp-nci: Fix probing without ACPI
2019-12-09 18:53 [PATCH] NFC: nxp-nci: Fix probing without ACPI Stephan Gerhold
@ 2019-12-09 19:16 ` Andy Shevchenko
2019-12-10 4:16 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2019-12-09 19:16 UTC (permalink / raw)
To: Stephan Gerhold
Cc: David S. Miller, Clément Perrochaud, Charles Gorand,
linux-nfc, netdev, Linux Kernel Mailing List, Andy Shevchenko
On Mon, Dec 9, 2019 at 8:57 PM Stephan Gerhold <stephan@gerhold.net> wrote:
>
> devm_acpi_dev_add_driver_gpios() returns -ENXIO if CONFIG_ACPI
> is disabled (e.g. on device tree platforms).
> In this case, nxp-nci will silently fail to probe.
>
> The other NFC drivers only log a debug message if
> devm_acpi_dev_add_driver_gpios() fails.
> Do the same in nxp-nci to fix this problem.
>
Ah, thanks!
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Fixes: ad0acfd69add ("NFC: nxp-nci: Get rid of code duplication in ->probe()")
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
> drivers/nfc/nxp-nci/i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
> index 4d1909aecd6c..9f60e4dc5a90 100644
> --- a/drivers/nfc/nxp-nci/i2c.c
> +++ b/drivers/nfc/nxp-nci/i2c.c
> @@ -278,7 +278,7 @@ static int nxp_nci_i2c_probe(struct i2c_client *client,
>
> r = devm_acpi_dev_add_driver_gpios(dev, acpi_nxp_nci_gpios);
> if (r)
> - return r;
> + dev_dbg(dev, "Unable to add GPIO mapping table\n");
>
> phy->gpiod_en = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
> if (IS_ERR(phy->gpiod_en)) {
> --
> 2.24.0
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NFC: nxp-nci: Fix probing without ACPI
2019-12-09 18:53 [PATCH] NFC: nxp-nci: Fix probing without ACPI Stephan Gerhold
2019-12-09 19:16 ` Andy Shevchenko
@ 2019-12-10 4:16 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-12-10 4:16 UTC (permalink / raw)
To: stephan
Cc: clement.perrochaud, charles.gorand, linux-nfc, netdev,
linux-kernel, andriy.shevchenko
From: Stephan Gerhold <stephan@gerhold.net>
Date: Mon, 9 Dec 2019 19:53:43 +0100
> devm_acpi_dev_add_driver_gpios() returns -ENXIO if CONFIG_ACPI
> is disabled (e.g. on device tree platforms).
> In this case, nxp-nci will silently fail to probe.
>
> The other NFC drivers only log a debug message if
> devm_acpi_dev_add_driver_gpios() fails.
> Do the same in nxp-nci to fix this problem.
>
> Fixes: ad0acfd69add ("NFC: nxp-nci: Get rid of code duplication in ->probe()")
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Applied and queued up for v5.4 -stable, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-10 4:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 18:53 [PATCH] NFC: nxp-nci: Fix probing without ACPI Stephan Gerhold
2019-12-09 19:16 ` Andy Shevchenko
2019-12-10 4:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).