Merge tag 'regmap-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown: "Quite a busy release for regmap, mostly support for new features useful on fairly small subsets of devices. The user visible features are: - A new API for registering large numbers of regmap fields at once. - Support for Intel AVMM buses connected via SPI. - Support for 12/20 address/value layouts. - Support for yet another scheme for acknowledging interrupts used on some Qualcomm devices" * tag 'regmap-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: irq: Add support to clear ack registers regmap: add support to regmap_field_bulk_alloc/free apis regmap: destroy mutex (if used) in regmap_exit() regmap: debugfs: use semicolons rather than commas to separate statements regmap: debugfs: Fix more error path regressions regmap: Add support for 12/20 register formatting regmap: Add can_sleep configuration option regmap: soundwire: remove unused header mod_devicetable.h regmap: Use flexible sleep regmap: add Intel SPI Slave to AVMM Bus Bridge support
This commit is contained in:
@@ -342,6 +342,7 @@ typedef void (*regmap_unlock)(void *);
|
||||
* @hwlock_id: Specify the hardware spinlock id.
|
||||
* @hwlock_mode: The hardware spinlock mode, should be HWLOCK_IRQSTATE,
|
||||
* HWLOCK_IRQ or 0.
|
||||
* @can_sleep: Optional, specifies whether regmap operations can sleep.
|
||||
*/
|
||||
struct regmap_config {
|
||||
const char *name;
|
||||
@@ -398,6 +399,8 @@ struct regmap_config {
|
||||
bool use_hwlock;
|
||||
unsigned int hwlock_id;
|
||||
unsigned int hwlock_mode;
|
||||
|
||||
bool can_sleep;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -567,6 +570,10 @@ struct regmap *__regmap_init_sdw(struct sdw_slave *sdw,
|
||||
const struct regmap_config *config,
|
||||
struct lock_class_key *lock_key,
|
||||
const char *lock_name);
|
||||
struct regmap *__regmap_init_spi_avmm(struct spi_device *spi,
|
||||
const struct regmap_config *config,
|
||||
struct lock_class_key *lock_key,
|
||||
const char *lock_name);
|
||||
|
||||
struct regmap *__devm_regmap_init(struct device *dev,
|
||||
const struct regmap_bus *bus,
|
||||
@@ -620,6 +627,10 @@ struct regmap *__devm_regmap_init_i3c(struct i3c_device *i3c,
|
||||
const struct regmap_config *config,
|
||||
struct lock_class_key *lock_key,
|
||||
const char *lock_name);
|
||||
struct regmap *__devm_regmap_init_spi_avmm(struct spi_device *spi,
|
||||
const struct regmap_config *config,
|
||||
struct lock_class_key *lock_key,
|
||||
const char *lock_name);
|
||||
/*
|
||||
* Wrapper for regmap_init macros to include a unique lockdep key and name
|
||||
* for each call. No-op if CONFIG_LOCKDEP is not set.
|
||||
@@ -806,6 +817,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
|
||||
__regmap_lockdep_wrapper(__regmap_init_sdw, #config, \
|
||||
sdw, config)
|
||||
|
||||
/**
|
||||
* regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
|
||||
* to AVMM Bus Bridge
|
||||
*
|
||||
* @spi: Device that will be interacted with
|
||||
* @config: Configuration for register map
|
||||
*
|
||||
* The return value will be an ERR_PTR() on error or a valid pointer
|
||||
* to a struct regmap.
|
||||
*/
|
||||
#define regmap_init_spi_avmm(spi, config) \
|
||||
__regmap_lockdep_wrapper(__regmap_init_spi_avmm, #config, \
|
||||
spi, config)
|
||||
|
||||
/**
|
||||
* devm_regmap_init() - Initialise managed register map
|
||||
@@ -993,6 +1017,21 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
|
||||
__regmap_lockdep_wrapper(__devm_regmap_init_i3c, #config, \
|
||||
i3c, config)
|
||||
|
||||
/**
|
||||
* devm_regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
|
||||
* to AVMM Bus Bridge
|
||||
*
|
||||
* @spi: Device that will be interacted with
|
||||
* @config: Configuration for register map
|
||||
*
|
||||
* The return value will be an ERR_PTR() on error or a valid pointer
|
||||
* to a struct regmap. The map will be automatically freed by the
|
||||
* device management code.
|
||||
*/
|
||||
#define devm_regmap_init_spi_avmm(spi, config) \
|
||||
__regmap_lockdep_wrapper(__devm_regmap_init_spi_avmm, #config, \
|
||||
spi, config)
|
||||
|
||||
int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk);
|
||||
void regmap_mmio_detach_clk(struct regmap *map);
|
||||
void regmap_exit(struct regmap *map);
|
||||
@@ -1150,6 +1189,17 @@ 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_bulk_alloc(struct regmap *regmap,
|
||||
struct regmap_field **rm_field,
|
||||
struct reg_field *reg_field,
|
||||
int num_fields);
|
||||
void regmap_field_bulk_free(struct regmap_field *field);
|
||||
int devm_regmap_field_bulk_alloc(struct device *dev, struct regmap *regmap,
|
||||
struct regmap_field **field,
|
||||
struct reg_field *reg_field, int num_fields);
|
||||
void devm_regmap_field_bulk_free(struct device *dev,
|
||||
struct regmap_field *field);
|
||||
|
||||
int regmap_field_read(struct regmap_field *field, unsigned int *val);
|
||||
int regmap_field_update_bits_base(struct regmap_field *field,
|
||||
unsigned int mask, unsigned int val,
|
||||
@@ -1305,6 +1355,7 @@ struct regmap_irq_sub_irq_map {
|
||||
* @mask_invert: Inverted mask register: cleared bits are masked out.
|
||||
* @use_ack: Use @ack register even if it is zero.
|
||||
* @ack_invert: Inverted ack register: cleared bits for ack.
|
||||
* @clear_ack: Use this to set 1 and 0 or vice-versa to clear interrupts.
|
||||
* @wake_invert: Inverted wake register: cleared bits are wake enabled.
|
||||
* @type_invert: Invert the type flags.
|
||||
* @type_in_mask: Use the mask registers for controlling irq type. For
|
||||
@@ -1353,6 +1404,7 @@ struct regmap_irq_chip {
|
||||
bool mask_invert:1;
|
||||
bool use_ack:1;
|
||||
bool ack_invert:1;
|
||||
bool clear_ack:1;
|
||||
bool wake_invert:1;
|
||||
bool runtime_pm:1;
|
||||
bool type_invert:1;
|
||||
|
Reference in New Issue
Block a user