]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: twl6040: Combine the custom volsw get, and put functions
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 26 Sep 2011 13:26:25 +0000 (16:26 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 26 Sep 2011 21:23:32 +0000 (22:23 +0100)
commit6f23df6c546b09da4a1b970a266718eb8706c797
treeddba695cb0dc82e04ab308958686bd58b2ff8529
parenta0dc80e3bc7fbf7005bda3e4b0f7a44ce6630c8b
ASoC: twl6040: Combine the custom volsw get, and put functions

We can manage with one set of get, and put function for the gain
controls we need to handle with custom code due to the shadowing
of the register.
For both get, and put function we can call decide based on the
mc->rreg value, if we need to call the volsw, or the vlosw_2r
variant (in 2r case rreg is not 0).
Handling of the shadow values are the same for both type of
controls.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/twl6040.c