]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: introduce explicit bus_context for bus callbacks
authorStephen Warren <swarren@nvidia.com>
Wed, 4 Apr 2012 21:48:30 +0000 (15:48 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 13 Apr 2012 10:29:15 +0000 (11:29 +0100)
commit9e62ae8379eb76dd0b1919a3a772ce248cc65382
treeefef02fcab888c3164f6920e064660cf5d44d6a0
parent07af7be86752e9c8df1d384155c6dcc347d22dff
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>
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