diff options
author | Marcin Niestroj <m.niestroj@grinn-global.com> | 2016-09-09 04:42:03 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2016-10-04 10:48:03 -0400 |
commit | dea9c730e568e86063a85df355d5ad7c1cdda895 (patch) | |
tree | 96486fe1df4357e4bbc27747746e769fc0d9a24e | |
parent | 6556bdacf646fcaa0586123ba85412de1c8f0eee (diff) |
mfd: tps65217: Add power button as subdevice
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>
-rw-r--r-- | drivers/mfd/tps65217.c | 10 |
1 files changed, 10 insertions, 0 deletions
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[] = { | |||
38 | DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"), | 38 | DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_USB, "USB"), |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static struct resource pb_resources[] = { | ||
42 | DEFINE_RES_IRQ_NAMED(TPS65217_IRQ_PB, "PB"), | ||
43 | }; | ||
44 | |||
41 | struct tps65217_irq { | 45 | struct tps65217_irq { |
42 | int mask; | 46 | int mask; |
43 | int interrupt; | 47 | int interrupt; |
@@ -122,6 +126,12 @@ static struct mfd_cell tps65217s[] = { | |||
122 | .resources = charger_resources, | 126 | .resources = charger_resources, |
123 | .of_compatible = "ti,tps65217-charger", | 127 | .of_compatible = "ti,tps65217-charger", |
124 | }, | 128 | }, |
129 | { | ||
130 | .name = "tps65217-pwrbutton", | ||
131 | .num_resources = ARRAY_SIZE(pb_resources), | ||
132 | .resources = pb_resources, | ||
133 | .of_compatible = "ti,tps65217-pwrbutton", | ||
134 | }, | ||
125 | }; | 135 | }; |
126 | 136 | ||
127 | static irqreturn_t tps65217_irq_thread(int irq, void *data) | 137 | static irqreturn_t tps65217_irq_thread(int irq, void *data) |