From dbc0860f7a3d43604c380822a456d26ef6f70a06 Mon Sep 17 00:00:00 2001 From: Erik Rosen Date: Wed, 9 Jun 2021 11:32:05 +0200 Subject: hwmon: (pmbus) Add new pmbus flag NO_WRITE_PROTECT Some PMBus chips respond with invalid data when reading the WRITE_PROTECT register. For such chips, this flag should be set so that the PMBus core driver doesn't use the WRITE_PROTECT command to determine its behavior. Signed-off-by: Erik Rosen Signed-off-by: Guenter Roeck --- include/linux/pmbus.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/linux/pmbus.h b/include/linux/pmbus.h index edd7c84fef65..12c515a27d3a 100644 --- a/include/linux/pmbus.h +++ b/include/linux/pmbus.h @@ -56,6 +56,15 @@ */ #define PMBUS_READ_STATUS_AFTER_FAILED_CHECK BIT(3) +/* + * PMBUS_NO_WRITE_PROTECT + * + * Some PMBus chips respond with invalid data when reading the WRITE_PROTECT + * register. For such chips, this flag should be set so that the PMBus core + * driver doesn't use the WRITE_PROTECT command to determine its behavior. + */ +#define PMBUS_NO_WRITE_PROTECT BIT(4) + struct pmbus_platform_data { u32 flags; /* Device specific flags */ -- cgit v1.2.3