• Ionut Nicu's avatar
    regmap: regcache: allow read-only regs to be cached · 515f2261
    Ionut Nicu authored
    The regmap_writeable() check should not be done in
    regcache_write() because this prevents read-only
    registers to be cached. After a read on a read-only
    register its value will not be stored in the cache
    and the next time someone will try to read it the
    value will be read from the bus instead of the
    cache.
    
    Instead the regmap_writeable() check should be done
    in _regmap_write() to prevent callers from writing
    to read-only registers.
    Signed-off-by: default avatarIonut Nicu <ioan.nicu.ext@nsn.com>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    515f2261
regmap.c 46.9 KB