aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pmbus.h
diff options
context:
space:
mode:
authorErik Rosen <erik.rosen@metormote.com>2021-06-09 11:32:06 +0200
committerGuenter Roeck <linux@roeck-us.net>2021-06-17 04:21:46 -0700
commite8e00c83a268d5b7d2f5bd490c2269c1ede76a07 (patch)
tree77b6dfb7157089a0dd7499a3e15d1ad9e8e5a95d /include/linux/pmbus.h
parenthwmon: (pmbus) Add new pmbus flag NO_WRITE_PROTECT (diff)
downloadlinux-dev-e8e00c83a268d5b7d2f5bd490c2269c1ede76a07.tar.xz
linux-dev-e8e00c83a268d5b7d2f5bd490c2269c1ede76a07.zip
hwmon: (pmbus) Add support for reading direct mode coefficients
Add support for reading and decoding direct format coefficients to the PMBus core driver. If the new flag PMBUS_USE_COEFFICIENTS_CMD is set, the driver will use the COEFFICIENTS register together with the information in the pmbus_sensor_attr structs to initialize relevant coefficients for the direct mode format. Signed-off-by: Erik Rosen <erik.rosen@metormote.com> [groeck: Initialize ret with -EINVAL in pmbus_init_coefficients()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'include/linux/pmbus.h')
-rw-r--r--include/linux/pmbus.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/pmbus.h b/include/linux/pmbus.h
index 12c515a27d3a..fa9f08164c36 100644
--- a/include/linux/pmbus.h
+++ b/include/linux/pmbus.h
@@ -65,6 +65,14 @@
*/
#define PMBUS_NO_WRITE_PROTECT BIT(4)
+/*
+ * PMBUS_USE_COEFFICIENTS_CMD
+ *
+ * When this flag is set the PMBus core driver will use the COEFFICIENTS
+ * register to initialize the coefficients for the direct mode format.
+ */
+#define PMBUS_USE_COEFFICIENTS_CMD BIT(5)
+
struct pmbus_platform_data {
u32 flags; /* Device specific flags */