From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Pavel Machek <pavel@ucw.cz>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>
Subject: Re: [PATCH v2] leds: core: use deferred probing if default trigger isn't available yet
Date: Mon, 27 Feb 2017 20:55:41 +0100 [thread overview]
Message-ID: <a5149ede-f0c3-2fba-54ce-b137fec96e94@gmail.com> (raw)
In-Reply-To: <20170227111213.GA19403@amd>
On 02/27/2017 12:12 PM, Pavel Machek wrote:
> On Fri 2017-02-24 07:41:48, Heiner Kallweit wrote:
>> When registering a LED device we have the option to set a default trigger.
>> Depending on load order of drivers this trigger may not be available yet.
>> (affected LED device in my case: a DT-configured GPIO LED)
>> So far if the default trigger can't be found this error is silently
>> ignored.
>>
>> Let's change this to return EPROBE_DEFER if the default trigger can't be
>> found. This gives the system the chance to probe the LED device later
>> once the trigger is available.
>>
>> In addition in led_trigger_set_default break out of the loop when trigger
>> has been found.
>
> Hmm. Problem with this is that if the we configure non-existing
> trigger, or trigger not configured in current kernel, LED will
> disappear and user will have "fun" debugging why, right?
Right, so I propose to add suitable dev_err logging in
led_classdev_register() if led_trigger_set_default() returns
non-zero.
--
Best regards,
Jacek Anaszewski
prev parent reply other threads:[~2017-02-27 21:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-24 6:41 [PATCH v2] leds: core: use deferred probing if default trigger isn't available yet Heiner Kallweit
2017-02-26 17:11 ` Jacek Anaszewski
2017-02-27 11:12 ` Pavel Machek
2017-02-27 19:55 ` Jacek Anaszewski [this message]
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=a5149ede-f0c3-2fba-54ce-b137fec96e94@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.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 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).