Skip to contentSkip to conversation

next-20170307: led trigger deferral breaks sdhci

regression Jon Hunter 3 participants 3 messages Mar 8, 2017 – Mar 9, 2017 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Jon Hunter

author
#0 lore raw

Hello!

I noticed that sdhci is broken for me on yesterday's and today's -next and the bisect is pointing to commit 3f1318e01bb4 ('leds: core: use deferred probing if default trigger isn't available yet').

At first I thought that ok, the problem is that sdhci driver is first registering the led and then the trigger. However, then I looked at the led_trigger_register() function and it appears to allow you to register the led first and the trigger sometime later and populate the default trigger later on. So then I am not sure why the above commit is needed?

It is not clear to me from the commit message for the above commit what actual problem was caused by not registering the trigger first.

Cheers
Jon

Signature · 1 line
nvpublic
#2 lore raw
In reply to a message not in the archive

Hi,

Quoted 5 lines · Jon Hunter

Hello!

I noticed that sdhci is broken for me on yesterday's and today's -next and the bisect is pointing to commit 3f1318e01bb4 ('leds: core: use deferred probing if default trigger isn't available yet').

I have noticed it yesterday, I was going to perform a bisect but thanks to you I won't have to do it.

Ludovic

Quoted 13 lines

At first I thought that ok, the problem is that sdhci driver is first registering the led and then the trigger. However, then I looked at the led_trigger_register() function and it appears to allow you to register the led first and the trigger sometime later and populate the default trigger later on. So then I am not sure why the above commit is needed?

It is not clear to me from the commit message for the above commit what actual problem was caused by not registering the trigger first.

Cheers
Jon

#3 lore raw
In reply to Jon Hunter

Hi Joe,

Quoted 6 lines · Jon Hunter

Hello!

I noticed that sdhci is broken for me on yesterday's and today's -next and the bisect is pointing to commit 3f1318e01bb4 ('leds: core: use deferred probing if default trigger isn't available yet').

Quoted 8 lines

At first I thought that ok, the problem is that sdhci driver is first registering the led and then the trigger. However, then I looked at the led_trigger_register() function and it appears to allow you to register the led first and the trigger sometime later and populate the default trigger later on. So then I am not sure why the above commit is needed?

It is not clear to me from the commit message for the above commit what actual problem was caused by not registering the trigger first.

The problem was the case when the trigger that has been defined as "default-trigger" in DT is not registered at the moment of LED class driver probing. It is silently ignored by LED core.

It turned out that we accepted the commit too hastily, and in fact that case seems not to be critical to the extent justifying preventing LED class device registration.

Probably dev_warn() should be enough in this case. I've already dropped the commit. Sorry for making confusion.

Signature · 2 lines
Best regards,
Jacek Anaszewski