Skip to content
Snippets Groups Projects
  • Lars-Peter Clausen's avatar
    04dc91ce
    regmap: Add better support for devices without readback support · 04dc91ce
    Lars-Peter Clausen authored
    
    Currently regmap requires that a reg_read callback is supplied, otherwise a
    warning is emitted each time regmap_read() is called. This means a device
    or bus without readback support needs to supply dummy reg_read callback.
    Apart from that regmap_read() will still work fine if a cache is used.
    
    Remove the warning and let regmap_readable() return false if not reg_read
    callback is supplied. This means a device no longer has to supply a dummy
    callback if it does not support readback and it also doesn't have to have a
    readable_reg callback that always returns false since this is now implicit.
    
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    04dc91ce
    History
    regmap: Add better support for devices without readback support
    Lars-Peter Clausen authored
    
    Currently regmap requires that a reg_read callback is supplied, otherwise a
    warning is emitted each time regmap_read() is called. This means a device
    or bus without readback support needs to supply dummy reg_read callback.
    Apart from that regmap_read() will still work fine if a cache is used.
    
    Remove the warning and let regmap_readable() return false if not reg_read
    callback is supplied. This means a device no longer has to supply a dummy
    callback if it does not support readback and it also doesn't have to have a
    readable_reg callback that always returns false since this is now implicit.
    
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>