Commit e583649d authored by Amelie Delaunay's avatar Amelie Delaunay Committed by Lee Jones

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: 06252ade ("mfd: Add ST Multi-Function eXpander (STMFX) core driver")
Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 7ff864e1
......@@ -501,6 +501,13 @@ static int stmfx_resume(struct device *dev)
}
}
/* Reset STMFX - supply has been stopped during suspend */
ret = stmfx_chip_reset(stmfx);
if (ret) {
dev_err(stmfx->dev, "Failed to reset chip: %d\n", ret);
return ret;
}
ret = regmap_raw_write(stmfx->map, STMFX_REG_SYS_CTRL,
&stmfx->bkp_sysctrl, sizeof(stmfx->bkp_sysctrl));
if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment