Describing LEDs roles in device tree?

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

 



Hi!

Our current binding Documentation/devicetree/bindings/leds/common.yaml
allows describing some generic LED parameters. Most common are color and
function.

Now, many systems will want further & more specialized description of
LEDs. Most common roles I can think of:
1. System is booting
2. System is running
3. System's failure

For kernel usage role we actually have a "panic-indicator" property.

Are those extra roles something we could put in DT?

Please note that "function" on its own is not sufficient as multiple
LEDs my share the same function name but its meaning may vary depending
on color.

OpenWrt developers started (ab?)using aliases in downstream/modified DT
files for such purposes. Example:

aliases {
	led-boot = &led_status_blue;
	led-running = &led_status_green;
	led-failsafe = &led_status_red;
};

Above could work with some adjustments but I'm not sure if it's
acceptable for upstream binding. Also what if OpenWrt wants to define
different roles than another project? Prefixes?

With Linux a problem is also a lack of mapping between
/proc/device-tree/leds/*
and
/sys/class/leds/*
With "label" present its simple but some guessing logic is needed for
function + color properties (it's actually missing in OpenWrt right now)

Any suggestions for DT-based solution?

--
Rafał Miłecki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux