George Hung | c680ebe | 2020-09-10 21:15:54 +0800 | [diff] [blame] | 1 | From 8e211c8bc64521d772c4389219889a240b40307b Mon Sep 17 00:00:00 2001 |
| 2 | From: Charles <Charles.Hsu@quantatw.com> |
| 3 | Date: Fri, 14 Aug 2020 18:06:22 +0800 |
| 4 | Subject: [PATCH] meta-gis: Enable adm1272 ADM1272_TEMP1_EN |
| 5 | |
| 6 | --- |
| 7 | drivers/hwmon/pmbus/adm1275.c | 14 +++++++------- |
| 8 | 1 file changed, 7 insertions(+), 7 deletions(-) |
| 9 | |
| 10 | diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c |
| 11 | index 5caa37fbfc18..550b9a8388f6 100644 |
| 12 | --- a/drivers/hwmon/pmbus/adm1275.c |
| 13 | +++ b/drivers/hwmon/pmbus/adm1275.c |
| 14 | @@ -595,11 +595,13 @@ static int adm1275_probe(struct i2c_client *client, |
| 15 | tindex = 8; |
| 16 | |
| 17 | info->func[0] |= PMBUS_HAVE_PIN | PMBUS_HAVE_STATUS_INPUT | |
| 18 | - PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT; |
| 19 | + PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT | |
| 20 | + PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; |
| 21 | |
| 22 | - /* Enable VOUT if not enabled (it is disabled by default) */ |
| 23 | - if (!(config & ADM1278_VOUT_EN)) { |
| 24 | - config |= ADM1278_VOUT_EN; |
| 25 | + |
| 26 | + /* Enable VOUT & TEMP1 if not enabled (it is disabled by default) */ |
| 27 | + if ((config & (ADM1278_VOUT_EN | ADM1278_TEMP1_EN)) != (ADM1278_VOUT_EN | ADM1278_TEMP1_EN)) { |
| 28 | + config |= ADM1278_VOUT_EN | ADM1278_TEMP1_EN; |
| 29 | ret = i2c_smbus_write_byte_data(client, |
| 30 | ADM1275_PMON_CONFIG, |
| 31 | config); |
| 32 | @@ -610,9 +612,7 @@ static int adm1275_probe(struct i2c_client *client, |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | - if (config & ADM1278_TEMP1_EN) |
| 37 | - info->func[0] |= |
| 38 | - PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; |
| 39 | + |
| 40 | if (config & ADM1278_VIN_EN) |
| 41 | info->func[0] |= PMBUS_HAVE_VIN; |
| 42 | break; |
| 43 | -- |
| 44 | 2.25.1 |
| 45 | |