summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/internal.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-04 15:48:30 -0600
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-06 10:47:34 +0100
commit0135bbcc7a0cc056f0203ff839466236b8e3dc19 (patch)
tree79f60f53754cfae8b9a5d9504502131d44ed3b14 /drivers/base/regmap/internal.h
parentdd775ae2549217d3ae09363e3edb305d0fa19928 (diff)
downloadlinux-0135bbcc7a0cc056f0203ff839466236b8e3dc19.tar.bz2
regmap: introduce explicit bus_context for bus callbacks
The only context needed by I2C and SPI bus definitions is the device itself; this can be converted to an i2c_client or spi_device in order to perform IO on the device. However, other bus types may need more context in order to perform IO. Enable this by having regmap_init accept a bus_context parameter, and pass this to all bus callbacks. The existing callbacks simply pass the struct device here. Future bus types may pass something else. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r--drivers/base/regmap/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index fcafc5b2e651..b95fd1f25295 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -38,6 +38,7 @@ struct regmap {
void *work_buf; /* Scratch buffer used to format I/O */
struct regmap_format format; /* Buffer format */
const struct regmap_bus *bus;
+ void *bus_context;
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs;