]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: max98088: Get rid of max98088_access table
authorAxel Lin <axel.lin@ingics.com>
Tue, 28 Jul 2015 05:29:00 +0000 (13:29 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 29 Jul 2015 13:53:41 +0000 (14:53 +0100)
commit98be7871438860fc96463fb57a48d35b4c1e5e1a
treef629721c3057ca644ce4c8446e00c19506b3ef4e
parentd2ddc60cdb772e4bba4756c584491745be503203
ASoC: max98088: Get rid of max98088_access table

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

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

readable registers:
        0x00 ~ 0xC9, 0xFF
writeable registers:
        0x03 ~ 0xC9
volatile registers:
        0x00 ~ 0x03, 0xFF

Note, 0x00 should be read-only according to the datasheet.

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/max98088.c