Skip to content

Commit e43212e

Browse files
Eliav Farbergroeck
authored andcommitted
hwmon: (mr75203) enable polling for all VM channels
Configure ip-polling register to enable polling for all voltage monitor channels. This enables reading the voltage values for all inputs other than just input 0. Fixes: 9d82335 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller") Signed-off-by: Eliav Farber <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 91a9e06 commit e43212e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/hwmon/mr75203.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,19 @@ static int pvt_init(struct pvt_device *pvt)
388388
if (ret)
389389
return ret;
390390

391+
val = (BIT(pvt->c_num) - 1) | VM_CH_INIT |
392+
IP_POLL << SDIF_ADDR_SFT | SDIF_WRN_W | SDIF_PROG;
393+
ret = regmap_write(v_map, SDIF_W, val);
394+
if (ret < 0)
395+
return ret;
396+
397+
ret = regmap_read_poll_timeout(v_map, SDIF_STAT,
398+
val, !(val & SDIF_BUSY),
399+
PVT_POLL_DELAY_US,
400+
PVT_POLL_TIMEOUT_US);
401+
if (ret)
402+
return ret;
403+
391404
val = CFG1_VOL_MEAS_MODE | CFG1_PARALLEL_OUT |
392405
CFG1_14_BIT | IP_CFG << SDIF_ADDR_SFT |
393406
SDIF_WRN_W | SDIF_PROG;

0 commit comments

Comments
 (0)