[PATCH v6 0/3] mfd: tps65217: Add power-button and IRQ support

STALE3692d

Revision v6 of 5 in this series.

3 messages, 2 authors, 2016-09-12 · open the first message on its own page

[PATCH v6 0/3] mfd: tps65217: Add power-button and IRQ support

From: Marcin Niestroj <hidden>
Date: 2016-09-09 08:42:01

Hi,

The following patches add tps65217 power button support and make it usable
with am335x boards. It was developed and rebased on v4.8-rc5.

Changes v5 -> v6 (suggested by Dmitry):
 * Use dev_get_regmap() instead of fragile pointer calculations
 * Keep old formatting for flags as single function argument

Changes v4 -> v5:
 * Dropped two patches (they were already dropped in v4 resend):
   * "power_supply: tps65217-charger: Fix NULL deref during property export"
     (already in mainline)
   * "power_supply: tps65217-charger: Add support for IRQs" (queued into
     power-supply's -next branch)
 * Combine tps65217 and tps65218 power button drivers (as suggested by Dmitry)
 * Combine device-tree documentation for tps65217 and tps65218 power buttons

Changes v3 -> v4:
 * Add irq_set_parent() during irq init (suggested by Grygorii)
 * Remove hardcoded IRQ trigger type, rely on DT bindings instead
   (suggested by Grygorii)
 * Rebased and tested on top of v4.7-rc4

Changes v2 -> v3 (suggested by Lee):
 * Alphabetical reorder of includes
 * Rename enum tps65217_irqs -> tps65217_irq_type, so we won't confuse
   it with structure object with the same name.
 * Fix inconsistent order of irq_enable and irq_disable
 * Remove redundant 'else' when returning from tps65217_irq_thread

Changes v1 -> v2:
 * Added information about parent device in tps65217 power button
   device-tree binding documentation (suggested by Rob)
 * Rebased and tested on top of v4.7-rc3

Marcin Niestroj (3):
  mfd: tps65217: Add support for IRQs
  mfd: tps65217: Add power button as subdevice
  Input: Add support for tps65217 power button

 .../bindings/input/tps65218-pwrbutton.txt          |  17 +-
 drivers/input/misc/Kconfig                         |   4 +-
 drivers/input/misc/tps65218-pwrbutton.c            |  92 ++++++---
 drivers/mfd/Kconfig                                |   1 +
 drivers/mfd/tps65217.c                             | 205 ++++++++++++++++++++-
 include/linux/mfd/tps65217.h                       |  12 ++
 6 files changed, 291 insertions(+), 40 deletions(-)

-- 
2.9.3

[PATCH v6 2/3] mfd: tps65217: Add power button as subdevice

From: Marcin Niestroj <hidden>
Date: 2016-09-09 08:42:03

Add tps65217 power buttor subdevice with assigned IRQ resources.

Signed-off-by: Marcin Niestroj <redacted>
Acked-by: Lee Jones <redacted>
Acked-by: Tony Lindgren <tony@atomide.com>
---
Depends on patch 1 in series

Changes v1 -> v6: none

 drivers/mfd/tps65217.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 41b5d59..57c8741 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)
-- 
2.9.3

Re: [PATCH v6 2/3] mfd: tps65217: Add power button as subdevice

From: Lee Jones <hidden>
Date: 2016-09-12 13:57:56

On Fri, 09 Sep 2016, Marcin Niestroj wrote:
Add tps65217 power buttor subdevice with assigned IRQ resources.

Signed-off-by: Marcin Niestroj <redacted>
Acked-by: Lee Jones <redacted>
Acked-by: Tony Lindgren <tony@atomide.com>
---
Depends on patch 1 in series

Changes v1 -> v6: none

 drivers/mfd/tps65217.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
Applied, thanks.
quoted hunk
diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 41b5d59..57c8741 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)
-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help