OSDN Git Service

ASoC: rt9120: Use pm_runtime and regcache to optimize 'pwdnn' logic
authorChiYuan Huang <cy_huang@richtek.com>
Thu, 19 May 2022 02:13:38 +0000 (10:13 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 19 May 2022 15:47:12 +0000 (16:47 +0100)
commit80b949f332e331b67c3ae4f323daf2cb91e743e5
tree64996a24cc4ca07e0e427748bd62a386c556abe1
parent57f68f2168988e574133fb5abcd73949bf1d1df2
ASoC: rt9120: Use pm_runtime and regcache to optimize 'pwdnn' logic

From the datasheet, the only way to meet the lowest power consumption is
to pull low the 'pwdnn' gpio. But if it is low, IC will keep in
reset state, all registers reset to default.

And the power consumption is listed below
1. amp off and 'pwdnn' high => idle state, PVDD = 1mA, DVDD = 7mA
2. amp off and 'pwdnn' low  => shutdown state, PVDD < 20uA, DVDD < 15uA

It's the large difference for the consumption current

This fix is to use pm_runtime and regcache to handle 'pwdnn' gpio
control.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/1652926418-8519-3-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt9120.c