Commit 1ea9bd88 authored by Marco Felsch's avatar Marco Felsch Committed by Lee Jones
Browse files

mfd: da9062: add support for the DA9062 GPIOs in the core



Currently the da9062 GPIO's aren't available. The patch adds the support
to make these available by adding a gpio device with the corresponding
irq resources. Furthermore the patch fixes a minor style issue for the
onkey device.

Signed-off-by: default avatarMarco Felsch <m.felsch@pengutronix.de>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 2b8bd606
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -233,6 +233,14 @@ static struct resource da9062_onkey_resources[] = {
	DEFINE_RES_NAMED(DA9062_IRQ_ONKEY, 1, "ONKEY", IORESOURCE_IRQ),
};

static struct resource da9062_gpio_resources[] = {
	DEFINE_RES_NAMED(DA9062_IRQ_GPI0, 1, "GPI0", IORESOURCE_IRQ),
	DEFINE_RES_NAMED(DA9062_IRQ_GPI1, 1, "GPI1", IORESOURCE_IRQ),
	DEFINE_RES_NAMED(DA9062_IRQ_GPI2, 1, "GPI2", IORESOURCE_IRQ),
	DEFINE_RES_NAMED(DA9062_IRQ_GPI3, 1, "GPI3", IORESOURCE_IRQ),
	DEFINE_RES_NAMED(DA9062_IRQ_GPI4, 1, "GPI4", IORESOURCE_IRQ),
};

static const struct mfd_cell da9062_devs[] = {
	{
		.name		= "da9062-core",
@@ -268,6 +276,12 @@ static const struct mfd_cell da9062_devs[] = {
		.resources	= da9062_onkey_resources,
		.of_compatible	= "dlg,da9062-onkey",
	},
	{
		.name		= "da9062-gpio",
		.num_resources	= ARRAY_SIZE(da9062_gpio_resources),
		.resources	= da9062_gpio_resources,
		.of_compatible	= "dlg,da9062-gpio",
	},
};

static int da9062_clear_fault_log(struct da9062 *chip)