summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/pmbus.h
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-06-25 11:21:49 -0700
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-07-28 15:31:11 -0700
commit1061d8518f8bde548a03a5ff77dbe9a4202ad826 (patch)
treee5bd62c9c7d065c4acb249bc60e057b64023c32c /drivers/hwmon/pmbus/pmbus.h
parent9d2ecfb768bd2f8b41816a23b0f1dda026fef41d (diff)
downloadop-kernel-dev-1061d8518f8bde548a03a5ff77dbe9a4202ad826.zip
op-kernel-dev-1061d8518f8bde548a03a5ff77dbe9a4202ad826.tar.gz
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 50647ab..cc5b6a2 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -266,11 +266,11 @@ enum pmbus_sensor_classes {
#define PMBUS_HAVE_STATUS_FAN12 (1 << 16)
#define PMBUS_HAVE_STATUS_FAN34 (1 << 17)
+enum pmbus_data_format { linear = 0, direct, vid };
+
struct pmbus_driver_info {
int pages; /* Total number of pages */
- bool direct[PSC_NUM_CLASSES];
- /* true if device uses direct data format
- for the given sensor class */
+ enum pmbus_data_format format[PSC_NUM_CLASSES];
/*
* Support one set of coefficients for each sensor type
* Used for chips providing data in direct mode.
@@ -299,6 +299,7 @@ struct pmbus_driver_info {
int pmbus_set_page(struct i2c_client *client, u8 page);
int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg);
+int pmbus_read_byte_data(struct i2c_client *client, u8 page, u8 reg);
void pmbus_clear_faults(struct i2c_client *client);
bool pmbus_check_byte_register(struct i2c_client *client, int page, int reg);
bool pmbus_check_word_register(struct i2c_client *client, int page, int reg);
OpenPOWER on IntegriCloud