commit | d825f567fa94dd2cbd35bff761f1a5fbde34a4f3 | [log] [tgz] |
---|---|---|
author | Patrick Williams <patrick@stwcx.xyz> | Wed Dec 18 11:21:34 2024 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Wed Dec 18 11:21:34 2024 -0500 |
tree | 6867bc291e5dcf97337e5c460ab9583184ef8380 | |
parent | db82c0f8b1169ab77986da5779c4bef54a61aaaa [diff] |
clang-format: re-format for clang-19 clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly. See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement. Change-Id: Ided2858bda48e0c7ffa036558e40c8ad1aad4777 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