Files
linux/include/linux
Guenter Roeck 4ce6e8a859 hwmon: Add PEC attribute support to hardware monitoring core
Several hardware monitoring chips optionally support Packet Error Checking
(PEC). For some chips, PEC support can be enabled simply by setting
I2C_CLIENT_PEC in the i2c client data structure. Others require chip
specific code to enable or disable PEC support.

Introduce hwmon_chip_pec and HWMON_C_PEC to simplify adding configurable
PEC support for hardware monitoring drivers. A driver can set HWMON_C_PEC
in its chip information data to indicate PEC support. If a chip requires
chip specific code to enable or disable PEC support, the driver only needs
to implement support for the hwmon_chip_pec attribute to its write
function.

Packet Error Checking is only supported for SMBus devices. HWMON_C_PEC
must therefore only be set by a driver if the parent device is an I2C
device. Attempts to set HWMON_C_PEC on any other device type is not
supported and rejected.

The code calls i2c_check_functionality() to check if PEC is supported
by the I2C/SMBus controller. This function is only available if CONFIG_I2C
is enabled and reachable. For this reason, the added code needs to depend
on reachability of CONFIG_I2C.

Cc: Radu Sabau <radu.sabau@analog.com>
Acked-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-03 20:25:28 -07:00
..
2024-03-07 21:52:03 +00:00
2024-03-19 16:11:42 +01:00
2024-04-24 11:06:26 -07:00
2024-04-25 20:55:49 -07:00
2024-05-02 20:35:57 +02:00
2024-04-17 08:44:03 -06:00
2024-03-11 15:37:23 -07:00
2024-04-29 16:28:07 -07:00
2024-05-08 17:29:22 -04:00
2024-04-23 09:03:37 +09:00
2024-05-05 17:53:55 -07:00
2024-03-07 20:37:04 +00:00
2024-03-12 23:08:29 -07:00
2024-05-11 00:41:15 +00:00
2024-04-15 16:03:24 -04:00
2024-05-09 13:02:39 +02:00
2024-05-19 14:36:17 -07:00
2024-05-22 16:12:48 -07:00
2024-05-19 14:40:44 -07:00
2024-05-05 17:53:53 -07:00
2024-04-23 13:16:03 +02:00
2024-03-07 09:36:08 +01:00
2024-03-10 14:38:04 -07:00
2024-05-03 10:44:42 +01:00
2024-04-15 14:31:48 +02:00
2024-03-09 09:14:50 -05:00
2024-05-05 17:53:49 -07:00
2024-05-05 17:53:50 -07:00
2024-03-26 11:07:20 -07:00
2024-05-16 18:14:14 -05:00
2024-03-13 12:53:53 -07:00
2024-03-13 12:53:53 -07:00
2024-04-17 13:14:30 +02:00
2024-04-15 19:43:48 +02:00
2024-04-02 18:03:32 -07:00
2024-03-08 12:05:10 +01:00
2024-04-03 09:59:38 +01:00
2024-05-02 16:28:15 +02:00
2024-04-09 10:53:44 +02:00
2024-03-26 09:01:18 +01:00
2024-05-04 18:57:21 +02:00
2024-05-23 19:40:26 -07:00
2024-04-08 11:49:02 +01:00
2024-05-06 12:05:00 +02:00
2024-04-07 02:42:36 -04:00
2024-04-25 20:55:48 -07:00