Merge remote-tracking branch 'regmap/topic/field' into regmap-next

This commit is contained in:
Mark Brown
2013-06-30 12:40:03 +01:00
7 changed files with 1689 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ struct irq_domain;
struct spi_device;
struct regmap;
struct regmap_range_cfg;
struct regmap_field;
/* An enum of all the supported cache types */
enum regcache_type {
@@ -416,6 +417,36 @@ bool regmap_reg_in_ranges(unsigned int reg,
const struct regmap_range *ranges,
unsigned int nranges);
/**
* Description of an register field
*
* @reg: Offset of the register within the regmap bank
* @lsb: lsb of the register field.
* @reg: msb of the register field.
*/
struct reg_field {
unsigned int reg;
unsigned int lsb;
unsigned int msb;
};
#define REG_FIELD(_reg, _lsb, _msb) { \
.reg = _reg, \
.lsb = _lsb, \
.msb = _msb, \
}
struct regmap_field *regmap_field_alloc(struct regmap *regmap,
struct reg_field reg_field);
void regmap_field_free(struct regmap_field *field);
struct regmap_field *devm_regmap_field_alloc(struct device *dev,
struct regmap *regmap, struct reg_field reg_field);
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);
/**
* Description of an IRQ for the generic regmap irq_chip.
*