On 12/4/24 14:53, Andrew Davis wrote:
On 9/11/24 3:53 AM, Thomas Richard wrote:The regmap can be set without cache.
The status of each mux is read during suspend and stored in the private
memory of the mux_chip.
Then the state is restored during the resume.
Signed-off-by: Thomas Richard <thomas.richard@xxxxxxxxxxx>
---
In this second version, as discussed with Peter, everything is done in
the
mmio-mux driver.
A mux_mmio_set() function was added, and used during suspend stage to get
the status of the of the muxes.
This status is stored in the private memory of the mux_chip.
---
Changes in v2:
- Remove all modifications done in the mux subsystem
- Add a mux_mmio_set()
- Read the status of muxes during suspend and store in the private memory
of the mux_chip.
Do you need this private memory? Since this is already using regmap, why
not use the regmap cache, then you can restore all the values on resume
with a simple call to regcache_sync().
As you inherit the regmap, you cannot assume that the cache is enabled.