OSDN Git Service

mfd: Add simple regmap based I2C driver
authorMichael Walle <michael@walle.cc>
Mon, 14 Sep 2020 21:43:29 +0000 (23:43 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 17 Sep 2020 14:56:58 +0000 (15:56 +0100)
commit3abee4579484c554961bb0af92a77adc0ebd791d
tree036427cf7ee2eb2fe6d263df7567d5151fa974ff
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
mfd: Add simple regmap based I2C driver

There are I2C devices which contain several different functions but
doesn't require any special access functions. For these kind of drivers
an I2C regmap should be enough.

Create an I2C driver which creates an I2C regmap and enumerates its
children. If a device wants to use this as its MFD core driver, it has
to add an individual compatible string. It may provide its own regmap
configuration.

Subdevices can use dev_get_regmap() on the parent to get their regmap
instance.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/Kconfig
drivers/mfd/Makefile
drivers/mfd/simple-mfd-i2c.c [new file with mode: 0644]