diff options
-rw-r--r-- | drivers/hwmon/pmbus/pmbus.h | 1 | ||||
-rw-r--r-- | drivers/hwmon/pmbus/pmbus_core.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index 164d17706486..fa9beb3eb60c 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h | |||
@@ -369,6 +369,7 @@ struct pmbus_driver_info { | |||
369 | 369 | ||
370 | /* Function declarations */ | 370 | /* Function declarations */ |
371 | 371 | ||
372 | void pmbus_clear_cache(struct i2c_client *client); | ||
372 | int pmbus_set_page(struct i2c_client *client, u8 page); | 373 | int pmbus_set_page(struct i2c_client *client, u8 page); |
373 | int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg); | 374 | int pmbus_read_word_data(struct i2c_client *client, u8 page, u8 reg); |
374 | int pmbus_write_word_data(struct i2c_client *client, u8 page, u8 reg, u16 word); | 375 | int pmbus_write_word_data(struct i2c_client *client, u8 page, u8 reg, u16 word); |
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index 3b5c24dd0b75..32f4530cd1e8 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c | |||
@@ -113,6 +113,14 @@ struct pmbus_data { | |||
113 | u8 currpage; | 113 | u8 currpage; |
114 | }; | 114 | }; |
115 | 115 | ||
116 | void pmbus_clear_cache(struct i2c_client *client) | ||
117 | { | ||
118 | struct pmbus_data *data = i2c_get_clientdata(client); | ||
119 | |||
120 | data->valid = false; | ||
121 | } | ||
122 | EXPORT_SYMBOL_GPL(pmbus_clear_cache); | ||
123 | |||
116 | int pmbus_set_page(struct i2c_client *client, u8 page) | 124 | int pmbus_set_page(struct i2c_client *client, u8 page) |
117 | { | 125 | { |
118 | struct pmbus_data *data = i2c_get_clientdata(client); | 126 | struct pmbus_data *data = i2c_get_clientdata(client); |