mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
regmap: Add 1-Wire bus support
Add basic support regmap (register map access) API for 1-Wire bus Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2ea659a9ef
commit
cc5d0db390
4 changed files with 285 additions and 1 deletions
|
@ -461,6 +461,10 @@ struct regmap *__regmap_init_spmi_ext(struct spmi_device *dev,
|
|||
const struct regmap_config *config,
|
||||
struct lock_class_key *lock_key,
|
||||
const char *lock_name);
|
||||
struct regmap *__regmap_init_w1(struct device *w1_dev,
|
||||
const struct regmap_config *config,
|
||||
struct lock_class_key *lock_key,
|
||||
const char *lock_name);
|
||||
struct regmap *__regmap_init_mmio_clk(struct device *dev, const char *clk_id,
|
||||
void __iomem *regs,
|
||||
const struct regmap_config *config,
|
||||
|
@ -493,6 +497,10 @@ struct regmap *__devm_regmap_init_spmi_ext(struct spmi_device *dev,
|
|||
const struct regmap_config *config,
|
||||
struct lock_class_key *lock_key,
|
||||
const char *lock_name);
|
||||
struct regmap *__devm_regmap_init_w1(struct device *w1_dev,
|
||||
const struct regmap_config *config,
|
||||
struct lock_class_key *lock_key,
|
||||
const char *lock_name);
|
||||
struct regmap *__devm_regmap_init_mmio_clk(struct device *dev,
|
||||
const char *clk_id,
|
||||
void __iomem *regs,
|
||||
|
@ -596,6 +604,19 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
|
|||
__regmap_lockdep_wrapper(__regmap_init_spmi_ext, #config, \
|
||||
dev, config)
|
||||
|
||||
/**
|
||||
* regmap_init_w1() - Initialise register map
|
||||
*
|
||||
* @w1_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_w1(w1_dev, config) \
|
||||
__regmap_lockdep_wrapper(__regmap_init_w1, #config, \
|
||||
w1_dev, config)
|
||||
|
||||
/**
|
||||
* regmap_init_mmio_clk() - Initialise register map with register clock
|
||||
*
|
||||
|
@ -711,6 +732,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
|
|||
__regmap_lockdep_wrapper(__devm_regmap_init_spmi_ext, #config, \
|
||||
dev, config)
|
||||
|
||||
/**
|
||||
* devm_regmap_init_w1() - Initialise managed register map
|
||||
*
|
||||
* @w1_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_w1(w1_dev, config) \
|
||||
__regmap_lockdep_wrapper(__devm_regmap_init_w1, #config, \
|
||||
w1_dev, config)
|
||||
/**
|
||||
* devm_regmap_init_mmio_clk() - Initialise managed register map with clock
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue