Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / drivers / hwmon / pmbus / pmbus.h
index c031a9700ace9bdbb53ac8648700dc53da498582..7daaf0caf4d30a0dbd9b5669a86f01b0ff1850a2 100644 (file)
@@ -406,7 +406,7 @@ enum pmbus_sensor_classes {
 #define PMBUS_PHASE_VIRTUAL    BIT(30) /* Phases on this page are virtual */
 #define PMBUS_PAGE_VIRTUAL     BIT(31) /* Page is virtual */
 
-enum pmbus_data_format { linear = 0, direct, vid };
+enum pmbus_data_format { linear = 0, ieee754, direct, vid };
 enum vrm_version { vr11 = 0, vr12, vr13, imvp9, amd625mv };
 
 struct pmbus_driver_info {
@@ -463,8 +463,8 @@ struct pmbus_driver_info {
 
 extern const struct regulator_ops pmbus_regulator_ops;
 
-/* Macro for filling in array of struct regulator_desc */
-#define PMBUS_REGULATOR(_name, _id)                            \
+/* Macros for filling in array of struct regulator_desc */
+#define PMBUS_REGULATOR_STEP(_name, _id, _voltages, _step)  \
        [_id] = {                                               \
                .name = (_name # _id),                          \
                .supply_name = "vin",                           \
@@ -474,8 +474,12 @@ extern const struct regulator_ops pmbus_regulator_ops;
                .ops = &pmbus_regulator_ops,                    \
                .type = REGULATOR_VOLTAGE,                      \
                .owner = THIS_MODULE,                           \
+               .n_voltages = _voltages,                        \
+               .uV_step = _step,                               \
        }
 
+#define PMBUS_REGULATOR(_name, _id)    PMBUS_REGULATOR_STEP(_name, _id, 0, 0)
+
 /* Function declarations */
 
 void pmbus_clear_cache(struct i2c_client *client);