From: Stefan Wahren <wahrenst@gmx.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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: Sat, 18 Nov 2023 13:31:34 +0100 [thread overview]
Message-ID: <4233bd69-e5e4-49e9-96d9-b52492061ef8@gmx.net> (raw)
In-Reply-To: <ZUjLuTPppvI9xlOD@smile.fi.intel.com>
Hi Andy,
Am 06.11.23 um 12:19 schrieb Andy Shevchenko:
> 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 ?
i notice that i need to use dev_err_probe because of EPROBE_DEFER
anyway. So i will drop the second parameter in the next version.
>
>> fwnode_handle_put(child);
>> return ERR_CAST(led.gpiod);
>> }
_______________________________________________
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-18 12:32 UTC|newest]
Thread overview: 5+ 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 ` [PATCH 1/2] leds: gpio: Add kernel log if devm_fwnode_gpiod_get fails Stefan Wahren
2023-11-06 11:19 ` Andy Shevchenko
2023-11-18 12:31 ` Stefan Wahren [this message]
2023-11-05 15:49 ` [PATCH 2/2] ARM: dts: bcm2711-rpi-400: Fix delete-node of led_act 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=4233bd69-e5e4-49e9-96d9-b52492061ef8@gmx.net \
--to=wahrenst@gmx.net \
--cc=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 \
/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 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).