aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hwmon/pmbus/lm25066.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c
index 5489d70015c2..f9f0c93e4a3d 100644
--- a/drivers/hwmon/pmbus/lm25066.c
+++ b/drivers/hwmon/pmbus/lm25066.c
@@ -123,15 +123,28 @@ static int lm25066_write_word_data(struct i2c_client *client, int page, int reg,
123 int ret; 123 int ret;
124 124
125 switch (reg) { 125 switch (reg) {
126 case PMBUS_VOUT_UV_WARN_LIMIT:
127 case PMBUS_OT_FAULT_LIMIT:
128 case PMBUS_OT_WARN_LIMIT:
129 case PMBUS_VIN_UV_WARN_LIMIT:
130 case PMBUS_VIN_OV_WARN_LIMIT:
131 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, 0x0fff);
132 ret = pmbus_write_word_data(client, 0, reg, word);
133 pmbus_clear_cache(client);
134 break;
126 case PMBUS_IIN_OC_WARN_LIMIT: 135 case PMBUS_IIN_OC_WARN_LIMIT:
136 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, 0x0fff);
127 ret = pmbus_write_word_data(client, 0, 137 ret = pmbus_write_word_data(client, 0,
128 LM25066_MFR_IIN_OC_WARN_LIMIT, 138 LM25066_MFR_IIN_OC_WARN_LIMIT,
129 word); 139 word);
140 pmbus_clear_cache(client);
130 break; 141 break;
131 case PMBUS_PIN_OP_WARN_LIMIT: 142 case PMBUS_PIN_OP_WARN_LIMIT:
143 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, 0x0fff);
132 ret = pmbus_write_word_data(client, 0, 144 ret = pmbus_write_word_data(client, 0,
133 LM25066_MFR_PIN_OP_WARN_LIMIT, 145 LM25066_MFR_PIN_OP_WARN_LIMIT,
134 word); 146 word);
147 pmbus_clear_cache(client);
135 break; 148 break;
136 case PMBUS_VIRT_RESET_PIN_HISTORY: 149 case PMBUS_VIRT_RESET_PIN_HISTORY:
137 ret = pmbus_write_byte(client, 0, LM25066_CLEAR_PIN_PEAK); 150 ret = pmbus_write_byte(client, 0, LM25066_CLEAR_PIN_PEAK);