Commit d0f7a6d6 authored by Haojian Zhuang's avatar Haojian Zhuang Committed by Samuel Ortiz

mfd: Enable onkey on max8925

Enable onkey feature in max8925 driver.
Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 5af568cb
...@@ -90,6 +90,24 @@ static struct mfd_cell rtc_devs[] = { ...@@ -90,6 +90,24 @@ static struct mfd_cell rtc_devs[] = {
}, },
}; };
static struct resource onkey_resources[] = {
{
.name = "max8925-onkey",
.start = MAX8925_IRQ_GPM_SW_3SEC,
.end = MAX8925_IRQ_GPM_SW_3SEC,
.flags = IORESOURCE_IRQ,
},
};
static struct mfd_cell onkey_devs[] = {
{
.name = "max8925-onkey",
.num_resources = 1,
.resources = &onkey_resources[0],
.id = -1,
},
};
#define MAX8925_REG_RESOURCE(_start, _end) \ #define MAX8925_REG_RESOURCE(_start, _end) \
{ \ { \
.start = MAX8925_##_start, \ .start = MAX8925_##_start, \
...@@ -596,6 +614,15 @@ int __devinit max8925_device_init(struct max8925_chip *chip, ...@@ -596,6 +614,15 @@ int __devinit max8925_device_init(struct max8925_chip *chip,
dev_err(chip->dev, "Failed to add rtc subdev\n"); dev_err(chip->dev, "Failed to add rtc subdev\n");
goto out; goto out;
} }
ret = mfd_add_devices(chip->dev, 0, &onkey_devs[0],
ARRAY_SIZE(onkey_devs),
&onkey_resources[0], 0);
if (ret < 0) {
dev_err(chip->dev, "Failed to add onkey subdev\n");
goto out_dev;
}
if (pdata && pdata->regulator[0]) { if (pdata && pdata->regulator[0]) {
ret = mfd_add_devices(chip->dev, 0, &regulator_devs[0], ret = mfd_add_devices(chip->dev, 0, &regulator_devs[0],
ARRAY_SIZE(regulator_devs), ARRAY_SIZE(regulator_devs),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment