Add ability to set LED colors in DBus
phosphor-led-sysfs parses sysfs LED node names
in the form of "devicename:colour:function" as
described in
https://github.com/torvalds/linux/blob/master/Documentation/leds/leds-class.txt#L46
and then converts the "colour" part into the proper
value of the DBus 'Color' property using the
xyz.openbmc_project.Led.Physical.Palette interface.
In order for the led nodes to have their Color set,
the corresponding led nodes in devicetree must have
correct 'label' properties, e.g.:
leds {
compatible = "gpio-leds";
heartbeat {
label = "bmc:green:hearbeat";
gpios = <&gpio ASPEED_GPIO(R, 4) GPIO_ACTIVE_LOW>;
};
power_red {
label = "system:red:power";
gpios = <&gpio ASPEED_GPIO(N, 1) GPIO_ACTIVE_LOW>;
};
}
Change-Id: I094f0e434bdd262995752576a3c792ccd5dbb3e2
Signed-off-by: Alexander Soldatov <a.soldatov@yadro.com>
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
3 files changed