|
@@ -268,6 +268,13 @@ typedef void (*regmap_unlock)(void *);
|
|
* field is NULL but precious_table (see below) is not, the
|
|
* field is NULL but precious_table (see below) is not, the
|
|
* check is performed on such table (a register is precious if
|
|
* check is performed on such table (a register is precious if
|
|
* it belongs to one of the ranges specified by precious_table).
|
|
* it belongs to one of the ranges specified by precious_table).
|
|
|
|
+ * @readable_noinc_reg: Optional callback returning true if the register
|
|
|
|
+ * supports multiple read operations without incrementing
|
|
|
|
+ * the register number. If this field is NULL but
|
|
|
|
+ * rd_noinc_table (see below) is not, the check is
|
|
|
|
+ * performed on such table (a register is no increment
|
|
|
|
+ * readable if it belongs to one of the ranges specified
|
|
|
|
+ * by rd_noinc_table).
|
|
* @disable_locking: This regmap is either protected by external means or
|
|
* @disable_locking: This regmap is either protected by external means or
|
|
* is guaranteed not be be accessed from multiple threads.
|
|
* is guaranteed not be be accessed from multiple threads.
|
|
* Don't use any locking mechanisms.
|
|
* Don't use any locking mechanisms.
|
|
@@ -295,6 +302,7 @@ typedef void (*regmap_unlock)(void *);
|
|
* @rd_table: As above, for read access.
|
|
* @rd_table: As above, for read access.
|
|
* @volatile_table: As above, for volatile registers.
|
|
* @volatile_table: As above, for volatile registers.
|
|
* @precious_table: As above, for precious registers.
|
|
* @precious_table: As above, for precious registers.
|
|
|
|
+ * @rd_noinc_table: As above, for no increment readable registers.
|
|
* @reg_defaults: Power on reset values for registers (for use with
|
|
* @reg_defaults: Power on reset values for registers (for use with
|
|
* register cache support).
|
|
* register cache support).
|
|
* @num_reg_defaults: Number of elements in reg_defaults.
|
|
* @num_reg_defaults: Number of elements in reg_defaults.
|
|
@@ -344,6 +352,7 @@ struct regmap_config {
|
|
bool (*readable_reg)(struct device *dev, unsigned int reg);
|
|
bool (*readable_reg)(struct device *dev, unsigned int reg);
|
|
bool (*volatile_reg)(struct device *dev, unsigned int reg);
|
|
bool (*volatile_reg)(struct device *dev, unsigned int reg);
|
|
bool (*precious_reg)(struct device *dev, unsigned int reg);
|
|
bool (*precious_reg)(struct device *dev, unsigned int reg);
|
|
|
|
+ bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
|
|
|
|
|
|
bool disable_locking;
|
|
bool disable_locking;
|
|
regmap_lock lock;
|
|
regmap_lock lock;
|
|
@@ -360,6 +369,7 @@ struct regmap_config {
|
|
const struct regmap_access_table *rd_table;
|
|
const struct regmap_access_table *rd_table;
|
|
const struct regmap_access_table *volatile_table;
|
|
const struct regmap_access_table *volatile_table;
|
|
const struct regmap_access_table *precious_table;
|
|
const struct regmap_access_table *precious_table;
|
|
|
|
+ const struct regmap_access_table *rd_noinc_table;
|
|
const struct reg_default *reg_defaults;
|
|
const struct reg_default *reg_defaults;
|
|
unsigned int num_reg_defaults;
|
|
unsigned int num_reg_defaults;
|
|
enum regcache_type cache_type;
|
|
enum regcache_type cache_type;
|
|
@@ -981,6 +991,8 @@ int regmap_raw_write_async(struct regmap *map, unsigned int reg,
|
|
int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
|
|
int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
|
|
int regmap_raw_read(struct regmap *map, unsigned int reg,
|
|
int regmap_raw_read(struct regmap *map, unsigned int reg,
|
|
void *val, size_t val_len);
|
|
void *val, size_t val_len);
|
|
|
|
+int regmap_noinc_read(struct regmap *map, unsigned int reg,
|
|
|
|
+ void *val, size_t val_len);
|
|
int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
|
|
int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
|
|
size_t val_count);
|
|
size_t val_count);
|
|
int regmap_update_bits_base(struct regmap *map, unsigned int reg,
|
|
int regmap_update_bits_base(struct regmap *map, unsigned int reg,
|
|
@@ -1231,6 +1243,13 @@ static inline int regmap_raw_read(struct regmap *map, unsigned int reg,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline int regmap_noinc_read(struct regmap *map, unsigned int reg,
|
|
|
|
+ void *val, size_t val_len)
|
|
|
|
+{
|
|
|
|
+ WARN_ONCE(1, "regmap API is disabled");
|
|
|
|
+ return -EINVAL;
|
|
|
|
+}
|
|
|
|
+
|
|
static inline int regmap_bulk_read(struct regmap *map, unsigned int reg,
|
|
static inline int regmap_bulk_read(struct regmap *map, unsigned int reg,
|
|
void *val, size_t val_count)
|
|
void *val, size_t val_count)
|
|
{
|
|
{
|