ASoC: max98095: Get rid of max98095_access table
authorAxel Lin <axel.lin@ingics.com>
Tue, 28 Jul 2015 05:30:14 +0000 (13:30 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 29 Jul 2015 13:53:55 +0000 (14:53 +0100)
commit5549ce82e29c6c1a45ad36a871096ae7c53e53b9
tree5e948d9244816f6188626860e1c644ef13798b9f
parent402f2a4f808a5d284de724689751dcd018835579
ASoC: max98095: Get rid of max98095_access table

The max98095_access table is used for look up readable/writable
attributes of registers. The readable/writable/volatile registers are
mostly in continuous ranges, so we can replace the max98095_access table
entirely by using case range.

Below is a summary of the readable/writeable/volatile registers:

readable registers:
        0x01 ~ 0x97, 0xFF
writeable registers:
        0x0F ~ 0x97
volatile registers:
        0x00 ~ 0x0E, 0x98 ~ 0xFF

This patch reworks the implement for .readable and .volatile and also add
implementation for .writable callback.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98095.c