commit | 0e157e9affcc54f6c015a55c9e7f7508ffe35f5e | [log] [tgz] |
---|---|---|
author | George Liu <liuxiwei@ieisystem.com> | Tue Aug 06 10:30:41 2024 +0800 |
committer | George Liu <liuxiwei@ieisystem.com> | Tue Aug 06 10:30:41 2024 +0800 |
tree | 3f719dbacfada776d5604c8bb6a2c9adedcd3cac | |
parent | a16bef7d64a834b3ac407f2e7956c7e110725954 [diff] |
Fix MD040 warnings The following warnings are generated by using markdownlint analysis: ``` MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] ``` Refer to markdown-lint [1] to fix MD040 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/040-fenced-code-language.md Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I503908cfe6b198c172d158acbb3e50033f862686
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 add an LED via the helper program. The main service is then started via dbus-activation.
./add-led-action --path /sys/class/leds/identify
which will expose following dbus objects:
busctl tree xyz.openbmc_project.LED.Controller `- /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 /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 \ /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 \ /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