regmap: Add soundwire bus support

Add soundwire bus support to regmap. This change add init
function to initialise soundwire register map.

Change-Id: Ib45da17e62468bfc2d4dcfc5acf6534ef1150ba9
Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
Meng Wang
2018-01-23 09:40:52 +08:00
committed by Meng Wang
parent 2b0715dd21
commit abedd757ba

View File

@ -34,6 +34,7 @@ struct regmap_range_cfg;
struct regmap_field;
struct snd_ac97;
struct sdw_slave;
struct swr_device;
/* An enum of all the supported cache types */
enum regcache_type {
@ -610,6 +611,10 @@ struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
const struct regmap_config *config,
struct lock_class_key *lock_key,
const char *lock_name);
struct regmap *__devm_regmap_init_swr(struct swr_device *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.
@ -796,6 +801,18 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
__regmap_lockdep_wrapper(__regmap_init_sdw, #config, \
sdw, config)
/**
* regmap_init_swr(): Initialise register map
*
* @swr: 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_swr(swr, config) \
__regmap_lockdep_wrapper(__regmap_init_swr, #config, \
swr, config)
/**
* devm_regmap_init() - Initialise managed register map
@ -968,6 +985,20 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
#define devm_regmap_init_slimbus(slimbus, config) \
__regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config, \
slimbus, config)
/**
* devm_regmap_init_swr(): Initialise managed register map
*
* @swr: 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_swr(swr, config) \
__regmap_lockdep_wrapper(__devm_regmap_init_swr, #config, \
swr, 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);