hwmon: (pmbus) Move pec attribute to I2C device
Subsystems (2)
Guenter Roeck
maintainerPATCH 1/1 hwmon: (pmbus) Move pec attribute to I2C device
Enabling and disabling PEC for PMBus devices is currently only supported with a debugfs attribute, which requires debugfs to be enabled and is thus less than perfect. Take the lm90 driver as example and add a 'pec' attribute to the I2C device if both the I2C adapter and the PMBus device support it. Remove the now obsolete 'pec' attribute from debugfs.
Cc Andrew Jeffery <[email protected]>
Signed-off-by Guenter Roeck <[email protected]>
--- Documentation/ABI/testing/sysfs-class-hwmon | 9 +++ Documentation/hwmon/pmbus-core.rst | 9 +++ drivers/hwmon/pmbus/pmbus_core.c | 89 ++++++++++++--------- 3 files changed, 68 insertions(+), 39 deletions(-)
Documentation/ABI/testing/sysfs-class-hwmon +9 -0
@@ -938,3 +938,12 @@ Description: - 1: enable RW + +What: /sys/class/hwmon/hwmonX/device/pec +Description: + PEC support on I2C devices + + - 0, off, n: disable + - 1, on, y: enable + + RW
Documentation/hwmon/pmbus-core.rst +9 -0
@@ -121,6 +121,15 @@ Specifically, it provides the following information. non-standard PMBus commands to standard commands, or to augment standard command return values with device specific information. +PEC Support +=========== + +Many PMBus devices support SMBus PEC (Packet Error Checking). If supported +by both the I2C adapter and by the PMBus chip, it is by default enabled. +If PEC is supported, the PMBus core driver adds an attribute named 'pec' to +the I2C device. This attribute can be used to control PEC support in the +communication with the PMBus chip. + API functions =============
drivers/hwmon/pmbus/pmbus_core.c +50 -39
113 lines not on this page · raw message
Signature · 1 line
2.35.1