ASoC: sun50i-codec-analog: Move suspend/resume to set_bias_level
authorSamuel Holland <samuel@sholland.org>
Sat, 2 Mar 2024 14:00:35 +0000 (15:00 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 25 Mar 2024 00:32:29 +0000 (00:32 +0000)
commitc0454d31e05062b1c7df7eef21855ba1f56c5158
tree49b63134c8a92da016f65214b17675aa729fe6d7
parent4cece764965020c22cff7665b18a012006359095
ASoC: sun50i-codec-analog: Move suspend/resume to set_bias_level

With idle_bias_on and suspend_bias_off, there are bias level transitions
that match the suspend/resume callbacks. However, there are also
transitions during probe (OFF => STANDBY) and removal (STANDBY => OFF).

By using the set_bias_level hook, the driver can have one copy of code
that would otherwise be duplicated between the probe/resume and
suspend/remove hooks.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Ondřej Jirman <megi@xff.cz>
Link: https://msgid.link/r/20240302140042.1990256-2-megi@xff.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun50i-codec-analog.c