Skip to contentSkip to conversation

hwmon: (pmbus) Support reading and

PATCH Superseded Guenter Roeck 1 participant 2 messages Jul 12, 2011 – Jul 14, 2011 Hardware monitoring

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index cc5b6a2..d631cae 100644
@@ -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
#1 lore raw

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.

---
 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
index cc5b6a2..d631cae 100644
@@ -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