• Axel Lin's avatar
    ASoC: max98095: Get rid of max98095_access table · 5549ce82
    Axel Lin authored
    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: default avatarAxel Lin <axel.lin@ingics.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    5549ce82
max98095.c 60.8 KB