|
@@ -1261,6 +1261,9 @@ int _regmap_write(struct regmap *map, unsigned int reg,
|
|
int ret;
|
|
int ret;
|
|
void *context = _regmap_map_get_context(map);
|
|
void *context = _regmap_map_get_context(map);
|
|
|
|
|
|
|
|
+ if (!regmap_writeable(map, reg))
|
|
|
|
+ return -EIO;
|
|
|
|
+
|
|
if (!map->cache_bypass && !map->defer_caching) {
|
|
if (!map->cache_bypass && !map->defer_caching) {
|
|
ret = regcache_write(map, reg, val);
|
|
ret = regcache_write(map, reg, val);
|
|
if (ret != 0)
|
|
if (ret != 0)
|