summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/pmbus.h
diff options
context:
space:
mode:
authorSaravanan Sekar <saravanan@linumiz.com>2022-12-07 18:37:13 +0100
committerGuenter Roeck <linux@roeck-us.net>2023-02-03 16:30:09 +0100
commitb52acefcf741373a3fceea5348e137b685a2d454 (patch)
tree9d407da13eb78a807cfd42e2b3e00e2edf76cf3a /drivers/hwmon/pmbus/pmbus.h
parentABI: sysfs-class-hwmon: add a description for fanY_fault (diff)
downloadlinux-b52acefcf741373a3fceea5348e137b685a2d454.tar.xz
linux-b52acefcf741373a3fceea5348e137b685a2d454.zip
hwmon: (pmbus/core) Add min_uV in pmbus regulator helper macro
Some regulator operates in a range of voltage which should not allow below the lower threshold. Signed-off-by: Saravanan Sekar <saravanan@linumiz.com> Link: https://lore.kernel.org/r/20221207173716.123223-2-saravanan@linumiz.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus/pmbus.h')
-rw-r--r--drivers/hwmon/pmbus/pmbus.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index 10fb17879f8e..713ea7915425 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -464,7 +464,7 @@ struct pmbus_driver_info {
extern const struct regulator_ops pmbus_regulator_ops;
/* Macros for filling in array of struct regulator_desc */
-#define PMBUS_REGULATOR_STEP(_name, _id, _voltages, _step) \
+#define PMBUS_REGULATOR_STEP(_name, _id, _voltages, _step, _min_uV) \
[_id] = { \
.name = (_name # _id), \
.id = (_id), \
@@ -475,9 +475,10 @@ extern const struct regulator_ops pmbus_regulator_ops;
.owner = THIS_MODULE, \
.n_voltages = _voltages, \
.uV_step = _step, \
+ .min_uV = _min_uV, \
}
-#define PMBUS_REGULATOR(_name, _id) PMBUS_REGULATOR_STEP(_name, _id, 0, 0)
+#define PMBUS_REGULATOR(_name, _id) PMBUS_REGULATOR_STEP(_name, _id, 0, 0, 0)
/* Function declarations */