d7be555e | 19-Sep-2024 |
George Liu <liuxiwei@ieisystem.com> |
Move source files into application-specific sub-directories
Currently, dbus-sensors implement multiple applications: - psusensor - adcsensor - intelcpusensor - hwmontempsensor - ipmbsensor - n
Move source files into application-specific sub-directories
Currently, dbus-sensors implement multiple applications: - psusensor - adcsensor - intelcpusensor - hwmontempsensor - ipmbsensor - nvmesensor - externalsensor - mcutempsensor - intrusionsensor - fansensor - exitairtempsensor
This commit is to create separate directories for each application so that things can be separated more easily and the files are smaller, instead of creating one huge file for the sensor implementation.
There was some discussion in discord on this. [1][2]
[1]: https://discord.com/channels/775381525260664832/1187158775438778408/1284106093756289067 [2]: https://discord.com/channels/775381525260664832/867820390406422538/1303217796821553214
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I258fc2ee7d8f939c7b83a07350395e78775b2b8d
show more ...
|
5b74aba7 | 06-Sep-2024 |
Yikai Tsai <yikai.tsai.wiwynn@gmail.com> |
PSUSensor: add ISL28022 support
Add device ISL28022 reading support.
Tested: Get ISL28022 reading from PSUSensor by dbus introspect.
Change-Id: I0260edd5bf967aee13f7d94297eff56ce285686f Signed-off
PSUSensor: add ISL28022 support
Add device ISL28022 reading support.
Tested: Get ISL28022 reading from PSUSensor by dbus introspect.
Change-Id: I0260edd5bf967aee13f7d94297eff56ce285686f Signed-off-by: Yikai Tsai <yikai.tsai.wiwynn@gmail.com>
show more ...
|
cb5139dc | 24-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sensorpaths: adjust case for 'utilization'
The path case 'Utilization' doesn't match the dbus specifications. This issue was reported on Discord[1]. Change to lowercase to match the rest of the pat
sensorpaths: adjust case for 'utilization'
The path case 'Utilization' doesn't match the dbus specifications. This issue was reported on Discord[1]. Change to lowercase to match the rest of the paths and the specifications.
[1]: https://discord.com/channels/775381525260664832/1187158775438778408/1298446074738118797
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I16cf1f9dc327cce0ea14b252f41c55eff73ead9a
show more ...
|
83929002 | 06-Mar-2024 |
Chris Cain <cjcain@us.ibm.com> |
Move GPIO presence object to its own files
This commit moves and renames the PresenceSensor to PresenceGpio from TachSensors to its own file so that it can be used for more than just fans. It is cur
Move GPIO presence object to its own files
This commit moves and renames the PresenceSensor to PresenceGpio from TachSensors to its own file so that it can be used for more than just fans. It is currently only used for GPIO presence monitoring for fans.
This commit maintains the same functionality as the original code. Once the objects is created for a GPIO, it will be monitoring for gpiod::line_request::EVENT_BOTH_EDGES changes. The user can call isPresent() anytime to read the presence status.
Interface: EventPresenceGpio(const std::string& iDeviceType, const std::string& iDeviceName, const std::string& gpioName, bool inverted, boost::asio::io_context& io); Sample usage: presenceGpio = std::make_unique<EventPresenceGpio>( "Fan", "Fan4b", "FAN4_PRESENCE_R_N", true, io); if (presenceGpio->isPresent()) { // Fan is present }
Testing: Unable to test this update because no hardware supporting event driven GPIO detection available.
Change-Id: I1f1a4cbab39d3e3ab38b30288f6aa199ee0cfe3c Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
416c96a6 | 19-Sep-2024 |
Chau Ly <chaul@amperecomputing.com> |
psusensor: Check active state before activation
The activate() function of PSUSensor is not only called in the sensor's constructor, but also directly from outside by the createSensors() function in
psusensor: Check active state before activation
The activate() function of PSUSensor is not only called in the sensor's constructor, but also directly from outside by the createSensors() function in PSUSensorMain in case of a power state change. The power state change matches include watches on both chassis state and host state, which will be triggered more than one on a power change. This works fine for PSU sensors which are present in the off state of host. However, as the sensor type list expands to support more drivers that function the same way, some types are not available during host-off. Therefore, when host goes off and on again, those sensors will be activated repeatedly following the power change signal and cause error on inputDev, leading to coredump [1].
This commit checks activation state of a sensor before activating it.
Tested:
1. Configure one PSU sensor with "PowerState": "On" in EM 2. BMC boots with host On 3. Turn off host 4. Turn on host => No coredump, the sensor is successfully activated and runs again
[1] Journal log: psusensor: terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>'
psusensor: what(): open: Already open [asio.misc:1 at /usr/include/boost/asio/detail/impl/io_uring_file_service.ipp:53:5 in function 'boost::system::error_code boost::asio::detail::io_uring_file_service::open(implementation_type&, const char*, boost::asio::file_base::flags, boost::system::error_code&)']
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I0e02ea9973112ad56cf92a250aca7dc71d0893e2
show more ...
|
c4ddf64d | 09-Jul-2024 |
Chau Ly <chaul@amperecomputing.com> |
PSUSensor: Add smpro-hwmon sensor type
This commit adds smpro-hwmon driver as a new sensor type to the type list of PSUSensor, as they have the same sysfs appearances and the same way to read sensor
PSUSensor: Add smpro-hwmon sensor type
This commit adds smpro-hwmon driver as a new sensor type to the type list of PSUSensor, as they have the same sysfs appearances and the same way to read sensors.
But as there are 3 different drivers applied for the smpro MFD devices of Ampere (smpro-hwmon is one). The hwmon path result from smpro-hwmon will be different from other pmbus drivers that have device path points directly to the i2c device path. The current implementation of PSUSensor to get i2c bus, address only works for the later case, so this commit uses regex to look for it instead and makes it work for wider cases.
Example:
`root@mtjade:/sys/class/hwmon# ls -la hwmon8 hwmon9 hwmon8 -> ../../devices/platform/xxx/1e78a0c0.i2c-bus/i2c-2/2-004e/\ smpro-hwmon.3.auto/hwmon/hwmon8
hwmon9 -> ../../devices/platform/xxx/1e78a1c0.i2c-bus/i2c-6/6-0058/\ hwmon/hwmon9
root@mtjade:/sys/class/hwmon# ls -la hwmon8/device hwmon9/device hwmon8/device -> ../../2-004e/smpro-hwmon.3.auto hwmon9/device -> ../../../6-0058
Tested on Ampere's Mt.Jade platform: PSUSensor successfully maps Entity-Manager configurations with sysfs of smpro-hwmon sensors, and reads values.
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I0ea0828e8726719969071a18bb27115c7cc71a9f
show more ...
|
e1dcb5c1 | 21-Aug-2024 |
Yang Chen <yang.chen@quantatw.com> |
PwmSensor: Fix function getValue returns wrong data type
Function "getValue" is defined as uint32_t but returns -1 in some cases. Follow the function comment to change the return value from -1 to 0.
PwmSensor: Fix function getValue returns wrong data type
Function "getValue" is defined as uint32_t but returns -1 in some cases. Follow the function comment to change the return value from -1 to 0.
Change-Id: Ifd228c94e4ebe14d9bdea953506d17371f9e5f79 Signed-off-by: Yang Chen <yang.chen@quantatw.com>
show more ...
|
f2fc1b3e | 29-Aug-2024 |
Vikash Chandola <vikash.chandola@intel.com> |
psusensor: Check for present field before using
Using Present field in cpuPresenceHandler without checking for it's availability may lead to undefined behavior. Check for "Present" field presence in
psusensor: Check for present field before using
Using Present field in cpuPresenceHandler without checking for it's availability may lead to undefined behavior. Check for "Present" field presence in received signal message before using it.
Tested: psusensor rejected signals if "Present" field is absent.
Change-Id: I083f2c7cfb8b5208eebf85518f8859eee262cf58 Signed-off-by: Vikash Chandola <vikash.chandola@intel.com>
show more ...
|
10480779 | 13-Sep-2024 |
Hieu Huynh <hieuh@os.amperecomputing.com> |
HwmonTemp: add TMP468 support
Tested: Verified that HwmonTempSensor generates the TMP468 dbus object.
Change-Id: Ida22cb6050a510563c490246277f277c989a46eb Signed-off-by: Hieu Huynh <hieuh@os.ampere
HwmonTemp: add TMP468 support
Tested: Verified that HwmonTempSensor generates the TMP468 dbus object.
Change-Id: Ida22cb6050a510563c490246277f277c989a46eb Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com>
show more ...
|
72bd2735 | 31-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
clang-tidy: Remove redundant configuration
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Iccd1ec53f1f3e0e05291b6810b5ee644121714c3 |
77ae514b | 21-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: Id155ce5591163912ec496
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: Id155ce5591163912ec496cb9afa3ca34343c3f8c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
982d99f1 | 20-Aug-2024 |
Ian Chien <ianchien.wiwynn@gmail.com> |
PSUSensor: Add RTQ6056 supports
Add device RTQ6056 reading support. Test case: RTQ6056 can be read via PSU sensor service.
Change-Id: If7501d9e5cb95d2177b38fd7f89cafb221f26050 Signed-off-by: Ian Ch
PSUSensor: Add RTQ6056 supports
Add device RTQ6056 reading support. Test case: RTQ6056 can be read via PSU sensor service.
Change-Id: If7501d9e5cb95d2177b38fd7f89cafb221f26050 Signed-off-by: Ian Chien <ianchien.wiwynn@gmail.com>
show more ...
|
2aaf7175 | 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: Ib7af6345a7b9e858700bd81645fe87d9d7e9d0fb Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
8b34f2c9 | 16-Jul-2024 |
Patrick Rudolph <patrick.rudolph@9elements.com> |
TachSensor: Support multiple fans on the same GPIO
On IBM SBP1 two fans share the same enclosure, even though they can be controlled independently as they have two distinct I2C PWM controllers with
TachSensor: Support multiple fans on the same GPIO
On IBM SBP1 two fans share the same enclosure, even though they can be controlled independently as they have two distinct I2C PWM controllers with separate temperature sensors. The fan enclosure occupies only one GPIO for presence detection.
Allow the same presence GPIO to be used within multiple TachSensors.
TEST: Used the same GPIO on two I2CFans, both disappear when unplugged.
Change-Id: I946e4579a361f00512eb707d2e5eb3b9ec7f2a55 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
show more ...
|
00b305b9 | 29-Jul-2024 |
George Liu <liuxiwei@ieisystem.com> |
README.md: Fix MD025 warnings
The following warnings are generated by using markdownlint analysis: ``` MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Sens
README.md: Fix MD025 warnings
The following warnings are generated by using markdownlint analysis: ``` MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Sensor Type Documentation"] ``` Refer to markdown-lint [1] to fix MD025 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/025-single-h1.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ibb6361abd1da5afe9c0900242bc58546b4479a41
show more ...
|
084daf31 | 29-Jul-2024 |
George Liu <liuxiwei@ieisystem.com> |
README.md: 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: "```"]
README.md: 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: Ia2d19b88db5d82492f0b9a421f25bb933f041446
show more ...
|
c82a409f | 23-Jul-2024 |
Ian Chien <ianchien.wiwynn@gmail.com> |
PSUSensor: Add MAX11615 supports
Add device MAX11615 reading support. Test case: MAX11615 can be read via PSU sensor service.
Change-Id: I2127c749eb2c371050190bb0737d59a1975434da Signed-off-by: Ian
PSUSensor: Add MAX11615 supports
Add device MAX11615 reading support. Test case: MAX11615 can be read via PSU sensor service.
Change-Id: I2127c749eb2c371050190bb0737d59a1975434da Signed-off-by: Ian Chien <ianchien.wiwynn@gmail.com>
show more ...
|
8800c045 | 23-Jul-2024 |
Andrew Geissler <geissonator@yahoo.com> |
HwmonTemp: add TMP432 support
Tested: - Confirmed system with TMP432 showed expected temperatures
Change-Id: I3ce9c64c8b226731c8979de408998260c29615aa Signed-off-by: Andrew Geissler <geissonator@ya
HwmonTemp: add TMP432 support
Tested: - Confirmed system with TMP432 showed expected temperatures
Change-Id: I3ce9c64c8b226731c8979de408998260c29615aa Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
40baf774 | 03-Jul-2024 |
PavanKumarIntel <pavanx.kumar.martha@intel.com> |
Fix: Dimm Temp Sensor name change
Dimm names under /redfish/v1/Systems/system/Memory are not matching with dimm names under /redfish/v1/Chassis/<Baseboard>/Sensors
Tested: Before: "/redfish/v1
Fix: Dimm Temp Sensor name change
Dimm names under /redfish/v1/Systems/system/Memory are not matching with dimm names under /redfish/v1/Chassis/<Baseboard>/Sensors
Tested: Before: "/redfish/v1/Chassis/<Baseboard>/Sensors/ temperature_DIMM_A1_CPU1" After: "/redfish/v1/Chassis/<Baseboard>/Sensors/ temperature_CPU1_DIMM_A1"
Change-Id: Ia302d6907eacd3630121c75a1f04fb386ba57d67 Signed-off-by: PavanKumarIntel <pavanx.kumar.martha@intel.com>
show more ...
|
457715b6 | 10-Apr-2024 |
Patrick Rudolph <patrick.rudolph@9elements.com> |
PSUSensor: Fix CPU presence detection
Currently the CPU presence, indicated by 'CPURequired' property, is board specific and there are boards making use of 0 based and boards making use of 1 based C
PSUSensor: Fix CPU presence detection
Currently the CPU presence, indicated by 'CPURequired' property, is board specific and there are boards making use of 0 based and boards making use of 1 based CPU indices. It really doesn't matter as long as the inventory uses the same indices and the inventory is board specific as well.
Within dbus-sensors the indices read from the inventory are assumed to be 0 based in one place and 1 based in another place.
This patch addresses CPUs that define the CPURequired property. CPUs that don't have it were and are still unaffected and behavior is still the same.
For CPUs that define the value, it depends when the CPU presence was updated on dbus and when psusensors service was started. It's actually undefined behavior since dbus-sensors race with the CPU presence detection service.
- Fix that by always using the actual index read from the inventory, making dbus-sensors consistent within itself and support 0 and 1 based entity-manager configurations. - Fix parsing intelcpusensor provided presence since it has an underscore between 'cpu' and the digit.
Fixes PSU sensors missing for CPU0 when psusensors was started after the CPU presence was updated on dbus and the board had 0 based CPU indices in entity-manager configuration.
This change might regress on platforms when both conditions are true: - psusensors was started after CPU presence was updated on dbus - that use mixed indices (0 and 1 based) in inventory and entity-manager configuration
Change-Id: Ieeb5989ef819f2d0a4a2aa9b593cb25b30e0194e Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
show more ...
|
6e6618fa | 16-May-2024 |
Potin Lai <potin.lai@quantatw.com> |
PSUSensor: add RAA228004 support
Add support for Renesas RAA228004 controller.
Test results: 1. add RAA228004 sensor config in EM ``` { "Address": "0x60", "Bus": 19, "Labels": [
PSUSensor: add RAA228004 support
Add support for Renesas RAA228004 controller.
Test results: 1. add RAA228004 sensor config in EM ``` { "Address": "0x60", "Bus": 19, "Labels": [ "iout1", "pout1", "temp1", "vout1" ], "Name": "PDB_VR_P12V_N1_RAA228004", "Type": "RAA228004", "iout1_Name": "PDB_VR_P12V_N1_CURR_A", "pout1_Name": "PDB_VR_P12V_N1_PWR_W", "temp1_Name": "PDB_VR_P12V_N1_TEMP_C", "vout1_Name": "PDB_VR_P12V_N1_VOLT_V" } ```
2. check sensors is create by psusensors successfully ``` root@bmc:~# busctl tree xyz.openbmc_project.PSUSensor | grep PDB_VR_P12V_N1 │ ├─ /xyz/openbmc_project/State/Decorator/PDB_VR_P12V_N1_RAA228004_OperationalStatus │ ├─ /xyz/openbmc_project/sensors/current/PDB_VR_P12V_N1_CURR_A │ ├─ /xyz/openbmc_project/sensors/power/PDB_VR_P12V_N1_PWR_W │ ├─ /xyz/openbmc_project/sensors/temperature/PDB_VR_P12V_N1_TEMP_C ├─ /xyz/openbmc_project/sensors/voltage/PDB_VR_P12V_N1_VOLT_V ```
Change-Id: If64ca0e8cca2841877ebfafa30af88da5eae7834 Signed-off-by: Potin Lai <potin.lai@quantatw.com>
show more ...
|
8c13c283 | 02-Jul-2024 |
Allen.Wang <Allen_Wang@quantatw.com> |
PSUSensor: Add max11617 support
Add iio device max11617 reading support.
Change-Id: I5d76fab45dd40f231430c02456819e319832e706 Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com> |
e8a14e91 | 25-Oct-2023 |
cchoux <cosmo.chou@quantatw.com> |
psusensor: simplify the labelMatch table
It might be more efficient to simplify the labelMatch table by not listing all labels. PSUProperty of the same type are mostly the same, except for fan prope
psusensor: simplify the labelMatch table
It might be more efficient to simplify the labelMatch table by not listing all labels. PSUProperty of the same type are mostly the same, except for fan properties. Listing all labels can limit flexibility and necessitate table modifications when adding new properties. Simplifying the table could help alleviate these constraints.
Tested: (1) Sensors defined in "Labels" (e.g. tempN, powerN, fanN, ...) can be created successfully. (2) PWM sensors (/sys/class/hwmon/hwmonX/fanN_target) can be created with the names, "Pwm_PSUNAME_Fan_1", "Pwm_PSUNAME_Fan_2" ... (3) FanFault PSUSubEvents can be asserted.
Change-Id: I789cdd5c5d0c5c92cca45700bd2095c166bdc564 Signed-off-by: Cosmo Chou <cosmo.chou@quantatw.com>
show more ...
|
503c1468 | 17-Jun-2024 |
Patrick Williams <patrick@stwcx.xyz> |
OWNERS: update with template
The OWNERS file in this repository was never updated with the standard openbmc OWNERS template. Update it and fill out the information using data gleaned from other rep
OWNERS: update with template
The OWNERS file in this repository was never updated with the standard openbmc OWNERS template. Update it and fill out the information using data gleaned from other repositories.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibb96ba6f2a63e511f6cf19aa1536072f0ae74290
show more ...
|
d8e48df6 | 06-Jun-2024 |
Jeff Lin <JeffLin2@quantatw.com> |
PSUSensor: Add MPQ8785 support
Tested: We can get sensor reading from this driver.
Change-Id: Ibb507c9c77012dbb41292f78c4c69ed2548ba491 Signed-off-by: Jeff Lin <JeffLin2@quantatw.com> |