From f30ce040a704f30f7ac6d3ec4c3f5390ccaabfe0 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Fri, 20 May 2022 11:47:21 -0700 Subject: 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 Signed-off-by: Guenter Roeck --- Documentation/hwmon/pmbus-core.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation/hwmon') 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 ============= -- cgit v1.2.3