Skip to content

Commit cf90dd9

Browse files
amdelaunaygregkh
authored andcommitted
mfd: stmfx: Reset chip on resume as supply was disabled
[ Upstream commit e583649 ] 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 <amelie.delaunay@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent dc69fec commit cf90dd9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎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)