#
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 ...
|
#
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 ...
|
#
eacbfdd1 |
| 04-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Enable misc-include-cleaner
Change-Id: I22099a0f95b2eb884dec7d95cee0bdd0c159fd1f Signed-off-by: Ed Tanous <ed@tanous.net>
|
#
b0dff227 |
| 27-Sep-2023 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
fanSensor: Fix pwmsensors space-naming probe error
The rule of sensors' name in dbus-sensor should ignore the discrepancy by changing all spaces to underscores. However, pwmName in pwmsensors doesn'
fanSensor: Fix pwmsensors space-naming probe error
The rule of sensors' name in dbus-sensor should ignore the discrepancy by changing all spaces to underscores. However, pwmName in pwmsensors doesn't undergo the process before construction.
Add escapePathForDbus() to change " " to "_" and prevent fansensor from receiving an invalid argument error.
Tested: Get fan pwm/tach by dbus introspect
Change-Id: I0489b03ffd105218e7492cf732eecadee57b08cd Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|
#
597e8423 |
| 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: I73acd9daf41b52bcc3f6af9a1c38c5f162ae76b2 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
e73bd0a1 |
| 24-Jan-2023 |
Andrew Jeffery <andrew@aj.id.au> |
sensors: Align source structure away from anti-patterns
The anti-patterns document comments on source structure, specifically on placing internal headers in a parallel subtree[1]. dbus-sensors is an
sensors: Align source structure away from anti-patterns
The anti-patterns document comments on source structure, specifically on placing internal headers in a parallel subtree[1]. dbus-sensors is an example of violating this anti-pattern, so fix it.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#placing-internal-headers-in-a-parallel-subtree
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I50ecaddd53fa9c9b7a0441af9de5e60bd94e47c6
show more ...
|
#
ead7e927 |
| 08-Dec-2022 |
David Wang <davidwang@quantatw.com> |
pwmsensor: Correct the type of MaxValue/MinValue
The MaxValue/MinValue must be double so that redfish can read the value
Before: { "@odata.id": "/redfish/v1/Chassis/<chassis>/Thermal#/Fans/0",
pwmsensor: Correct the type of MaxValue/MinValue
The MaxValue/MinValue must be double so that redfish can read the value
Before: { "@odata.id": "/redfish/v1/Chassis/<chassis>/Thermal#/Fans/0", "@odata.type": "#Thermal.v1_3_0.Fan", "MemberId": "fan0_pwm", "Name": "fan0 pwm", "Reading": 25, "ReadingUnits": "Percent", "Status": { "Health": "OK", "State": "Enabled" } },
After: { "@odata.id": "/redfish/v1/Chassis/<chassis>/Thermal#/Fans/0", "@odata.type": "#Thermal.v1_3_0.Fan", "MaxReadingRange": 100, "MemberId": "fan0_pwm", "MinReadingRange": 0, "Name": "fan0 pwm", "Reading": 90, "ReadingUnits": "Percent", "Status": { "Health": "OK", "State": "Enabled" } },
ref: https://github.com/openbmc/phosphor-dbus-interfaces/blob/a134741830/yaml/xyz/openbmc_project/Sensor/Value.interface.yaml#L27-L36
Signed-off-by: David Wang <davidwang@quantatw.com> Change-Id: I2e1c94648d344988f23aef68fe7a70ad0d7ba3b8
show more ...
|
#
2049bd26 |
| 09-Jul-2022 |
Ed Tanous <edtanous@google.com> |
Clang-tidy-14 fixes
Do as the robot commands. All changes made automatically by tidy.
Tested: (Thanks Zhikui) Downloaded and run on system. Sensors scan normally.
Signed-off-by: Ed Tanous <edtan
Clang-tidy-14 fixes
Do as the robot commands. All changes made automatically by tidy.
Tested: (Thanks Zhikui) Downloaded and run on system. Sensors scan normally.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I752f37c9e7a95aa3be8e6980ba6e4b2b48b3395a
show more ...
|
#
bb67932a |
| 16-May-2022 |
Ed Tanous <edtanous@google.com> |
Apply LambdaBodyIndentation to dbus-sensors
Per the transform being done in bmcweb, do the same for dbus-sensors.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If21489607759f3cdf20fad17
Apply LambdaBodyIndentation to dbus-sensors
Per the transform being done in bmcweb, do the same for dbus-sensors.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If21489607759f3cdf20fad17eede50fb4e228e5e
show more ...
|
#
3291b9c7 |
| 29-Jul-2021 |
Jie Yang <jjy@google.com> |
Sensor mutability interface
We proposed a ValueMutablity interface in openbmc/phosphor-dbus-interfaces which was accepted here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/
Sensor mutability interface
We proposed a ValueMutablity interface in openbmc/phosphor-dbus-interfaces which was accepted here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/36333
It follows the IPMI fashion, checking the sensor mutability before writing sensor values. The sensor mutability used to be hardcoded in the ipmi sensor map yaml file.
This provides feature parity with that old YAML hardcoded "mutability: Mutability::Write|Mutability::Read" setting.
As an example of implementation within dbus-sensors, ExternalSensor always sets Mutable to true, given its purpose of accepting sensor writes from an external source. PwmSensor accepts the "Mutable" parameter, from entity-manager configuration (aka JSON file). All other sensors always set Mutable to false, but it would be straightforward to add similar code, like what was done for PwmSensor, when mutability is desired.
This parameter will be used by the IPMI server here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/45407
There is currently no Redfish equivalent, although that would be a welcome task for the future. This is not IPMI-specific, as the Redfish server can also use this as a hint, as to whether to allow read-write access, or merely to allow read-only access.
This is not to be confused with the "manufacturing mode" option, which is designed for use during manufacturing test, hence its name. This feature is designed for production, and is intended to allow just a few sensors to be writable, without needing to make them all writable.
Tested: DBus call on fan sensors with configurable tree mutability: busctl introspect xyz.openbmc_project.FanSensor /xyz/openbmc_project/sensors/fan_pwm/fan0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS ... xyz.openbmc_project.Sensor.Value interface - - - .MaxValue property x 100 emits-change .MinValue property x 0 emits-change .Unit property s "xyz.openbmc_project.Sensor.Value.Uni... emits-change .Value property d 42.7451 emits-change writable xyz.openbmc_project.Sensor.ValueMutability interface - - - .Mutable property b true emits-change ...
DBus call on external sensors: busctl introspect xyz.openbmc_project.ExternalSensor /xyz/openbmc_project/sensors/tempera NAME TYPE SIGNATURE RESULT/VALUE FLAGS ... xyz.openbmc_project.Sensor.Value interface - - - .MaxValue property d 127 emits-change .MinValue property d -128 emits-change .Unit property s "DegreesC" emits-change .Value property d nan emits-change writable xyz.openbmc_project.Sensor.ValueMutability interface - - - .Mutable property b true emits-change ...
The ValueMutability interface, with "Mutable", is correctly created.
Signed-off-by: Jie Yang <jjy@google.com> Change-Id: Ifa1cb51bb55cd6f00d2a2f79e9064d1a51354b06 Signed-off-by: Josh Lehan <krellan@google.com>
show more ...
|
#
26601e89 |
| 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9e474f2b3e936b9961eaa08693744c466736e768
|
#
6b6891c5 |
| 22-Apr-2021 |
Zev Weiss <zev@bewilderbeest.net> |
Add Unit property to dbus interfaces
Previously, the lack of the Unit property on the Value interfaces provided by dbus-sensors meant that readings from its sensors weren't displayed in phosphor-web
Add Unit property to dbus interfaces
Previously, the lack of the Unit property on the Value interfaces provided by dbus-sensors meant that readings from its sensors weren't displayed in phosphor-webui/webui-vue. Here it's added as an extra parameter to setInitialProperties, allowing sensors that handle multiple types of data (e.g. IpmbSensor, PSUSensor) to determine the appropriate string to pass once they've had time to determine that.
Tested: PSUSensor, ADCSensor, CPUSensor, TachSensor, and HwmonTempSensor all have an appropriate Unit property available on dbus, and are displayed in webui-vue.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: I5e6df74cc42d9fb84852c5bf3ea5d3b383a16cdc
show more ...
|
#
8a57ec09 |
| 09-Oct-2020 |
Ed Tanous <ed@tanous.net> |
add clang-tidy
This commit implements a clang-tidy file, and makes some changes to get it to pass. Most changes are naming or mechanical in nature.
Tested: Clang-tidy now passes.
Signed-off-by: E
add clang-tidy
This commit implements a clang-tidy file, and makes some changes to get it to pass. Most changes are naming or mechanical in nature.
Tested: Clang-tidy now passes.
Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: Ia441e4801b6c8725421d160c531c5df141f255d4
show more ...
|
#
6e6ac0f8 |
| 31-Dec-2020 |
Josh Lehan <krellan@google.com> |
dbus-sensors: PwmSensor math types cleanup
Cleaned up types during math to avoid precision loss. Integer pwmMax and associated constants now double. Avoid floating-point comparison, convert to int f
dbus-sensors: PwmSensor math types cleanup
Cleaned up types during math to avoid precision loss. Integer pwmMax and associated constants now double. Avoid floating-point comparison, convert to int first. Corrected rounding from float to int. Property setter now ignores floating-point NaN.
Rounding done more consistently and correctly now. In some edge cases, the fan PWM setting will be different from what it was before, because rounding is now proper instead of truncating.
Tested: Swept fans from 0.0 to 100.0 percent, stepping by 0.1 each time, to exercise all values between 0 and 255. Behavior now seems more correct to me. Also set NaN, and it was properly ignored. Also tested on the uint64_t interface, swept from 0 to 255, each value mapped cleanly to equivalent floating-point value.
Not tested on "PSU" fans. These are a special case, as the integers in the underlying file range from 0 to 100, not 0 to 255. The original logic to handle these remains unchanged, however.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Ibc9ad978c1567bb2e7116e00d84e43b4ae22e664
show more ...
|
#
ed3e946c |
| 24-Sep-2020 |
James Feist <james.feist@linux.intel.com> |
Fix PSU PWM fan control
105a19754f003956def5934612b1de86225a4bc1 broke the control interface range as the interface is supposed to accept 0-255 fix it.
Tested: PSU PID control worked again
Change-
Fix PSU PWM fan control
105a19754f003956def5934612b1de86225a4bc1 broke the control interface range as the interface is supposed to accept 0-255 fix it.
Tested: PSU PID control worked again
Change-Id: I89c03c3382b221256353cc28b1f182c80a063249 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
105a1975 |
| 28-Aug-2020 |
Kuiying Wang <kuiying.wang@intel.com> |
Fix PSU pwm issue.
PSU pwm value range is 0-100, which is not same with system fan 0-255. There is an issue when PID to change the PSU pwm based on percentage.
Tested: PSU pwm just allowed 0-100. P
Fix PSU pwm issue.
PSU pwm value range is 0-100, which is not same with system fan 0-255. There is an issue when PID to change the PSU pwm based on percentage.
Tested: PSU pwm just allowed 0-100. PSU fan speed is runing as expected based on the percentage.
Change-Id: I3ae591828f5b0d85ab6358af666e4f2ab2e0a447 Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
show more ...
|
#
38fb5983 |
| 28-May-2020 |
James Feist <james.feist@linux.intel.com> |
Update clang format
Update to clang-format-10
Change-Id: I7fcab706fb384e5fcc07a06c42897a5ddbc4b511 Signed-off-by: James Feist <james.feist@linux.intel.com>
|
#
d9d8cafc |
| 27-Feb-2020 |
AppaRao Puli <apparao.puli@linux.intel.com> |
Add chassis and inventory associations to PSU Pwm
PSU pwm sensors are not associated with chassis base board object path. This causes the PSU pwm sensors not list under chassis redfish object. Added
Add chassis and inventory associations to PSU Pwm
PSU pwm sensors are not associated with chassis base board object path. This causes the PSU pwm sensors not list under chassis redfish object. Added chassis base board path and inventory object path associations to PSU Pwm Sensors.
Tested: Get on redfish chassis/<chassis id>/Thermal and chassis/<chassis id>/sensors redfish URI shows PSU Pwm sensors.
Change-Id: Ia862ecff058ca43fee38a6f71bdd57f8c135aae2 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
show more ...
|
#
fbb44ad1 |
| 08-Nov-2019 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
fix warnings
Fix a couple warnings so we can use meson warning level 3. Instances of the following warnings are found and resolved:
Wreorder Wsign-compare
Change-Id: Ia223b42aa6bf743cfa0e7042
fix warnings
Fix a couple warnings so we can use meson warning level 3. Instances of the following warnings are found and resolved:
Wreorder Wsign-compare
Change-Id: Ia223b42aa6bf743cfa0e7042cc3d5a18977459be Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
#
96e97db7 |
| 31-Oct-2019 |
Patrick Venture <venture@google.com> |
src: add missing headers
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I6043ef792c2ce0a8e7584a73f83ca365ec61794d
|
#
b2651e7a |
| 11-Oct-2019 |
Patrick Venture <venture@google.com> |
pwmsensor: drop unnecessary return
[src/PwmSensor.cpp:133]: (style) Consecutive return, break, continue, goto or throw statements are unnecessary.
Signed-off-by: Patrick Venture <venture@google.com
pwmsensor: drop unnecessary return
[src/PwmSensor.cpp:133]: (style) Consecutive return, break, continue, goto or throw statements are unnecessary.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I115285c10a8e38f19c300edab789223da05a2fa6
show more ...
|
#
2adc95cb |
| 30-Sep-2019 |
James Feist <james.feist@linux.intel.com> |
Fix Association interface
Mapper changed to only allow the new interface, update to it.
Tested: Mapper showed all associations
Change-Id: I8b252c70e9f27b083a438393c731fbeb3e2ca0e5 Signed-off-by: J
Fix Association interface
Mapper changed to only allow the new interface, update to it.
Tested: Mapper showed all associations
Change-Id: I8b252c70e9f27b083a438393c731fbeb3e2ca0e5 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
3a07f558 |
| 27-Aug-2019 |
James Feist <james.feist@linux.intel.com> |
Default pwm speed to 30%
Before fan control writes pwm, we were seeing some pwm below the critcal level, make sure they start somewhere nice.
Tested: systemctl disable phosphor-pid-control, no 0 pw
Default pwm speed to 30%
Before fan control writes pwm, we were seeing some pwm below the critcal level, make sure they start somewhere nice.
Tested: systemctl disable phosphor-pid-control, no 0 pwm
Change-Id: I789b25db64fff2f69e0c5a3ee0aef16a0cb0ddae Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
b6c0b914 |
| 09-Jul-2019 |
James Feist <james.feist@linux.intel.com> |
Turn on a bunch of warnings
Turn on as many warnings as easily possible from: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md
Turn on a bunch of warnings
Turn on as many warnings as easily possible from: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Tested: ipmitool sensor list still works
Change-Id: Ied8fa66de9fcd25e448f8048c4f8216b426b6f55 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
916360b8 |
| 07-May-2019 |
Cheng C Yang <cheng.c.yang@linux.intel.com> |
Add PSU PWM sensor to support FSC
Add PSU PWM sensor to allow FSC control PSU fan pwm.
Tested: Change property Target to 100 in dbus interface xyz.openbmc_project.Control.FanPwm path /xyz/openbmc_p
Add PSU PWM sensor to support FSC
Add PSU PWM sensor to allow FSC control PSU fan pwm.
Tested: Change property Target to 100 in dbus interface xyz.openbmc_project.Control.FanPwm path /xyz/openbmc_project/control/fanpwm/Pwm_PSU1_Fan_1, the value in /sys/class/hwmon/hwmonx/fan1_target also become 100, and value property in interface /xyz/openbmc_project/sensors/fan_pwm/Pwm_PSU1_Fan_1 become 39.2157
Run ipmitool sensor list, bellow sensors will show like: Pwm PSU1 Fan 1 | 39.200 | unspecified | ok | na | na | na | na | na | na Pwm PSU2 Fan 1 | 0.000 | unspecified | ok | na | na | na | na | na | na
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com> Change-Id: I6a4d50912a190297dbcf4a4e5c511607f71cb0c0
show more ...
|