From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Stefan Wahren <wahrenst@gmx.net>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
bcm-kernel-feedback-list@broadcom.com,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-leds@vger.kernel.org
Subject: Re: [PATCH 1/2] leds: gpio: Add kernel log if devm_fwnode_gpiod_get fails
Date: Mon, 6 Nov 2023 13:19:21 +0200 [thread overview]
Message-ID: <ZUjLuTPppvI9xlOD@smile.fi.intel.com> (raw)
In-Reply-To: <20231105154940.97688-2-wahrenst@gmx.net>
On Sun, Nov 05, 2023 at 04:49:39PM +0100, Stefan Wahren wrote:
> In case leds-gpio fails to get the GPIO from the DT (e.g. the GPIO is
> already requested) the driver doesn't provide any helpful error log:
>
> leds-gpio: probe of leds failed with error -16
>
> So add a new error log in case devm_fwnode_gpiod_get() fails.
...
> led.gpiod = devm_fwnode_gpiod_get(dev, child, NULL, GPIOD_ASIS,
> NULL);
> if (IS_ERR(led.gpiod)) {
> + dev_err(dev, "Failed to get gpio '%pfw': %ld\n",
> + child, PTR_ERR(led.gpiod));
Perhaps %pe ?
> fwnode_handle_put(child);
> return ERR_CAST(led.gpiod);
> }
--
With Best Regards,
Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Stefan Wahren <wahrenst@gmx.net>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
bcm-kernel-feedback-list@broadcom.com,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-leds@vger.kernel.org
Subject: Re: [PATCH 1/2] leds: gpio: Add kernel log if devm_fwnode_gpiod_get fails
Date: Mon, 6 Nov 2023 13:19:21 +0200 [thread overview]
Message-ID: <ZUjLuTPppvI9xlOD@smile.fi.intel.com> (raw)
In-Reply-To: <20231105154940.97688-2-wahrenst@gmx.net>
On Sun, Nov 05, 2023 at 04:49:39PM +0100, Stefan Wahren wrote:
> In case leds-gpio fails to get the GPIO from the DT (e.g. the GPIO is
> already requested) the driver doesn't provide any helpful error log:
>
> leds-gpio: probe of leds failed with error -16
>
> So add a new error log in case devm_fwnode_gpiod_get() fails.
...
> led.gpiod = devm_fwnode_gpiod_get(dev, child, NULL, GPIOD_ASIS,
> NULL);
> if (IS_ERR(led.gpiod)) {
> + dev_err(dev, "Failed to get gpio '%pfw': %ld\n",
> + child, PTR_ERR(led.gpiod));
Perhaps %pe ?
> fwnode_handle_put(child);
> return ERR_CAST(led.gpiod);
> }
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-11-06 11:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-05 15:49 [PATCH 0/2] ARM: dts: bcm2711-rpi-400: Fix delete-node of led_act Stefan Wahren
2023-11-05 15:49 ` Stefan Wahren
2023-11-05 15:49 ` [PATCH 1/2] leds: gpio: Add kernel log if devm_fwnode_gpiod_get fails Stefan Wahren
2023-11-05 15:49 ` Stefan Wahren
2023-11-06 11:19 ` Andy Shevchenko [this message]
2023-11-06 11:19 ` Andy Shevchenko
2023-11-18 12:31 ` Stefan Wahren
2023-11-18 12:31 ` Stefan Wahren
2023-11-05 15:49 ` [PATCH 2/2] ARM: dts: bcm2711-rpi-400: Fix delete-node of led_act Stefan Wahren
2023-11-05 15:49 ` Stefan Wahren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZUjLuTPppvI9xlOD@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=wahrenst@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.