Re: [PATCH 2/3] leds: lp50xx: KConfig: fix dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 31, 2021 at 12:01:17AM +0200, Jan Kundrát wrote:
> I just lost a few hours of debugging why the heck my sysfs nodes were
> not created even though devm_led_classdev_multicolor_register_ext() was
> returning 0. It turned out that I was missing support for the multicolor
> LED device class. No errors were reported, neither during the build, nor
> at runtime -- but the DTS configuration of the connected LEDs was
> silently ignored.

Which is okay. The feature as far as I can see is optional.

> The driver also really needs DTS -- probe fails if there are no children
> in the DT, so the direct binding from userspace probably doesn't work.
> That's interesting because commit
> ea1ff99c9d235b8a54571d4292c71fce60993117 suggests that a direct bind was
> supposed to work.

First of all, please use standard reference to the commit (it will give a bit
more context here), i.e.

ea1ff99c9d23 ("leds: lp50xx: Switch to new style i2c-driver probe function")

Second, it suggests that in general. While this driver currently won't be
instantiated via user space, it the future we potentially might have a way
how to construct software node(s) from user space (perhaps using configfs)
and it will make the above statement a complete truth.

...

> -	depends on LEDS_CLASS_MULTICOLOR || !LEDS_CLASS_MULTICOLOR
> +	depends on LEDS_CLASS_MULTICOLOR

No, until there is a justification why it should be non-optional.

You may add a debug message in order to avoid others to waste time on
understanding the issue in the cases same to yours.

...

> +	depends on OF

No, this driver is not OF-dependent. This change will bring a regression to it
on ACPI-based systems.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux