#include <linux/mfd/core.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/regmap.h>
static const struct mfd_cell act8945a_devs[] = {
.name = "act8945a-regulator",
.name = "act8945a-charger",
.of_compatible = "active-semi,act8945a-charger",
static const struct regmap_config act8945a_regmap_config = {
static int act8945a_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
regmap = devm_regmap_init_i2c(i2c, &act8945a_regmap_config);
dev_err(&i2c->dev, "regmap init failed: %d\n", ret);
i2c_set_clientdata(i2c, regmap);
ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_NONE,
act8945a_devs, ARRAY_SIZE(act8945a_devs),
dev_err(&i2c->dev, "Failed to add sub devices\n");
static const struct i2c_device_id act8945a_i2c_id[] = {