LED colors in d-bus

Alexander Soldatov a.soldatov at yadro.com
Wed Nov 7 23:03:24 AEDT 2018


  Hi all!

  There are some ideas for setting led color in DBus. Led nodes in DBus are created by phosphor-led-sysfs. phosphor-led-sysfs is started by udev rule for the sysfs led. Suggestion is to add enviroment file (e.x. /etc/default/obmc/leds/led.conf), which contains colors for all system leds. The conf file could be look like:

COLOR_alarm_red = "Red"
COLOR_alarm_yel = "Yellow"
COLOR_heartbeat = "Green"
COLOR_id_blue = "Blue"
COLOR_power_red = "Red"


  phosphor-led-sysfs looks for led color in the enviroment variables and sets led color.


  Regards,

  Alexnader Soldatov.

________________________________
От: Alexander Amelkin
Отправлено: 6 ноября 2018 г. 16:41:57
Кому: openbmc at lists.ozlabs.org
Копия: Alexander Soldatov; Vishwanatha Subbanna
Тема: LED colors in d-bus


Hi all!

Since commit a1e70a7af by Vishwanatha Subbanna to phosphor-dbus-interfaces (see https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-dbus-interfaces/+/1136/ ), there is a property 'Color' for leds.

However, it looks like nothing is setting that property for any of the supported platforms. So any led always has it in d-bus set to Unknown.

It is unclear to us what was the intention for adding that property. It has not been explained in the commit log for the commit. It is also unclear what could be the correct way to set that property. phosphor-led-manager operates on groups. A single led can be a part of multiple groups, so 'led.yaml' in phosphor-led-manager looks like a wrong place to attach a color property to leds. Each leds used in led.yaml is called by the name taken from Linux devicetree. However, the bindings for leds in Linux devicetree do not imply color information as well.

Are there any hints on how to set that property the right way? Can you imagine any real use cases for the color property? Maybe we should just ditch it completely? It's been 2 years since it has been introduced and nobody seems to have cared...

Thanks.

Alexander.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20181107/c64a0b09/attachment.html>


More information about the openbmc mailing list