diff options
author | Guenter Roeck <linux@roeck-us.net> | 2022-05-20 11:47:21 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-07-13 08:38:17 -0700 |
commit | f30ce040a704f30f7ac6d3ec4c3f5390ccaabfe0 (patch) | |
tree | 75ad5c0e7dc39e441fd9d86feef946dacb10c60c /Documentation | |
parent | 88084a3df1672e131ddc1b4e39eeacfd39864acf (diff) | |
download | linux-riscv-f30ce040a704f30f7ac6d3ec4c3f5390ccaabfe0.tar.gz linux-riscv-f30ce040a704f30f7ac6d3ec4c3f5390ccaabfe0.tar.bz2 linux-riscv-f30ce040a704f30f7ac6d3ec4c3f5390ccaabfe0.zip |
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 <andrew@aj.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/sysfs-class-hwmon | 9 | ||||
-rw-r--r-- | Documentation/hwmon/pmbus-core.rst | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-hwmon b/Documentation/ABI/testing/sysfs-class-hwmon index 653d4c75eddb..7271781a23b2 100644 --- a/Documentation/ABI/testing/sysfs-class-hwmon +++ b/Documentation/ABI/testing/sysfs-class-hwmon @@ -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 diff --git a/Documentation/hwmon/pmbus-core.rst b/Documentation/hwmon/pmbus-core.rst index e7e0c9ef10be..84c5a4e40c40 100644 --- a/Documentation/hwmon/pmbus-core.rst +++ b/Documentation/hwmon/pmbus-core.rst @@ -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 ============= |