mfd: tps65217: Add power button as subdevice
authorMarcin Niestroj <m.niestroj@grinn-global.com>
Fri, 9 Sep 2016 08:42:03 +0000 (10:42 +0200)
committerLee Jones <lee.jones@linaro.org>
Tue, 4 Oct 2016 14:48:03 +0000 (15:48 +0100)
Add tps65217 power buttor subdevice with assigned IRQ resources.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/tps65217.c

index 41b5d598814d73e6d392c98648777e0c6eef4add..57c87412106ff346b05bb0437630d25f2d7dab4b 100644 (file)
@@ -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)