Haibo Chen cb2684e906 gpio: pca953x: Add mutex_lock for regcache sync in PM
[ Upstream commit 518e26f11af2fe4f5bebf9a0351595d508c7077f ]

The regcache sync will set the cache_bypass = true, at that
time, when there is regmap write operation, it will bypass
the regmap cache, then the regcache sync will write back the
value from cache to register, which is not as our expectation.

Though regmap already use its internal lock to avoid such issue,
but this driver force disable the regmap internal lock in its
regmap config: disable_locking = true

To avoid this issue, use the driver's own lock to do the protect
in system PM.

Fixes: b76574300504 ("gpio: pca953x: Restore registers after suspend/resume cycle")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-09-15 12:04:52 +02:00
..
2019-09-03 16:04:19 +02:00
2019-07-23 18:59:05 +03:00
2020-01-09 10:19:59 +01:00
2021-04-21 12:56:13 +02:00
2019-09-16 15:52:38 -07:00
2019-06-14 10:16:15 +02:00