aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/pmbus.h
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-06-25 14:21:49 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-07-28 18:31:11 -0400
commit1061d8518f8bde548a03a5ff77dbe9a4202ad826 (patch)
treee5bd62c9c7d065c4acb249bc60e057b64023c32c /drivers/hwmon/pmbus/pmbus.h
parent9d2ecfb768bd2f8b41816a23b0f1dda026fef41d (diff)
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 <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Diffstat (limited to 'drivers/hwmon/pmbus/pmbus.h')
-rw-r--r--drivers/hwmon/pmbus/pmbus.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index 50647ab7235a..cc5b6a23260b 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -266,11 +266,11 @@ enum pmbus_sensor_classes {
266#define PMBUS_HAVE_STATUS_FAN12 (1 << 16) 266#define PMBUS_HAVE_STATUS_FAN12 (1 << 16)
267#define PMBUS_HAVE_STATUS_FAN34 (1 << 17) 267#define PMBUS_HAVE_STATUS_FAN34 (1 << 17)
268 268
269enum pmbus_data_format { linear = 0, direct, vid };
270
269struct pmbus_driver_info { 271struct pmbus_driver_info {
270 int pages; /* Total number of pages */ 272 int pages; /* Total number of pages */
271 bool direct[PSC_NUM_CLASSES]; 273 enum pmbus_data_format format[PSC_NUM_CLASSES];
272 /* true if device uses direct data format
273 for the given sensor class */
274 /* 274 /*
275 * Support one set of coefficients for each sensor type 275 * Support one set of coefficients for each sensor type
276 * Used for chips providing data in direct mode. 276 * Used for chips providing data in direct mode.
@@ -299,6 +299,7 @@ struct pmbus_driver_info {
299 299
300int pmbus_set_page(struct i2c_client *client, u8 page); 300int pmbus_set_page(struct i2c_client *client, u8 page);
301int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg); 301int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg);
302int pmbus_read_byte_data(struct i2c_client *client, u8 page, u8 reg);
302void pmbus_clear_faults(struct i2c_client *client); 303void pmbus_clear_faults(struct i2c_client *client);
303bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg); 304bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg);
304bool pmbus_check_word_register(struct i2c_client *client, int page, int reg); 305bool pmbus_check_word_register(struct i2c_client *client, int page, int reg);