commit | db82c0f8b1169ab77986da5779c4bef54a61aaaa | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Fri Aug 16 15:21:02 2024 -0400 |
committer | Patrick Williams <patrick@stwcx.xyz> | Fri Aug 16 15:21:02 2024 -0400 |
tree | 5c7da73f0b0271630b6126b312d4e008ae822d6a | |
parent | 0e157e9affcc54f6c015a55c9e7f7508ffe35f5e [diff] |
clang-format: re-format for clang-18 clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting. See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement. Change-Id: Ib954bf0f0b02b48eba93a0ddd42730542ceb5264 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
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