db82c0f8 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
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 forma
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>
show more ...
|
0e157e9a | 05-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
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
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
show more ...
|
a16bef7d | 01-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
meson: remove boost
boost is not necessary here and has little use in the project.
Change-Id: Ia7ce9664335dce50652d0baa4a2132fde28a6269 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.c
meson: remove boost
boost is not necessary here and has little use in the project.
Change-Id: Ia7ce9664335dce50652d0baa4a2132fde28a6269 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
673b981a | 01-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
interfaces: use old dbus encoding
Due to backwards compatibility with old configurations, this is an easy fix to bring back the old object paths.
Tests are provided to capture this behavior.
Chang
interfaces: use old dbus encoding
Due to backwards compatibility with old configurations, this is an easy fix to bring back the old object paths.
Tests are provided to capture this behavior.
Change-Id: Ic89f2eb02bb908cf23b833b08fdca941bef2a07a Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
24d124f9 | 16-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
sysfs: Refactor LED property parsing
Added new test for parsing led description from sysfs.
Since there are some edge cases that can happen, to make sure the parsing happens as expected in all case
sysfs: Refactor LED property parsing
Added new test for parsing led description from sysfs.
Since there are some edge cases that can happen, to make sure the parsing happens as expected in all cases.
The edge cases primarily come from the different led properties that can be present or absent in devicetree. I have tested some combinations thereof and would prefer the label to be generated by led sysfs instead of manually providing the 3-component label.
However for that to work phosphor-led-sysfs must be able to extract the labels components in all cases.
This modifies the behavior slightly but it will stay the same for led names that have 1 or 3 components.
Change-Id: I8def089e4c8dc5d3a341cf6f6b1d6356f5aefe48 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
e6239da8 | 16-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
readme: update for the one-process design
Change-Id: If5064210c59abd2f9236da2ee7f6994594dc5367 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> |
b6779846 | 07-Oct-2022 |
Jayashree Dhanapal <jayashree-d@hcl.com> |
Create a new Dbus interface for LED
A new Dbus API method is created in the phosphor-led-sysfs repository under xyz.openbmc_project.Led.Sysfs.Internal interface name to add or remove the LED, which
Create a new Dbus interface for LED
A new Dbus API method is created in the phosphor-led-sysfs repository under xyz.openbmc_project.Led.Sysfs.Internal interface name to add or remove the LED, which will be coming from each udev LED event to create the LED dbus path.
xyz.openbmc_project.Led.Sysfs.Internal interface .AddLED method .RemoveLED method
This Dbus API method is added to support the multihost physical LEDs design. https://gerrit.openbmc.org/c/openbmc/docs/+/55230
Also support a executable for LED DBUS API method
Added a new executable for LED DBUS API method to communicate between udev and application.
Executable will call Dbus API method to pass LED name as argument from udev, after the primary service started.
Tested : Tested the dbus method is invoked for each LED udev event in Facebook YosemiteV2 platform.
Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3fa6c3caa130b2b71ebc9fe8d69541c029f516ab Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
e48bf95d | 17-Aug-2022 |
Jayashree Dhanapal <jayashree-d@hcl.com> |
controller: Heap-allocate LEDs
Do this in preparation for migrating to a single instance of the daemon whose LED inventory is updated via DBus where the update is triggered by udev.
Splitting out t
controller: Heap-allocate LEDs
Do this in preparation for migrating to a single instance of the daemon whose LED inventory is updated via DBus where the update is triggered by udev.
Splitting out this work reduces the review complexity of the patch that rewrites the internals of the daemon.
Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I50e58126413514f7a64153f425629142fa5af6d4 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
54995ae9 | 25-Jun-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
Add README.md
Explaining the high level workings of this project.
Change-Id: I434e6790c1ec47a2b049cbd0579d23359369dc4a Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> |
29bd56b1 | 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I7282eed4dd7df45ffd15d5e93820b7f3013252b7 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
d508bfb5 | 22-Dec-2023 |
Andrew Jeffery <andrew@aj.id.au> |
OWNERS: Update Andrew's preferred email
We're having some grief with non-preferred emails in Gerrit[1]. I now prefer project-related content goes to my work email address, so use my non-preferred em
OWNERS: Update Andrew's preferred email
We're having some grief with non-preferred emails in Gerrit[1]. I now prefer project-related content goes to my work email address, so use my non-preferred email to implement the switch.
[1]: https://issues.gerritcodereview.com/issues/317345953
Change-Id: Ifb6b6ce4b1f6f574111492498c4508419c63468f Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
001e2a3d | 01-Dec-2023 |
George Liu <liuxiwei@ieisystem.com> |
Fix incorrect LED initial value
If LED is in blink state, `/sys/class/leds/<led_name>/trigger` contains following:
``` none [timer] heartbeat default-on ```
The format of the content of the trigge
Fix incorrect LED initial value
If LED is in blink state, `/sys/class/leds/<led_name>/trigger` contains following:
``` none [timer] heartbeat default-on ```
The format of the content of the trigger attribute is documented as follows:
> What: /sys/class/leds/<led>/trigger > Date: March 2006 > KernelVersion: 2.6.17 > Contact: Richard Purdie <rpurdie@rpsys.net> > Description: > Set the trigger for this LED. A trigger is a kernel based source > of LED events. > > You can change triggers in a similar manner to the way an IO > scheduler is chosen. Trigger specific parameters can appear in > /sys/class/leds/<led> once a given trigger is selected. For > their documentation see `sysfs-class-led-trigger-*`.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-class-led?h=v6.6#n71
That's unfortunately vague, but the "IO scheduler" reference is with respect to the following:
> What: /sys/block/<disk>/queue/scheduler > Date: October 2004 > Contact: linux-block@vger.kernel.org > Description: > [RW] When read, this file will display the current and available > IO schedulers for this block device. The currently active IO > scheduler will be enclosed in [] brackets. Writing an IO > scheduler name to this file will switch control of this block > device to that new IO scheduler. Note that writing an IO > scheduler name to this file will attempt to load that IO > scheduler module, if it isn't already present in the system.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/stable/sysfs-block?h=v6.6#n558
So the active trigger in the example at the top should be 'timer'. However, getTrigger() currently returns "none", which leads to incorrect results.
In setInitialState() the content of the "brightness" sysfs attribute is read if the trigger is not "timer" (and it's not as it's "none"). But when LEDs is blinking, the read of `brightness` is undefined as it may read 0 or 1.
Fixes: https://github.com/openbmc/phosphor-led-sysfs/issues/1
Change-Id: I1e06c2f9dc6511f04ec11aa30ea475f734496a50 Signed-off-by: George Liu <liuxiwei@ieisystem.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
85c1c2a7 | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I2fcb7f5ec79e4a71720306519e31d010ba9852ec Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
59c2e0e8 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ic64bba3793a8e481e6806d58f2a6f244f7b3ed5f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
28e37da0 | 15-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using t
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using the .txt extension for a build file has a few advantages, chief among them many tools and text editors expect a file with the .txt extension to be plain text files, not build scripts.
[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ic6dbe523190560c1b8bf4ec5425d0f7e80773aee
show more ...
|
2b50fa68 | 17-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: I3d0bba58b46d3744ad17e
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: I3d0bba58b46d3744ad17e4491f94a6a626a4402a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
f4eb29da | 07-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
build-tests: The allowed method is used by default
The allowed method returns true when the feature is set to `enabled` or `auto`.
The allowed method returns false when the feature is set to `disab
build-tests: The allowed method is used by default
The allowed method returns true when the feature is set to `enabled` or `auto`.
The allowed method returns false when the feature is set to `disabled`.
So we prefer to use the `allowed` method instead of `enabled`.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: If19f03ed8a9e15009d97009101135d36573773ac
show more ...
|
eaa1c89f | 03-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
Replace Argument class with CLI11
CLI11 is one of the most commonly use argument parser in OpenBMC. The Argument class will be replaced with CLI11 and the argument.(h/c)pp file will be removed.
Sig
Replace Argument class with CLI11
CLI11 is one of the most commonly use argument parser in OpenBMC. The Argument class will be replaced with CLI11 and the argument.(h/c)pp file will be removed.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ibff60a19d3ff9209ca70889acc9e6aec4a8d4fca
show more ...
|
1c4503e7 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ifb60efb9b1e7ed6fab2ed71dcffb57f39c552de4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
3778f8ef | 12-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig` keyword argument. Ensure meson 0.58 is required and update the usage of all `get_pkgconfig_variable` and `get_variable` to be the modern variant.
Change-Id: I7c5932b1c6ce342cd3d620dbf1909cf100924ddc Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
97ca7879 | 06-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
systemd: Create a directory tree for units
Change-Id: Ifa25a20a43f8750d62fd3cf203f7384370f3fbfe Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
d32dd3f5 | 02-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
udev: Create a directory tree for rules
Change-Id: I4415ce555825c0d6779c482a645e79454bc7f8c4 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
4def99b4 | 02-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
clang-tidy: Add configuration
Copied from bmcweb at 43e14d38178f ("Aggregation: Better handle dropped requests")
Change-Id: Ia0ced4ef97a2d338a9ec89c78fd6bccfc13a7c42 Signed-off-by: Andrew Jeffery <
clang-tidy: Add configuration
Copied from bmcweb at 43e14d38178f ("Aggregation: Better handle dropped requests")
Change-Id: Ia0ced4ef97a2d338a9ec89c78fd6bccfc13a7c42 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
f97abd13 | 06-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
test: sysfs: Fix readability-static-accessed-through-instance
``` /home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:67:26: error: static member accessed through instance [readabili
test: sysfs: Fix readability-static-accessed-through-instance
``` /home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:67:26: error: static member accessed through instance [readability-static-accessed-through-instance,-warnings-as-errors] f.exceptions(f.failbit); ^~ std::ofstream:: /home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:72:22: error: static member accessed through instance [readability-static-accessed-through-instance,-warnings-as-errors] f.exceptions(f.failbit); ^~ std::ofstream:: ```
Change-Id: I003097a68f17d4ec7ea8dee2e9638d8708770276 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
26085c25 | 06-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
test: sysfs: Fix cppcoreguidelines-explicit-virtual-functions
``` /home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:54:5: error: annotate this function with 'override' or (rarely)
test: sysfs: Fix cppcoreguidelines-explicit-virtual-functions
``` /home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/sysfs.cpp:54:5: error: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override,-warnings-as-errors] ~FakeSysfsLed() ^ override ```
Change-Id: I5461d3aee9c22080d5b88fda6084e0a7419e369e Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|