| commit | 54995ae951ed245d167ba73cfd07411d039eb78e | [log] [tgz] |
|---|---|---|
| author | Alexander Hansen <alexander.hansen@9elements.com> | Tue Jun 25 15:56:17 2024 +0200 |
| committer | Alexander Hansen <alexander.hansen@9elements.com> | Tue Jun 25 15:59:05 2024 +0200 |
| tree | ef90e03848edfb6ad05e4ea7b6ee6c48c63a475c | |
| parent | 29bd56b16682ef75ca5ac856bd7c72281c90e892 [diff] |
Add README.md Explaining the high level workings of this project. Change-Id: I434e6790c1ec47a2b049cbd0579d23359369dc4a Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
This project exposes physical LEDs on dbus.
Say we have 'identify' LED in our system, which may be declared in devicetree.
leds {
compatible = "gpio-leds";
identify {
gpios = <&gpio ASPEED_GPIO(S, 6) GPIO_ACTIVE_HIGH>;
};
};
We can start the program
./phosphor-ledcontroller --path /sys/class/leds/identify
which will expose following dbus objects:
busctl tree xyz.openbmc_project.LED.Controller.identify
`- /xyz
`- /xyz/openbmc_project
`- /xyz/openbmc_project/led
`- /xyz/openbmc_project/led/physical
`- /xyz/openbmc_project/led/physical/identify
busctl introspect xyz.openbmc_project.LED.Controller.identify /xyz/openbmc_project/led/physical/identify
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Led.Physical interface - - -
.Color property s "xyz.openbmc_project.Led.Physical.Pal... emits-change writable
.DutyOn property y 50 emits-change writable
.Period property q 1000 emits-change writable
.State property s "xyz.openbmc_project.Led.Physical.Act... emits-change writable
In the above output, the usual org.freedesktop.* interfaces have been removed to keep it readable.
Query the LED State
busctl get-property xyz.openbmc_project.LED.Controller.identify \ /xyz/openbmc_project/led/physical/identify \ xyz.openbmc_project.Led.Physical State \ s "xyz.openbmc_project.Led.Physical.Action.Off"
Set the LED State
busctl set-property xyz.openbmc_project.LED.Controller.identify \ /xyz/openbmc_project/led/physical/identify \ xyz.openbmc_project.Led.Physical State s \ "xyz.openbmc_project.Led.Physical.Action.Off"
meson setup build cd build ninja