From c9afbb05a9ffbef0976242ab1135af6814ccff0f Mon Sep 17 00:00:00 2001 From: Josh Cartwright Date: Wed, 12 Feb 2014 13:44:27 -0600 Subject: regmap: spmi: support base and extended register spaces SPMI states that a slave may contain two register spaces, the Base register space is a 5-bit byte-addressable space accessed via the Register Read/Write and Register Zero Write command sequences, and the Extended register space: a 16-bit byte-addressable space accessed via the Extended Read/Write and Extended Read/Write Long command sequences. Provide support for accessing both of these spaces, taking advantage of the more bandwidth-efficient commands ('Register 0 Write' vs 'Register Write', and 'Extended Register Read/Write' vs 'Extended Register Read/Write Long') when possible. Signed-off-by: Josh Cartwright Acked-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- include/linux/regmap.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/linux') diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 4149f1a9b003..8cc73ac6f888 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -321,8 +321,10 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c, const struct regmap_config *config); struct regmap *regmap_init_spi(struct spi_device *dev, const struct regmap_config *config); -struct regmap *regmap_init_spmi(struct spmi_device *dev, - const struct regmap_config *config); +struct regmap *regmap_init_spmi_base(struct spmi_device *dev, + const struct regmap_config *config); +struct regmap *regmap_init_spmi_ext(struct spmi_device *dev, + const struct regmap_config *config); struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id, void __iomem *regs, const struct regmap_config *config); @@ -335,8 +337,10 @@ struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c, const struct regmap_config *config); struct regmap *devm_regmap_init_spi(struct spi_device *dev, const struct regmap_config *config); -struct regmap *devm_regmap_init_spmi(struct spmi_device *dev, - const struct regmap_config *config); +struct regmap *devm_regmap_init_spmi_base(struct spmi_device *dev, + const struct regmap_config *config); +struct regmap *devm_regmap_init_spmi_ext(struct spmi_device *dev, + const struct regmap_config *config); struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id, void __iomem *regs, const struct regmap_config *config); -- cgit v1.2.3-59-g8ed1b