History log of /openbmc/dbus-sensors/src/Utils.hpp (Results 1 – 14 of 14)
Revision Date Author Comments
# 556e04b8 01-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I81aff1005be025ddb4405f384513c8e5e20bf6f4
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I81aff1005be025ddb4405f384513c8e5e20bf6f4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 18b6186e 30-Jan-2025 Ed Tanous <ed@tanous.net>

Apply misc-include-cleaner fixes

misc-include-cleaner seems to have found a lot more things all of a
sudden. Unclear why the result has changed, but we can just fix the
issues.

Tested: Clang-tidy

Apply misc-include-cleaner fixes

misc-include-cleaner seems to have found a lot more things all of a
sudden. Unclear why the result has changed, but we can just fix the
issues.

Tested: Clang-tidy now passes. Code compiles.

Change-Id: Iab045cc183f0daef663b4d5ac901200a42807987
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 291c295b 14-Jan-2025 Patrick Rudolph <patrick.rudolph@9elements.com>

Utils: Improve debug print

Currently the log contains lines like:
"psusensor[1464]: Error getting [...]: retries left4294967295"

Make debug print more readable:
- Add missing space between 'retries

Utils: Improve debug print

Currently the log contains lines like:
"psusensor[1464]: Error getting [...]: retries left4294967295"

Make debug print more readable:
- Add missing space between 'retries left' and number of
remaining retries
- Skip printing leftover retries when retries is zero as it
would underflow

Change-Id: I467053b43642fffb58771e525b773e2f1a0c24f3
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.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 ...


# ef85e0bb 22-Feb-2024 Potin Lai <potin.lai@quantatw.com>

Utils: change OS state busname and objpath

Change the busname and object path of OS state interface.

This commit relies on the patch below:
[1] https://gerrit.openbmc.org/c/openbmc/x86-power-contro

Utils: change OS state busname and objpath

Change the busname and object path of OS state interface.

This commit relies on the patch below:
[1] https://gerrit.openbmc.org/c/openbmc/x86-power-control/+/69589

Change-Id: If2180db4a26a548934ef62fb4a16a6f2ed6f41eb
Signed-off-by: Potin Lai <potin.lai@quantatw.com>

show more ...


# 201a1015 03-Apr-2024 Ed Tanous <ed@tanous.net>

Add modernize-redundant-void-arg

Enable this check and fix the failures.

Change-Id: I89b13daf1161be40564367562bb9c8c0c459e1d0
Signed-off-by: Ed Tanous <ed@tanous.net>


# ea14f14a 19-Jan-2024 Patrick Williams <patrick@stwcx.xyz>

State.Chassis: update service name

Both phosphor-state-manager and x86-power-control have code that exposes
both the Chassis and Chassis0 bus names as a backwards compatibility
when multi-chassis su

State.Chassis: update service name

Both phosphor-state-manager and x86-power-control have code that exposes
both the Chassis and Chassis0 bus names as a backwards compatibility
when multi-chassis support was added. Switch to the numbered bus name,
which is expected to be the non-deprecated one.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0aeefc5d00cfd1fbb1c53f35fc2d2f067d97f11b

show more ...


# 16d6f17b 28-Jan-2024 George Liu <liuxiwei@ieisystem.com>

Utils: Remove unused getSensorConfiguration method

Since dbus sensor only uses the getSensorConfiguration method with the
`useCache` parameter, this patch removes the getSensorConfiguration
method t

Utils: Remove unused getSensorConfiguration method

Since dbus sensor only uses the getSensorConfiguration method with the
`useCache` parameter, this patch removes the getSensorConfiguration
method that does not use the `useCache` parameter.

Tested: built dbus-sensors successfully and it works fine with this
patch.

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I1730df517e115de0625cfcca561f08af1d053b46

show more ...


# 278e177f 11-Dec-2023 Tom Tung <shes050117@gmail.com>

HwmonTempMain: revert the type of bus and address back to uint64_t

In I546e967abae7c0fb9fca645867e3037046037647, the type of bus and
address in HwmonTempMain were updated to size_t.

However, in som

HwmonTempMain: revert the type of bus and address back to uint64_t

In I546e967abae7c0fb9fca645867e3037046037647, the type of bus and
address in HwmonTempMain were updated to size_t.

However, in some systems using i3c, the device name is composed by bus
number and the provisioned ID [1]. The provisioned ID is a 48-bit value
(MIPI I3C Basic, v1.1.1, section 5.1.4.1.1), which is greater than the
range of size_t on e.g. 32-bit ARM platforms. Thus, reverting the type
back to uint64_t.

[1] Linux in-turn uses this Provisioned ID to identify the device, and
exposes the Provisioned ID in the device name:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/i3c/master.c?h=v6.6#n1521

Tested:
- added unit test passed.
- can read temperature of the i3c devices from our system.

Change-Id: I6f0e73aaf5f8d28e4bdedbe85646373463f6707f
Signed-off-by: Tom Tung <shes050117@gmail.com>

show more ...


# 819eb323 07-Nov-2023 Thang Tran <thuutran@amperecomputing.com>

Correct the ending of Chassis On state

As defined in PDI the "CurrentPowerState" property of "Chassis"
interface has 4 options[1]:
- On
- Off
- TransitioningToOn
- TransitioningToOff

[1]: https://g

Correct the ending of Chassis On state

As defined in PDI the "CurrentPowerState" property of "Chassis"
interface has 4 options[1]:
- On
- Off
- TransitioningToOn
- TransitioningToOff

[1]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/2794e9510f3d7872fc7485da793b50d02e0580a7/yaml/xyz/openbmc_project/State/Chassis.interface.yaml

If the ending of "CurrentPowerState" property is "On", it can be "On" or
"TransitioningToOn" option. Therefore, the ending of "CurrentPowerState"
property has to be ".On" to indicate that Chassis's state is On.

Change-Id: Idaede2f433542ba0332667bef48aad723ca55c99
Signed-off-by: Thang Tran <thuutran@amperecomputing.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 ...


# 03d333e0 23-Aug-2023 Akshit Shah <shahakshit@google.com>

dbus-sensors: utils: Utility to get device bus & addr from dev name.

This is applicable to all the services which rely on "bus-addr" fmt.
1. FanSensor
2. HwmonTempSensor
3. IntelCPUSensor
4. PSUSens

dbus-sensors: utils: Utility to get device bus & addr from dev name.

This is applicable to all the services which rely on "bus-addr" fmt.
1. FanSensor
2. HwmonTempSensor
3. IntelCPUSensor
4. PSUSensor

In addition this would also fix Fansensor Daemon crashes due to
stoi() exceptions weren't caught earlier.

For example: In a FanSensor Daemon -
Device of f0103000.pwm-fan-controller would be classified as i2cfan
based on new way of defining fan type.
Hence when we parse string for bus-addr, bus=f0103000.pwm and
addr=fan-controller for which stoi() would crash.
This would be true for all non I2c devices defaulting to I2cFan type.

Solution is to use 'std::from_chars' which handles under/overflow
properly. Centralizing this now in Utils would also allow us to manage
this appropriatelty across various services.

Tested:
Tested sanity of all daemons in the system and they work as expected.

Change-Id: I546e967abae7c0fb9fca645867e3037046037647
Signed-off-by: Akshit Shah <shahakshit@google.com>

show more ...


# 779c96a2 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: I0d10afa582342818b9d90b168f6f39f71ce4e0f4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
[AJ: regenerate using .clang-format from openbmc/docs@f44abd66eca8]
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

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 ...