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: 06252ade9156 ("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>
                }
        }
 
+       /* 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)