Skip to content

Commit e583649

Browse files
ADESTMLee Jones
authored andcommitted
mfd: stmfx: Reset chip on resume as supply was disabled
STMFX supply is disabled during suspend. To avoid a too early access to the STMFX firmware on resume, reset the chip and wait for its firmware to be loaded. Fixes: 06252ad ("mfd: Add ST Multi-Function eXpander (STMFX) core driver") Signed-off-by: Amelie Delaunay <[email protected]> Signed-off-by: Lee Jones <[email protected]>
1 parent 7ff864e commit e583649

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/mfd/stmfx.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,13 @@ static int stmfx_resume(struct device *dev)
501501
}
502502
}
503503

504+
/* Reset STMFX - supply has been stopped during suspend */
505+
ret = stmfx_chip_reset(stmfx);
506+
if (ret) {
507+
dev_err(stmfx->dev, "Failed to reset chip: %d\n", ret);
508+
return ret;
509+
}
510+
504511
ret = regmap_raw_write(stmfx->map, STMFX_REG_SYS_CTRL,
505512
&stmfx->bkp_sysctrl, sizeof(stmfx->bkp_sysctrl));
506513
if (ret)

0 commit comments

Comments
 (0)