regmap: Updates for v5.0
A small update with a couple of new APIs that are useful for some small sets of devices: - Split up the single_rw flagging to map read and write separately as some devices support bulk operations for only read or only write. - Add a write version of the noinc API. - Clean up the code for LOG_DEVICE a bit. -----BEGIN PGP SIGNATURE----- iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlvNvQgTHGJyb29uaWVA a2VybmVsLm9yZwAKCRAk1otyXVSH0MAPB/9Ftz3U5DpfLoN/KEOQlGv6LeoryRcI kSRXm7zlZmIrMm4xQtR59oXDSh05uPaZnbXPcIajfQhq895Y6T1+idHbd9pBmDFq cZ+YeORg+5NSThnbJeNBa1hiMFvM8seCP2eeHEu6ZX+jWE7AmfFsW6re3e9uXg+m DQ9tCFMnByShHFfEhWkvQiZAfPHLgN7MK6FvxAjYoUq/GeGjhCyOz1S0vNZXc4pj P6hJHngr+6axZYQ+IXcwoGj1UdS3aZWvamL5eCV/plFYaf9uNYgnyaGxhY7/hddB Ty3GHJOhGWZq8fjIR/ejS6M2g0c36tWq38uGHGAenyJsta1Kub/fcdzQ =WHhl -----END PGP SIGNATURE----- Merge tag 'regmap-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "A small update with a couple of new APIs that are useful for some small sets of devices: - Split up the single_rw flagging to map read and write separately as some devices support bulk operations for only read or only write. - Add a write version of the noinc API. - Clean up the code for LOG_DEVICE a bit" * tag 'regmap-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: use less #ifdef for LOG_DEVICE regmap: Add regmap_noinc_write API regmap: split up regmap_config.use_single_rw regmap: fix comment for regmap.use_single_write
This commit is contained in:
commit
6214a9fe2a
|
@ -94,11 +94,13 @@ struct regmap {
|
|||
bool (*readable_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 (*writeable_noinc_reg)(struct device *dev, unsigned int reg);
|
||||
bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
|
||||
const struct regmap_access_table *wr_table;
|
||||
const struct regmap_access_table *rd_table;
|
||||
const struct regmap_access_table *volatile_table;
|
||||
const struct regmap_access_table *precious_table;
|
||||
const struct regmap_access_table *wr_noinc_table;
|
||||
const struct regmap_access_table *rd_noinc_table;
|
||||
|
||||
int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
|
||||
|
@ -149,7 +151,7 @@ struct regmap {
|
|||
|
||||
/* if set, converts bulk read to single read */
|
||||
bool use_single_read;
|
||||
/* if set, converts bulk read to single read */
|
||||
/* if set, converts bulk write to single write */
|
||||
bool use_single_write;
|
||||
/* if set, the device supports multi write mode */
|
||||
bool can_multi_write;
|
||||
|
@ -183,6 +185,7 @@ bool regmap_writeable(struct regmap *map, unsigned int reg);
|
|||
bool regmap_readable(struct regmap *map, unsigned int reg);
|
||||
bool regmap_volatile(struct regmap *map, unsigned int reg);
|
||||
bool regmap_precious(struct regmap *map, unsigned int reg);
|
||||
bool regmap_writeable_noinc(struct regmap *map, unsigned int reg);
|
||||
bool regmap_readable_noinc(struct regmap *map, unsigned int reg);
|
||||
|
||||
int _regmap_write(struct regmap *map, unsigned int reg,
|
||||
|
|
|
@ -35,6 +35,16 @@
|
|||
*/
|
||||
#undef LOG_DEVICE
|
||||
|
||||
#ifdef LOG_DEVICE
|
||||
static inline bool regmap_should_log(struct regmap *map)
|
||||
{
|
||||
return (map->dev && strcmp(dev_name(map->dev), LOG_DEVICE) == 0);
|
||||
}
|
||||
#else
|
||||
static inline bool regmap_should_log(struct regmap *map) { return false; }
|
||||
#endif
|
||||
|
||||
|
||||
static int _regmap_update_bits(struct regmap *map, unsigned int reg,
|
||||
unsigned int mask, unsigned int val,
|
||||
bool *change, bool force_write);
|
||||
|
@ -168,6 +178,17 @@ bool regmap_precious(struct regmap *map, unsigned int reg)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool regmap_writeable_noinc(struct regmap *map, unsigned int reg)
|
||||
{
|
||||
if (map->writeable_noinc_reg)
|
||||
return map->writeable_noinc_reg(map->dev, reg);
|
||||
|
||||
if (map->wr_noinc_table)
|
||||
return regmap_check_range_table(map, reg, map->wr_noinc_table);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool regmap_readable_noinc(struct regmap *map, unsigned int reg)
|
||||
{
|
||||
if (map->readable_noinc_reg)
|
||||
|
@ -762,8 +783,8 @@ struct regmap *__regmap_init(struct device *dev,
|
|||
map->reg_stride_order = ilog2(map->reg_stride);
|
||||
else
|
||||
map->reg_stride_order = -1;
|
||||
map->use_single_read = config->use_single_rw || !bus || !bus->read;
|
||||
map->use_single_write = config->use_single_rw || !bus || !bus->write;
|
||||
map->use_single_read = config->use_single_read || !bus || !bus->read;
|
||||
map->use_single_write = config->use_single_write || !bus || !bus->write;
|
||||
map->can_multi_write = config->can_multi_write && bus && bus->write;
|
||||
if (bus) {
|
||||
map->max_raw_read = bus->max_raw_read;
|
||||
|
@ -777,11 +798,13 @@ struct regmap *__regmap_init(struct device *dev,
|
|||
map->rd_table = config->rd_table;
|
||||
map->volatile_table = config->volatile_table;
|
||||
map->precious_table = config->precious_table;
|
||||
map->wr_noinc_table = config->wr_noinc_table;
|
||||
map->rd_noinc_table = config->rd_noinc_table;
|
||||
map->writeable_reg = config->writeable_reg;
|
||||
map->readable_reg = config->readable_reg;
|
||||
map->volatile_reg = config->volatile_reg;
|
||||
map->precious_reg = config->precious_reg;
|
||||
map->writeable_noinc_reg = config->writeable_noinc_reg;
|
||||
map->readable_noinc_reg = config->readable_noinc_reg;
|
||||
map->cache_type = config->cache_type;
|
||||
|
||||
|
@ -1298,6 +1321,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
|
|||
map->readable_reg = config->readable_reg;
|
||||
map->volatile_reg = config->volatile_reg;
|
||||
map->precious_reg = config->precious_reg;
|
||||
map->writeable_noinc_reg = config->writeable_noinc_reg;
|
||||
map->readable_noinc_reg = config->readable_noinc_reg;
|
||||
map->cache_type = config->cache_type;
|
||||
|
||||
|
@ -1755,10 +1779,8 @@ int _regmap_write(struct regmap *map, unsigned int reg,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef LOG_DEVICE
|
||||
if (map->dev && strcmp(dev_name(map->dev), LOG_DEVICE) == 0)
|
||||
if (regmap_should_log(map))
|
||||
dev_info(map->dev, "%x <= %x\n", reg, val);
|
||||
#endif
|
||||
|
||||
trace_regmap_reg_write(map, reg, val);
|
||||
|
||||
|
@ -1897,6 +1919,69 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(regmap_raw_write);
|
||||
|
||||
/**
|
||||
* regmap_noinc_write(): Write data from a register without incrementing the
|
||||
* register number
|
||||
*
|
||||
* @map: Register map to write to
|
||||
* @reg: Register to write to
|
||||
* @val: Pointer to data buffer
|
||||
* @val_len: Length of output buffer in bytes.
|
||||
*
|
||||
* The regmap API usually assumes that bulk bus write operations will write a
|
||||
* range of registers. Some devices have certain registers for which a write
|
||||
* operation can write to an internal FIFO.
|
||||
*
|
||||
* The target register must be volatile but registers after it can be
|
||||
* completely unrelated cacheable registers.
|
||||
*
|
||||
* This will attempt multiple writes as required to write val_len bytes.
|
||||
*
|
||||
* A value of zero will be returned on success, a negative errno will be
|
||||
* returned in error cases.
|
||||
*/
|
||||
int regmap_noinc_write(struct regmap *map, unsigned int reg,
|
||||
const void *val, size_t val_len)
|
||||
{
|
||||
size_t write_len;
|
||||
int ret;
|
||||
|
||||
if (!map->bus)
|
||||
return -EINVAL;
|
||||
if (!map->bus->write)
|
||||
return -ENOTSUPP;
|
||||
if (val_len % map->format.val_bytes)
|
||||
return -EINVAL;
|
||||
if (!IS_ALIGNED(reg, map->reg_stride))
|
||||
return -EINVAL;
|
||||
if (val_len == 0)
|
||||
return -EINVAL;
|
||||
|
||||
map->lock(map->lock_arg);
|
||||
|
||||
if (!regmap_volatile(map, reg) || !regmap_writeable_noinc(map, reg)) {
|
||||
ret = -EINVAL;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
while (val_len) {
|
||||
if (map->max_raw_write && map->max_raw_write < val_len)
|
||||
write_len = map->max_raw_write;
|
||||
else
|
||||
write_len = val_len;
|
||||
ret = _regmap_raw_write(map, reg, val, write_len);
|
||||
if (ret)
|
||||
goto out_unlock;
|
||||
val = ((u8 *)val) + write_len;
|
||||
val_len -= write_len;
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
map->unlock(map->lock_arg);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(regmap_noinc_write);
|
||||
|
||||
/**
|
||||
* regmap_field_update_bits_base() - Perform a read/modify/write cycle a
|
||||
* register field.
|
||||
|
@ -2450,10 +2535,8 @@ static int _regmap_read(struct regmap *map, unsigned int reg,
|
|||
|
||||
ret = map->reg_read(context, reg, val);
|
||||
if (ret == 0) {
|
||||
#ifdef LOG_DEVICE
|
||||
if (map->dev && strcmp(dev_name(map->dev), LOG_DEVICE) == 0)
|
||||
if (regmap_should_log(map))
|
||||
dev_info(map->dev, "%x => %x\n", reg, *val);
|
||||
#endif
|
||||
|
||||
trace_regmap_reg_read(map, reg, *val);
|
||||
|
||||
|
|
|
@ -599,7 +599,8 @@ static const struct regmap_config s10_sdram_regmap_cfg = {
|
|||
.volatile_reg = s10_sdram_volatile_reg,
|
||||
.reg_read = s10_protected_reg_read,
|
||||
.reg_write = s10_protected_reg_write,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static int altr_s10_sdram_probe(struct platform_device *pdev)
|
||||
|
|
|
@ -254,7 +254,8 @@ static const struct regmap_config lm75_regmap_config = {
|
|||
.volatile_reg = lm75_is_volatile_reg,
|
||||
.val_format_endian = REGMAP_ENDIAN_BIG,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static void lm75_remove(void *data)
|
||||
|
|
|
@ -541,7 +541,8 @@ static const struct regmap_config lm95245_regmap_config = {
|
|||
.writeable_reg = lm95245_is_writeable_reg,
|
||||
.volatile_reg = lm95245_is_volatile_reg,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static const u32 lm95245_chip_config[] = {
|
||||
|
|
|
@ -212,7 +212,8 @@ static const struct regmap_config tmp102_regmap_config = {
|
|||
.volatile_reg = tmp102_is_volatile_reg,
|
||||
.val_format_endian = REGMAP_ENDIAN_BIG,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static int tmp102_probe(struct i2c_client *client,
|
||||
|
|
|
@ -345,7 +345,8 @@ static const struct regmap_config tmp108_regmap_config = {
|
|||
.volatile_reg = tmp108_is_volatile_reg,
|
||||
.val_format_endian = REGMAP_ENDIAN_BIG,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static int tmp108_probe(struct i2c_client *client,
|
||||
|
|
|
@ -206,7 +206,8 @@ static const struct regmap_config apds9960_regmap_config = {
|
|||
.name = APDS9960_REGMAP_NAME,
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
.use_single_rw = 1,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
|
||||
.volatile_table = &apds9960_volatile_table,
|
||||
.precious_table = &apds9960_precious_table,
|
||||
|
|
|
@ -473,17 +473,18 @@ static bool max44000_precious_reg(struct device *dev, unsigned int reg)
|
|||
}
|
||||
|
||||
static const struct regmap_config max44000_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
|
||||
.max_register = MAX44000_REG_PRX_DATA,
|
||||
.readable_reg = max44000_readable_reg,
|
||||
.writeable_reg = max44000_writeable_reg,
|
||||
.volatile_reg = max44000_volatile_reg,
|
||||
.precious_reg = max44000_precious_reg,
|
||||
.max_register = MAX44000_REG_PRX_DATA,
|
||||
.readable_reg = max44000_readable_reg,
|
||||
.writeable_reg = max44000_writeable_reg,
|
||||
.volatile_reg = max44000_volatile_reg,
|
||||
.precious_reg = max44000_precious_reg,
|
||||
|
||||
.use_single_rw = 1,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
};
|
||||
|
||||
static irqreturn_t max44000_trigger_handler(int irq, void *p)
|
||||
|
|
|
@ -140,7 +140,8 @@ static const struct regmap_config mlx90632_regmap = {
|
|||
.rd_table = &mlx90632_readable_regs_tbl,
|
||||
.wr_table = &mlx90632_writeable_regs_tbl,
|
||||
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.reg_format_endian = REGMAP_ENDIAN_BIG,
|
||||
.val_format_endian = REGMAP_ENDIAN_BIG,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
|
|
|
@ -68,7 +68,8 @@ const struct regmap_config tsc200x_regmap_config = {
|
|||
.read_flag_mask = TSC200X_REG_READ,
|
||||
.write_flag_mask = TSC200X_REG_PND0,
|
||||
.wr_table = &tsc200x_writable_table,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(tsc200x_regmap_config);
|
||||
|
||||
|
|
|
@ -108,7 +108,8 @@ static const struct regmap_config altr_a10sr_regmap_config = {
|
|||
|
||||
.cache_type = REGCACHE_NONE,
|
||||
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.read_flag_mask = 1,
|
||||
.write_flag_mask = 0,
|
||||
|
||||
|
|
|
@ -46,7 +46,8 @@ static int da9052_spi_probe(struct spi_device *spi)
|
|||
config.reg_bits = 7;
|
||||
config.pad_bits = 1;
|
||||
config.val_bits = 8;
|
||||
config.use_single_rw = 1;
|
||||
config.use_single_read = true;
|
||||
config.use_single_write = true;
|
||||
|
||||
da9052->regmap = devm_regmap_init_spi(spi, &config);
|
||||
if (IS_ERR(da9052->regmap)) {
|
||||
|
|
|
@ -57,7 +57,8 @@ static const struct regmap_config mc13xxx_regmap_spi_config = {
|
|||
.max_register = MC13XXX_NUMREGS,
|
||||
|
||||
.cache_type = REGCACHE_NONE,
|
||||
.use_single_rw = 1,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static int mc13xxx_spi_read(void *context, const void *reg, size_t reg_size,
|
||||
|
|
|
@ -613,7 +613,8 @@ static const struct regmap_config twl6040_regmap_config = {
|
|||
.writeable_reg = twl6040_writeable_reg,
|
||||
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static const struct regmap_irq twl6040_irqs[] = {
|
||||
|
|
|
@ -404,7 +404,8 @@ static const struct regmap_config ltc3589_regmap_config = {
|
|||
.max_register = LTC3589_L2DTV2,
|
||||
.reg_defaults = ltc3589_reg_defaults,
|
||||
.num_reg_defaults = ARRAY_SIZE(ltc3589_reg_defaults),
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
};
|
||||
|
||||
|
|
|
@ -321,7 +321,8 @@ static const struct regmap_config ltc3676_regmap_config = {
|
|||
.readable_reg = ltc3676_readable_reg,
|
||||
.volatile_reg = ltc3676_volatile_reg,
|
||||
.max_register = LTC3676_CLIRQ,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
};
|
||||
|
||||
|
|
|
@ -268,6 +268,13 @@ typedef void (*regmap_unlock)(void *);
|
|||
* field is NULL but precious_table (see below) is not, the
|
||||
* check is performed on such table (a register is precious if
|
||||
* it belongs to one of the ranges specified by precious_table).
|
||||
* @writeable_noinc_reg: Optional callback returning true if the register
|
||||
* supports multiple write operations without incrementing
|
||||
* the register number. If this field is NULL but
|
||||
* wr_noinc_table (see below) is not, the check is
|
||||
* performed on such table (a register is no increment
|
||||
* writeable if it belongs to one of the ranges specified
|
||||
* by wr_noinc_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
|
||||
|
@ -302,6 +309,7 @@ typedef void (*regmap_unlock)(void *);
|
|||
* @rd_table: As above, for read access.
|
||||
* @volatile_table: As above, for volatile registers.
|
||||
* @precious_table: As above, for precious registers.
|
||||
* @wr_noinc_table: As above, for no increment writeable registers.
|
||||
* @rd_noinc_table: As above, for no increment readable registers.
|
||||
* @reg_defaults: Power on reset values for registers (for use with
|
||||
* register cache support).
|
||||
|
@ -315,9 +323,12 @@ typedef void (*regmap_unlock)(void *);
|
|||
* masks are used.
|
||||
* @zero_flag_mask: If set, read_flag_mask and write_flag_mask are used even
|
||||
* if they are both empty.
|
||||
* @use_single_rw: If set, converts the bulk read and write operations into
|
||||
* a series of single read and write operations. This is useful
|
||||
* for device that does not support bulk read and write.
|
||||
* @use_single_read: If set, converts the bulk read operation into a series of
|
||||
* single read operations. This is useful for a device that
|
||||
* does not support bulk read.
|
||||
* @use_single_write: If set, converts the bulk write operation into a series of
|
||||
* single write operations. This is useful for a device that
|
||||
* does not support bulk write.
|
||||
* @can_multi_write: If set, the device supports the multi write mode of bulk
|
||||
* write operations, if clear multi write requests will be
|
||||
* split into individual write operations
|
||||
|
@ -352,6 +363,7 @@ struct regmap_config {
|
|||
bool (*readable_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 (*writeable_noinc_reg)(struct device *dev, unsigned int reg);
|
||||
bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
|
||||
|
||||
bool disable_locking;
|
||||
|
@ -369,6 +381,7 @@ struct regmap_config {
|
|||
const struct regmap_access_table *rd_table;
|
||||
const struct regmap_access_table *volatile_table;
|
||||
const struct regmap_access_table *precious_table;
|
||||
const struct regmap_access_table *wr_noinc_table;
|
||||
const struct regmap_access_table *rd_noinc_table;
|
||||
const struct reg_default *reg_defaults;
|
||||
unsigned int num_reg_defaults;
|
||||
|
@ -380,7 +393,8 @@ struct regmap_config {
|
|||
unsigned long write_flag_mask;
|
||||
bool zero_flag_mask;
|
||||
|
||||
bool use_single_rw;
|
||||
bool use_single_read;
|
||||
bool use_single_write;
|
||||
bool can_multi_write;
|
||||
|
||||
enum regmap_endian reg_format_endian;
|
||||
|
@ -979,6 +993,8 @@ int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
|
|||
int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val);
|
||||
int regmap_raw_write(struct regmap *map, unsigned int reg,
|
||||
const void *val, size_t val_len);
|
||||
int regmap_noinc_write(struct regmap *map, unsigned int reg,
|
||||
const void *val, size_t val_len);
|
||||
int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
|
||||
size_t val_count);
|
||||
int regmap_multi_reg_write(struct regmap *map, const struct reg_sequence *regs,
|
||||
|
@ -1222,6 +1238,13 @@ static inline int regmap_raw_write_async(struct regmap *map, unsigned int reg,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int regmap_noinc_write(struct regmap *map, unsigned int reg,
|
||||
const void *val, size_t val_len)
|
||||
{
|
||||
WARN_ONCE(1, "regmap API is disabled");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int regmap_bulk_write(struct regmap *map, unsigned int reg,
|
||||
const void *val, size_t val_count)
|
||||
{
|
||||
|
|
|
@ -359,7 +359,8 @@ static const struct regmap_config hda_regmap_cfg = {
|
|||
.cache_type = REGCACHE_RBTREE,
|
||||
.reg_read = hda_reg_read,
|
||||
.reg_write = hda_reg_write,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -857,7 +857,8 @@ static const struct regmap_config cs35l33_regmap = {
|
|||
.readable_reg = cs35l33_readable_register,
|
||||
.writeable_reg = cs35l33_writeable_register,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static int __maybe_unused cs35l33_runtime_resume(struct device *dev)
|
||||
|
|
|
@ -1105,7 +1105,8 @@ static struct regmap_config cs35l35_regmap = {
|
|||
.readable_reg = cs35l35_readable_register,
|
||||
.precious_reg = cs35l35_precious_register,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static irqreturn_t cs35l35_irq(int irq, void *data)
|
||||
|
|
|
@ -2362,7 +2362,9 @@ static const struct regmap_config cs43130_regmap = {
|
|||
.precious_reg = cs43130_precious_register,
|
||||
.volatile_reg = cs43130_volatile_register,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true, /* needed for regcache_sync */
|
||||
/* needed for regcache_sync */
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static u16 const cs43130_dc_threshold[CS43130_DC_THRESHOLD] = {
|
||||
|
|
|
@ -824,7 +824,8 @@ const struct regmap_config es8328_regmap_config = {
|
|||
.val_bits = 8,
|
||||
.max_register = ES8328_REG_MAX,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(es8328_regmap_config);
|
||||
|
||||
|
|
|
@ -963,7 +963,8 @@ static const struct regmap_config rt1305_regmap = {
|
|||
.num_reg_defaults = ARRAY_SIZE(rt1305_reg),
|
||||
.ranges = rt1305_ranges,
|
||||
.num_ranges = ARRAY_SIZE(rt1305_ranges),
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
|
|
|
@ -1201,7 +1201,8 @@ static const struct regmap_config rt5514_regmap = {
|
|||
.cache_type = REGCACHE_RBTREE,
|
||||
.reg_defaults = rt5514_reg,
|
||||
.num_reg_defaults = ARRAY_SIZE(rt5514_reg),
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static const struct i2c_device_id rt5514_i2c_id[] = {
|
||||
|
|
|
@ -1313,7 +1313,8 @@ static const struct snd_soc_component_driver soc_component_dev_rt5616 = {
|
|||
static const struct regmap_config rt5616_regmap = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.max_register = RT5616_DEVICE_ID + 1 + (ARRAY_SIZE(rt5616_ranges) *
|
||||
RT5616_PR_SPACING),
|
||||
.volatile_reg = rt5616_volatile_register,
|
||||
|
|
|
@ -2704,7 +2704,8 @@ static const struct snd_soc_component_driver soc_component_dev_rt5640 = {
|
|||
static const struct regmap_config rt5640_regmap = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
|
||||
.max_register = RT5640_VENDOR_ID2 + 1 + (ARRAY_SIZE(rt5640_ranges) *
|
||||
RT5640_PR_SPACING),
|
||||
|
|
|
@ -3559,7 +3559,8 @@ static const struct snd_soc_component_driver soc_component_dev_rt5645 = {
|
|||
static const struct regmap_config rt5645_regmap = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.max_register = RT5645_VENDOR_ID2 + 1 + (ARRAY_SIZE(rt5645_ranges) *
|
||||
RT5645_PR_SPACING),
|
||||
.volatile_reg = rt5645_volatile_register,
|
||||
|
@ -3575,7 +3576,8 @@ static const struct regmap_config rt5645_regmap = {
|
|||
static const struct regmap_config rt5650_regmap = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.max_register = RT5645_VENDOR_ID2 + 1 + (ARRAY_SIZE(rt5645_ranges) *
|
||||
RT5645_PR_SPACING),
|
||||
.volatile_reg = rt5645_volatile_register,
|
||||
|
@ -3592,7 +3594,8 @@ static const struct regmap_config temp_regmap = {
|
|||
.name="nocache",
|
||||
.reg_bits = 8,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.max_register = RT5645_VENDOR_ID2 + 1,
|
||||
.cache_type = REGCACHE_NONE,
|
||||
};
|
||||
|
|
|
@ -2124,7 +2124,8 @@ static const struct regmap_config rt5651_regmap = {
|
|||
.num_reg_defaults = ARRAY_SIZE(rt5651_reg),
|
||||
.ranges = rt5651_ranges,
|
||||
.num_ranges = ARRAY_SIZE(rt5651_ranges),
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
|
|
|
@ -1217,7 +1217,8 @@ static const struct snd_soc_component_driver soc_component_dev_rt5660 = {
|
|||
static const struct regmap_config rt5660_regmap = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
|
||||
.max_register = RT5660_VENDOR_ID2 + 1 + (ARRAY_SIZE(rt5660_ranges) *
|
||||
RT5660_PR_SPACING),
|
||||
|
|
|
@ -3252,7 +3252,8 @@ static const struct snd_soc_component_driver soc_component_dev_rt5663 = {
|
|||
static const struct regmap_config rt5663_v2_regmap = {
|
||||
.reg_bits = 16,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.max_register = 0x07fa,
|
||||
.volatile_reg = rt5663_v2_volatile_register,
|
||||
.readable_reg = rt5663_v2_readable_register,
|
||||
|
@ -3264,7 +3265,8 @@ static const struct regmap_config rt5663_v2_regmap = {
|
|||
static const struct regmap_config rt5663_regmap = {
|
||||
.reg_bits = 16,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.max_register = 0x03f3,
|
||||
.volatile_reg = rt5663_volatile_register,
|
||||
.readable_reg = rt5663_readable_register,
|
||||
|
@ -3277,7 +3279,8 @@ static const struct regmap_config temp_regmap = {
|
|||
.name = "nocache",
|
||||
.reg_bits = 16,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.max_register = 0x03f3,
|
||||
.cache_type = REGCACHE_NONE,
|
||||
};
|
||||
|
|
|
@ -4633,7 +4633,8 @@ static const struct regmap_config rt5665_regmap = {
|
|||
.cache_type = REGCACHE_RBTREE,
|
||||
.reg_defaults = rt5665_reg,
|
||||
.num_reg_defaults = ARRAY_SIZE(rt5665_reg),
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static const struct i2c_device_id rt5665_i2c_id[] = {
|
||||
|
|
|
@ -2375,7 +2375,8 @@ static const struct regmap_config rt5668_regmap = {
|
|||
.cache_type = REGCACHE_RBTREE,
|
||||
.reg_defaults = rt5668_reg,
|
||||
.num_reg_defaults = ARRAY_SIZE(rt5668_reg),
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static const struct i2c_device_id rt5668_i2c_id[] = {
|
||||
|
|
|
@ -2814,7 +2814,8 @@ static const struct snd_soc_component_driver soc_component_dev_rt5670 = {
|
|||
static const struct regmap_config rt5670_regmap = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.max_register = RT5670_VENDOR_ID2 + 1 + (ARRAY_SIZE(rt5670_ranges) *
|
||||
RT5670_PR_SPACING),
|
||||
.volatile_reg = rt5670_volatile_register,
|
||||
|
|
|
@ -2419,7 +2419,8 @@ static const struct regmap_config rt5682_regmap = {
|
|||
.cache_type = REGCACHE_RBTREE,
|
||||
.reg_defaults = rt5682_reg,
|
||||
.num_reg_defaults = ARRAY_SIZE(rt5682_reg),
|
||||
.use_single_rw = true,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
};
|
||||
|
||||
static const struct i2c_device_id rt5682_i2c_id[] = {
|
||||
|
|
Loading…
Reference in New Issue