regmap: introduce explicit bus_context for bus callbacks
authorStephen Warren <swarren@nvidia.com>
Wed, 4 Apr 2012 21:48:30 +0000 (15:48 -0600)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 05:36:32 +0000 (10:36 +0530)
commitcee7ac2412a11dfa1a526b916326fc186ac50c05
tree0266a731ed22894096c8f7325cc9b641da98bbb6
parent2877e7f2dfff475678e8cee78497ac0095f88f42
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>
(cherry picked from commit 0135bbcc7a0cc056f0203ff839466236b8e3dc19)

Change-Id: I36b3fb3433af6e6f1e673fc6c73ba21f7eb4d054
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/96502
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Stephen Warren <swarren@nvidia.com>
drivers/base/regmap/internal.h
drivers/base/regmap/regmap-i2c.c
drivers/base/regmap/regmap-spi.c
drivers/base/regmap/regmap.c
include/linux/regmap.h