summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-24 19:53:26 +0100
committerMark Brown <broonie@linaro.org>2013-09-24 19:53:26 +0100
commitef85b642460a4cc84086a7fe20915dae58dabcb2 (patch)
tree20cb7e3610702c0afb334907b9f93a0c32ad01d3 /include/linux
parentd3be689e6a07c00123786659b4429b07cf4272ac (diff)
parenta0102375ee82db1e08324b1a21484854cf2c1677 (diff)
Merge tag 'regmap-fields' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-rcar
regmap: Add support for repeated blocks of fields Save duplication for devices using the regmap field APIs by allowing repeated blocks to be described once and referred to with an index.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/regmap.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index a10380bfbeac..a12bea07f79e 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -425,11 +425,15 @@ bool regmap_reg_in_ranges(unsigned int reg,
* @reg: Offset of the register within the regmap bank
* @lsb: lsb of the register field.
* @reg: msb of the register field.
+ * @id_size: port size if it has some ports
+ * @id_offset: address offset for each ports
*/
struct reg_field {
unsigned int reg;
unsigned int lsb;
unsigned int msb;
+ unsigned int id_size;
+ unsigned int id_offset;
};
#define REG_FIELD(_reg, _lsb, _msb) { \
@@ -448,6 +452,15 @@ void devm_regmap_field_free(struct device *dev, struct regmap_field *field);
int regmap_field_read(struct regmap_field *field, unsigned int *val);
int regmap_field_write(struct regmap_field *field, unsigned int val);
+int regmap_field_update_bits(struct regmap_field *field,
+ unsigned int mask, unsigned int val);
+
+int regmap_fields_write(struct regmap_field *field, unsigned int id,
+ unsigned int val);
+int regmap_fields_read(struct regmap_field *field, unsigned int id,
+ unsigned int *val);
+int regmap_fields_update_bits(struct regmap_field *field, unsigned int id,
+ unsigned int mask, unsigned int val);
/**
* Description of an IRQ for the generic regmap irq_chip.