]> git.sur5r.net Git - u-boot/blobdiff - include/regmap.h
Merge branch 'master' of git://git.denx.de/u-boot-spi
[u-boot] / include / regmap.h
index d827a0bd523b6a4938ca6c55f52bf6c1b292f978..6a574eaa41294a740a688f3bc717c0ba68afcf8f 100644 (file)
@@ -42,15 +42,25 @@ int regmap_read(struct regmap *map, uint offset, uint *valp);
 #define regmap_read32(map, ptr, member, valp) \
        regmap_read(map, (uint32_t *)(ptr)->member - (uint32_t *)(ptr), valp)
 
+/**
+ * regmap_update_bits() - Perform a read/modify/write using a mask
+ *
+ * @map:       The map returned by regmap_init_mem*()
+ * @offset:    Offset of the memory
+ * @mask:      Mask to apply to the read value
+ * @val:       Value to apply to the value to write
+ */
+int regmap_update_bits(struct regmap *map, uint offset, uint mask, uint val);
+
 /**
  * regmap_init_mem() - Set up a new register map that uses memory access
  *
  * Use regmap_uninit() to free it.
  *
- * @dev:       Device that uses this map
+ * @node:      Device node that uses this map
  * @mapp:      Returns allocated map
  */
-int regmap_init_mem(struct udevice *dev, struct regmap **mapp);
+int regmap_init_mem(ofnode node, struct regmap **mapp);
 
 /**
  * regmap_init_mem_platdata() - Set up a new memory register map for of-platdata