• Lars-Peter Clausen's avatar
    regmap: Add support for device specific write and read flag masks. · 6f306441
    Lars-Peter Clausen authored
    Some buses like SPI have no standard notation of read or write operations.
    The general scheme here is to set or clear specific bits in the register
    address to indicate whether the operation is a read or write. We already
    support having a read flag mask per bus, but as there is no standard
    the bits which need to be set or cleared differ between devices and vendors,
    thus we need a mechanism to specify them per device.
    
    This patch adds two new entries to the regmap_config struct, read_flag_mask and
    write_flag_mask. These will be or'ed onto the top byte when doing a read or
    write operation. If both masks are empty the device will fallback to the
    regmap_bus masks.
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    6f306441
internal.h 1.91 KB