ASoC: fsl_xcvr: Add suspend and resume support
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 27 Nov 2024 03:00:35 +0000 (11:00 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 2 Dec 2024 00:30:20 +0000 (00:30 +0000)
commite6a9750a346b103bd8ab2bf25be76a719d8061b2
tree356ced140686c8aa807107803fed733caaea45be
parent5a8b4785cddabfad348a96ca38eb0c3d735202df
ASoC: fsl_xcvr: Add suspend and resume support

Use regcache_sync() to recover the registers of controller,
PHY and PLL after suspend and resume.
In order to recover the registers need to avoid use the
*_SET, *_CLR and *_TOG registers.

Recovery of the registers should be done before loading
XCVR firmware otherwise some registers set by firmware
are overwritten. Besides only in eARC mode is it necessary
to load XCVR firmware.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20241127030035.649219-3-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_xcvr.c