Hi Sakari,
On 03/21/2015 11:49 PM, Sakari Ailus wrote:
Hi Jacek,
On Fri, Mar 20, 2015 at 04:03:22PM +0100, Jacek Anaszewski wrote:
+Optional properties of the LED child node:
+- label : see Documentation/devicetree/bindings/leds/common.txt
I'm still not comfortable using the label field as-is as the entity name in
the later patches, there's one important problem: it is not guaranteed to be
unique in the system.
I don't use it as-is in my patches. For max77603-led the i2c adapter id
and client address is added to it, and for aat1290 there is '_n' suffix
added. Nonetheless I didn't notice that the patch [1] was already
merged. It checks if a LED class device with given name isn't already
registered and adds a '_n" suffix if there was any. If it was exported
I could use it in the leds-aat1290 driver and avoid depending on the
static variable.
Whereas for I2C devices the problem doesn't exist (it is guaranteed that
no more than one I2C client with an address can be present on the
same bus), for devices driven through GPIOs we haven't stable unique
identifier.
I thought that we agreed on #v4l about adding numerical postfixes
in case of such devices.
Do you think this could be added to
Documentation/devicetree/bindings/leds/common.txt, with perhaps enforcing it
in the LED framework? Bryan, what do you think?
The patch [1] seems to address the issue.
The alternative would be to simply ignore it in the entity name, but then
the name of the device would be different in the LED framework and Media
controller.
This is the case currently - the names are different. The post fixes
are added only to media entity name. Perhaps they should be unified.
[1] http://www.spinics.net/lists/linux-leds/msg03137.html
--
Best Regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html