hwmon: (pmbus) Support reading and
PATCH 6/15 hwmon: (pmbus) Support reading and
Some PMBus devices use non-standard registers for some of the sensors and/or limits. To support such devices, add code to support reading and writing of word size registers in device specific code.
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/hwmon/pmbus/pmbus.h | 4 +++ drivers/hwmon/pmbus/pmbus_core.c | 50 ++++++++++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 5 deletions(-)
drivers/hwmon/pmbus/pmbus.h +4 -0
@@ -286,6 +286,9 @@ struct pmbus_driver_info {* necessary. */ int (*read_byte_data)(struct i2c_client *client,int page,int reg); +int (*read_word_data)(struct i2c_client *client,int page,int reg); +int (*write_word_data)(struct i2c_client *client,int page,int reg, +u16 word);/* * The identify function determines supported PMBus functionality. * This function is only necessary if a chip driver supports multiple
@@ -299,6 +302,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_write_word_data (struct i2c_client *client,u8 page,u8 reg,u16 word);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);
drivers/hwmon/pmbus/pmbus_core.c +45 -5
80 lines not on this page · raw message
Signature · 7 lines
1.7.3.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 6/15 hwmon: (pmbus) Support reading and
Some PMBus devices use non-standard registers for some of the sensors and/or limits. To support such devices, add code to support reading and writing of word size registers in device specific code.
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/hwmon/pmbus/pmbus.h | 4 +++ drivers/hwmon/pmbus/pmbus_core.c | 50 ++++++++++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 5 deletions(-)
drivers/hwmon/pmbus/pmbus.h +4 -0
@@ -286,6 +286,9 @@ struct pmbus_driver_info {* necessary. */ int (*read_byte_data)(struct i2c_client *client,int page,int reg); +int (*read_word_data)(struct i2c_client *client,int page,int reg); +int (*write_word_data)(struct i2c_client *client,int page,int reg, +u16 word);/* * The identify function determines supported PMBus functionality. * This function is only necessary if a chip driver supports multiple
@@ -299,6 +302,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_write_word_data (struct i2c_client *client,u8 page,u8 reg,u16 word);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);
drivers/hwmon/pmbus/pmbus_core.c +45 -5
80 lines not on this page · raw message
Signature · 7 lines
1.7.3.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors