From 1061d8518f8bde548a03a5ff77dbe9a4202ad826 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 25 Jun 2011 11:21:49 -0700 Subject: hwmon: (pmbus) Add support for VID output voltage mode In VID mode, output voltages are measured and reported as VID values, and have to be converted to voltages using VID conversion tables or functions. Support is added for VR11 only at this time. This patch enables support for PMBus devices supporting VID VR11 based output voltage selection such as NCP4200 and NCP4208. Signed-off-by: Guenter Roeck Reviewed-by: Robert Coulson --- drivers/hwmon/pmbus/max34440.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/hwmon/pmbus/max34440.c') diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c index db11e1a175b..2e30046a116 100644 --- a/drivers/hwmon/pmbus/max34440.c +++ b/drivers/hwmon/pmbus/max34440.c @@ -72,10 +72,10 @@ static int max34440_read_byte_data(struct i2c_client *client, int page, int reg) static struct pmbus_driver_info max34440_info[] = { [max34440] = { .pages = 14, - .direct[PSC_VOLTAGE_IN] = true, - .direct[PSC_VOLTAGE_OUT] = true, - .direct[PSC_TEMPERATURE] = true, - .direct[PSC_CURRENT_OUT] = true, + .format[PSC_VOLTAGE_IN] = direct, + .format[PSC_VOLTAGE_OUT] = direct, + .format[PSC_TEMPERATURE] = direct, + .format[PSC_CURRENT_OUT] = direct, .m[PSC_VOLTAGE_IN] = 1, .b[PSC_VOLTAGE_IN] = 0, .R[PSC_VOLTAGE_IN] = 3, /* R = 0 in datasheet reflects mV */ @@ -112,11 +112,11 @@ static struct pmbus_driver_info max34440_info[] = { }, [max34441] = { .pages = 12, - .direct[PSC_VOLTAGE_IN] = true, - .direct[PSC_VOLTAGE_OUT] = true, - .direct[PSC_TEMPERATURE] = true, - .direct[PSC_CURRENT_OUT] = true, - .direct[PSC_FAN] = true, + .format[PSC_VOLTAGE_IN] = direct, + .format[PSC_VOLTAGE_OUT] = direct, + .format[PSC_TEMPERATURE] = direct, + .format[PSC_CURRENT_OUT] = direct, + .format[PSC_FAN] = direct, .m[PSC_VOLTAGE_IN] = 1, .b[PSC_VOLTAGE_IN] = 0, .R[PSC_VOLTAGE_IN] = 3, -- cgit v1.2.3