]> 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)
commit10e35048f66f1c93c16d195019a14d112e4520b3
tree64996a24cc4ca07e0e427748bd62a386c556abe1
parentf89a457ca7ab5836795ce7b628833ef014d5a5c4
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