]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit83915fb2c2701970309ae9ac4b3110d2b11e7ccd
tree64996a24cc4ca07e0e427748bd62a386c556abe1
parentd3faf8af3cf621eef2953b5a4c02cd5ac5afce12
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