diff options
Diffstat (limited to 'include/linux/regmap.h')
| -rw-r--r-- | include/linux/regmap.h | 49 | 
1 files changed, 49 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index ca3434dca3a0..a3bc695bcca0 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -24,6 +24,7 @@ struct module;  struct clk;  struct device;  struct device_node; +struct fsi_device;  struct i2c_client;  struct i3c_device;  struct irq_domain; @@ -628,6 +629,10 @@ 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 *__regmap_init_fsi(struct fsi_device *fsi_dev, +				 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, @@ -693,6 +698,11 @@ 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); +struct regmap *__devm_regmap_init_fsi(struct fsi_device *fsi_dev, +				      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. @@ -920,6 +930,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);  				 spi, config)  /** + * regmap_init_fsi() - Initialise register map + * + * @fsi_dev: 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_fsi(fsi_dev, config)				\ +	__regmap_lockdep_wrapper(__regmap_init_fsi, #config, fsi_dev,	\ +				 config) + +/**   * devm_regmap_init() - Initialise managed register map   *   * @dev: Device that will be interacted with @@ -1148,6 +1171,20 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);  	__regmap_lockdep_wrapper(__devm_regmap_init_spi_avmm, #config,	\  				 spi, config) +/** + * devm_regmap_init_fsi() - Initialise managed register map + * + * @fsi_dev: 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 regmap will be automatically freed by the + * device management code. + */ +#define devm_regmap_init_fsi(fsi_dev, config)				\ +	__regmap_lockdep_wrapper(__devm_regmap_init_fsi, #config,	\ +				 fsi_dev, 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); @@ -1219,6 +1256,7 @@ static inline int regmap_write_bits(struct regmap *map, unsigned int reg,  int regmap_get_val_bytes(struct regmap *map);  int regmap_get_max_register(struct regmap *map);  int regmap_get_reg_stride(struct regmap *map); +bool regmap_might_sleep(struct regmap *map);  int regmap_async_complete(struct regmap *map);  bool regmap_can_raw_write(struct regmap *map);  size_t regmap_get_raw_read_max(struct regmap *map); @@ -1542,6 +1580,8 @@ struct regmap_irq_chip_data;   *		     before regmap_irq_handler process the interrupts.   * @handle_post_irq: Driver specific callback to handle interrupt from device   *		     after handling the interrupts in regmap_irq_handler(). + * @handle_mask_sync: Callback used to handle IRQ mask syncs. The index will be + *		      in the range [0, num_regs)   * @set_type_virt:   Driver specific callback to extend regmap_irq_set_type()   *		     and configure virt regs. Deprecated, use @set_type_config   *		     callback and config registers instead. @@ -1603,6 +1643,9 @@ struct regmap_irq_chip {  	int (*handle_pre_irq)(void *irq_drv_data);  	int (*handle_post_irq)(void *irq_drv_data); +	int (*handle_mask_sync)(struct regmap *map, int index, +				unsigned int mask_buf_def, +				unsigned int mask_buf, void *irq_drv_data);  	int (*set_type_virt)(unsigned int **buf, unsigned int type,  			     unsigned long hwirq, int reg);  	int (*set_type_config)(unsigned int **buf, unsigned int type, @@ -1905,6 +1948,12 @@ static inline int regmap_get_reg_stride(struct regmap *map)  	return -EINVAL;  } +static inline bool regmap_might_sleep(struct regmap *map) +{ +	WARN_ONCE(1, "regmap API is disabled"); +	return true; +} +  static inline int regcache_sync(struct regmap *map)  {  	WARN_ONCE(1, "regmap API is disabled");  |