summaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-14 12:11:08 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-14 12:11:08 -0500
commita31f68497e07f5fec7155bc07dc633fc6eaa0adb (patch)
tree9324a5f1327a5a9dc0548dd21d5dcb569149a834 /include/linux/regmap.h
parent5dea215028686a67e815c32a54dc89fb3467ab05 (diff)
parent878ec67b3ac528a2b6d44055f049cdbb9cfda30c (diff)
Merge remote-tracking branch 'regmap/topic/mmio' into regmap-next
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h47
1 files changed, 41 insertions, 6 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 9e790f956025..017b3bd085a2 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -299,9 +299,9 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c,
299 const struct regmap_config *config); 299 const struct regmap_config *config);
300struct regmap *regmap_init_spi(struct spi_device *dev, 300struct regmap *regmap_init_spi(struct spi_device *dev,
301 const struct regmap_config *config); 301 const struct regmap_config *config);
302struct regmap *regmap_init_mmio(struct device *dev, 302struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id,
303 void __iomem *regs, 303 void __iomem *regs,
304 const struct regmap_config *config); 304 const struct regmap_config *config);
305 305
306struct regmap *devm_regmap_init(struct device *dev, 306struct regmap *devm_regmap_init(struct device *dev,
307 const struct regmap_bus *bus, 307 const struct regmap_bus *bus,
@@ -311,9 +311,44 @@ struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c,
311 const struct regmap_config *config); 311 const struct regmap_config *config);
312struct regmap *devm_regmap_init_spi(struct spi_device *dev, 312struct regmap *devm_regmap_init_spi(struct spi_device *dev,
313 const struct regmap_config *config); 313 const struct regmap_config *config);
314struct regmap *devm_regmap_init_mmio(struct device *dev, 314struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id,
315 void __iomem *regs, 315 void __iomem *regs,
316 const struct regmap_config *config); 316 const struct regmap_config *config);
317
318/**
319 * regmap_init_mmio(): Initialise register map
320 *
321 * @dev: Device that will be interacted with
322 * @regs: Pointer to memory-mapped IO region
323 * @config: Configuration for register map
324 *
325 * The return value will be an ERR_PTR() on error or a valid pointer to
326 * a struct regmap.
327 */
328static inline struct regmap *regmap_init_mmio(struct device *dev,
329 void __iomem *regs,
330 const struct regmap_config *config)
331{
332 return regmap_init_mmio_clk(dev, NULL, regs, config);
333}
334
335/**
336 * devm_regmap_init_mmio(): Initialise managed register map
337 *
338 * @dev: Device that will be interacted with
339 * @regs: Pointer to memory-mapped IO region
340 * @config: Configuration for register map
341 *
342 * The return value will be an ERR_PTR() on error or a valid pointer
343 * to a struct regmap. The regmap will be automatically freed by the
344 * device management code.
345 */
346static inline struct regmap *devm_regmap_init_mmio(struct device *dev,
347 void __iomem *regs,
348 const struct regmap_config *config)
349{
350 return devm_regmap_init_mmio_clk(dev, NULL, regs, config);
351}
317 352
318void regmap_exit(struct regmap *map); 353void regmap_exit(struct regmap *map);
319int regmap_reinit_cache(struct regmap *map, 354int regmap_reinit_cache(struct regmap *map,