From dea9c730e568e86063a85df355d5ad7c1cdda895 Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Fri, 9 Sep 2016 10:42:03 +0200 Subject: [PATCH] mfd: tps65217: Add power button as subdevice Add tps65217 power buttor subdevice with assigned IRQ resources. Signed-off-by: Marcin Niestroj Acked-by: Tony Lindgren Signed-off-by: Lee Jones --- drivers/mfd/tps65217.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 41b5d598814d..57c87412106f 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -38,6 +38,10 @@ static struct resource charger_resources[] = { DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"), }; +static struct resource pb_resources[] = { + DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"), +}; + struct tps65217_irq { int mask; int interrupt; @@ -122,6 +126,12 @@ static struct mfd_cell tps65217s[] = { .resources = charger_resources, .of_compatible = "ti,tps65217-charger", }, + { + .name = "tps65217-pwrbutton", + .num_resources = ARRAY_SIZE(pb_resources), + .resources = pb_resources, + .of_compatible = "ti,tps65217-pwrbutton", + }, }; static irqreturn_t tps65217_irq_thread(int irq, void *data)