ASoC: max98095: Convert codec->hw_write to snd_soc_write
authorAxel Lin <axel.lin@gmail.com>
Sat, 15 Oct 2011 03:46:02 +0000 (11:46 +0800)
committerVarun Wadekar <vwadekar@nvidia.com>
Fri, 23 Dec 2011 06:32:33 +0000 (11:32 +0530)
commit2b27d683b31216a209defc785d9aa629d344b902
tree77577409baa7ddc47b7b5a65a09b0cd5d5536ce5
parent27684358803347de099dfa9b2d171baed6fab31c
ASoC: max98095: Convert codec->hw_write to snd_soc_write

codec->hw_write is broken now, convert codec->hw_write to snd_soc_write.

The hardware has 2 banks of registers sharing a section in I2C register space.
The 1st bank is the primary one and is cached.
The 2nd bank is for loading coefficients only and they do not need cache.
These coefficients registers are therefore direct writes.
Thus we set cache_bypass flag to deal with this before calling snd_soc_write.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 0d8d293898ff0ea395840cdf2ac85fbd53c8d3ea)

Change-Id: I162206b7c542d85c0349cb5c2af8048e8cee6700
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/69969
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
sound/soc/codecs/max98095.c