#
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 ...
|
#
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 ...
|
#
8e85228c |
| 06-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
sysfs: Fix several clang-tidy issues
* cppcoreguidelines-avoid-c-arrays * cppcoreguidelines-pro-bounds-array-to-pointer-decay * readability-identifier-naming
``` ../sysfs.hpp:45:28: error: do not d
sysfs: Fix several clang-tidy issues
* cppcoreguidelines-avoid-c-arrays * cppcoreguidelines-pro-bounds-array-to-pointer-decay * readability-identifier-naming
``` ../sysfs.hpp:45:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors] static constexpr const char BRIGHTNESS[] = "brightness"; ^ /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:45:33: error: invalid case style for variable 'BRIGHTNESS' [readability-identifier-naming,-warnings-as-errors] static constexpr const char BRIGHTNESS[] = "brightness"; ^~~~~~~~~~ brightness /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:46:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors] static constexpr const char MAX_BRIGHTNESS[] = "max_brightness"; ^ /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:46:33: error: invalid case style for variable 'MAX_BRIGHTNESS' [readability-identifier-naming,-warnings-as-errors] static constexpr const char MAX_BRIGHTNESS[] = "max_brightness"; ^~~~~~~~~~~~~~ maxBrightness /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:47:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors] static constexpr const char TRIGGER[] = "trigger"; ^ /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:47:33: error: invalid case style for variable 'TRIGGER' [readability-identifier-naming,-warnings-as-errors] static constexpr const char TRIGGER[] = "trigger"; ^~~~~~~ trigger /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:48:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors] static constexpr const char DELAY_ON[] = "delay_on"; ^ /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:48:33: error: invalid case style for variable 'DELAY_ON' [readability-identifier-naming,-warnings-as-errors] static constexpr const char DELAY_ON[] = "delay_on"; ^~~~~~~~ delayOn /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:49:28: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors] static constexpr const char DELAY_OFF[] = "delay_off"; ^ /home/andrew/src/openbmc/phosphor-led-sysfs/build/../sysfs.hpp:49:33: error: invalid case style for variable 'DELAY_OFF' [readability-identifier-naming,-warnings-as-errors] static constexpr const char DELAY_OFF[] = "delay_off"; ^~~~~~~~~ delayOff ../test/sysfs.cpp:62:46: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors] std::array<const char *, 4> attrs = {BRIGHTNESS, TRIGGER, DELAY_ON, DELAY_OFF}; ^ ../test/sysfs.cpp:62:58: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors] std::array<const char *, 4> attrs = {BRIGHTNESS, TRIGGER, DELAY_ON, DELAY_OFF}; ^ ../test/sysfs.cpp:62:67: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors] std::array<const char *, 4> attrs = {BRIGHTNESS, TRIGGER, DELAY_ON, DELAY_OFF}; ^ ../test/sysfs.cpp:62:77: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors] std::array<const char *, 4> attrs = {BRIGHTNESS, TRIGGER, DELAY_ON, DELAY_OFF}; ^ ```
Change-Id: I1df5f9b9f6a8c2073a0bc04ea5f88c580e2cb1b9 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
659dc287 |
| 07-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
physical: Fix cert-dcl59-cpp
``` ../physical.hpp:19:1: error: do not use unnamed namespaces in header files [cert-dcl59-cpp,-warnings-as-errors] namespace ^ ```
Change-Id: I8e663e42604c9f813c3f8feb
physical: Fix cert-dcl59-cpp
``` ../physical.hpp:19:1: error: do not use unnamed namespaces in header files [cert-dcl59-cpp,-warnings-as-errors] namespace ^ ```
Change-Id: I8e663e42604c9f813c3f8febeb7e5bdb6ac0262b Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
478d0a71 |
| 06-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
physical: Fix cppcoreguidelines-pro-type-member-init
``` /home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.hpp:48:5: error: constructor does not initialize these fields: assert [cppcoreg
physical: Fix cppcoreguidelines-pro-type-member-init
``` /home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.hpp:48:5: error: constructor does not initialize these fields: assert [cppcoreguidelines-pro-type-member-init,-warnings-as-errors] Physical(sdbusplus::bus_t& bus, const std::string& objPath, SysfsLed& led, ^ ```
Change-Id: I1e05ee113132fa39d0590897a1e3e0977c6ceecb Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
c060c287 |
| 06-Feb-2023 |
Andrew Jeffery <andrew@aj.id.au> |
physical: Fix cppcoreguidelines-explicit-virtual-functions
``` /home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.hpp:32:5: error: annotate this function with 'override' or (rarely) 'fina
physical: Fix cppcoreguidelines-explicit-virtual-functions
``` /home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.hpp:32:5: error: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions,modernize-use-override,-warnings-as-errors] ~Physical() = default; ^ override ```
Change-Id: I0f631ec59c8b3035f085fe475465d4fb09183632 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
ff3d538b |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I44db990b2509a639c17765e7db10314ed858bd4d
show more ...
|
#
97db22fd |
| 30-Mar-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8f609948cb7ce65f3adb611ddd6eafa0bf4f486a
show more ...
|
#
db21bc00 |
| 26-Mar-2021 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Add test cases to validate state of physical LED This commit adds code that verifies the state of physical LED is appropriately set in various cases Change-Id: I9eab752f6f2b47e7
Add test cases to validate state of physical LED This commit adds code that verifies the state of physical LED is appropriately set in various cases Change-Id: I9eab752f6f2b47e719934c14ef95e775d36bcaa0 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
#
61b90636 |
| 21-Jun-2020 |
George Liu <liuxiwei@inspur.com> |
clang-format: update to latest from docs repo Since `Cpp11` is an alias for `Latest` and we should tend towards using the latest C++ standard, update the C++ standard to Latest.
clang-format: update to latest from docs repo Since `Cpp11` is an alias for `Latest` and we should tend towards using the latest C++ standard, update the C++ standard to Latest. https://github.com/llvm/llvm-project/commit/e5032567903de19962333c4bf7d2edceaf4f9824#diff-b49a097415dff2837d9626d422c58ba8R82 https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Id5684236b64867ba631a3a00dadababe2c36db16
show more ...
|
#
9e500aa8 |
| 22-Apr-2019 |
tony lee <tony.lee@quantatw.com> |
Fix an issue and read Period from D-bus 1. Change the order of setTrigger(), setDelayOn() and setDelayOff(), because delay_on and delay_off were only displayed after the setTrigger()
Fix an issue and read Period from D-bus 1. Change the order of setTrigger(), setDelayOn() and setDelayOff(), because delay_on and delay_off were only displayed after the setTrigger() was excuted. 2. Read Period from D-bus instead of "periodMs = 1000" when the blinkOperation() was excuted. Change-Id: Ia1ed328aa986be9ccc4072a4a5b48da4a07978db Signed-off-by: tony lee <tony.lee@quantatw.com>
show more ...
|
#
97ddb723 |
| 16-Apr-2019 |
Alexander Soldatov <a.soldatov@yadro.com> |
Add ability to set LED colors in DBus phosphor-led-sysfs parses sysfs LED node names in the form of "devicename:colour:function" as described in https://github.com/torvalds/
Add ability to set LED colors in DBus phosphor-led-sysfs parses sysfs LED node names in the form of "devicename:colour:function" as described in https://github.com/torvalds/linux/blob/master/Documentation/leds/leds-class.txt#L46 and then converts the "colour" part into the proper value of the DBus 'Color' property using the xyz.openbmc_project.Led.Physical.Palette interface. In order for the led nodes to have their Color set, the corresponding led nodes in devicetree must have correct 'label' properties, e.g.: leds { compatible = "gpio-leds"; heartbeat { label = "bmc:green:hearbeat"; gpios = <&gpio ASPEED_GPIO(R, 4) GPIO_ACTIVE_LOW>; }; power_red { label = "system:red:power"; gpios = <&gpio ASPEED_GPIO(N, 1) GPIO_ACTIVE_LOW>; }; } Change-Id: I094f0e434bdd262995752576a3c792ccd5dbb3e2 Signed-off-by: Alexander Soldatov <a.soldatov@yadro.com> Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
show more ...
|
#
5b1417bd |
| 18-Mar-2019 |
Andrew Jeffery <andrew@aj.id.au> |
physical: Conform to LED class kernel ABI The kernel says the following about the LED sysfs interface: > LED handling under Linux > ======================== > > In its s
physical: Conform to LED class kernel ABI The kernel says the following about the LED sysfs interface: > LED handling under Linux > ======================== > > In its simplest form, the LED class just allows control of LEDs from > userspace. LEDs appear in /sys/class/leds/. The maximum brightness of the > LED is defined in max_brightness file. The brightness file will set the brightness > of the LED (taking a value 0-max_brightness). Most LEDs don't have hardware > brightness support so will just be turned on for non-zero brightness settings. The existing code assumed that max_brightness always held a value of 255 and defined a constant for it. Instead, use a class variable to cache the max brightness for the associated LED. Change-Id: I2d8f46de0cddac5f9d8ff5444449518bb4056130 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
e5c40fea |
| 25-May-2018 |
Andrew Jeffery <andrew@aj.id.au> |
physical: 'frequency' is really periodicity Change-Id: I1007d2a7104fa07351c89c52a860cde83b2d509c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
aee9c2c4 |
| 24-May-2018 |
Andrew Jeffery <andrew@aj.id.au> |
test: physical: Hit both branches of stableStateOperation() Change-Id: Ic32d87dbe996a03e811e1be88fbcc00bf450e1f3 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
42e02d34 |
| 23-May-2018 |
Andrew Jeffery <andrew@aj.id.au> |
sysfs: Integrate class into Physical and tests Change-Id: I7d5ad19df5ef1258a4e669ea3243b7411f371d9c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
c41bf5b7 |
| 25-May-2018 |
Andrew Jeffery <andrew@aj.id.au> |
Add OpenBMC C++ clang-format file and format code Change-Id: Ib3a388bf5392159440682265b577fba023c3c3aa Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
e089173f |
| 10-Mar-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Link to dbus interfaces library for using generated code Change-Id: Id1c45d8c66deb499a92bfd94bc271f378245da34 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
|
#
61675c32 |
| 30-Nov-2016 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Add methods to trigger action on LED Implements the ON, OFF and BLINK operations on a given LED. Change-Id: I74b5ac01d8e76961999a2673d52d73296f5603d7 Signed-off-by: Vishwanatha
Add methods to trigger action on LED Implements the ON, OFF and BLINK operations on a given LED. Change-Id: I74b5ac01d8e76961999a2673d52d73296f5603d7 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
#
75b5510f |
| 30-Nov-2016 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Add overriding methods for the base interface definition Defines the functions that override the default setter for the led state property. Change-Id: Ic3a8d43cc783003c43f53df8f
Add overriding methods for the base interface definition Defines the functions that override the default setter for the led state property. Change-Id: Ic3a8d43cc783003c43f53df8f7e90d7fc4d6715a Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
#
bda97eb1 |
| 30-Nov-2016 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Use generated bindings for physical led controller Extends the generated interface and provides skeleton implementation of led controller. Change-Id: I13485f39755213b8a7324e526d
Use generated bindings for physical led controller Extends the generated interface and provides skeleton implementation of led controller. Change-Id: I13485f39755213b8a7324e526d6335f3ee0a2b67 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|