Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1606787 > unrolled thread

[PATCHv2 0/4] Regmap IRQ fix and related changes CPCAP

Started byTony Lindgren <tony@atomide.com>
First post2017-03-22 18:20 +0100
Last post2017-03-22 18:20 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCHv2 0/4] Regmap IRQ fix and related changes CPCAP Tony Lindgren <tony@atomide.com> - 2017-03-22 18:20 +0100
    [PATCH 2/4] mfd: cpcap: Use handle_reread flag for interrupts Tony Lindgren <tony@atomide.com> - 2017-03-22 18:20 +0100

#1606787 — [PATCHv2 0/4] Regmap IRQ fix and related changes CPCAP

FromTony Lindgren <tony@atomide.com>
Date2017-03-22 18:20 +0100
Subject[PATCHv2 0/4] Regmap IRQ fix and related changes CPCAP
Message-ID<tnS5s-5Vz-27@gated-at.bofh.it>
Hi all,

Here's v2 set of fixes to make CPCAP PMIC interrupts work reliably when
used with multiple drivers. While working on the ADC, charger and
USB PHY drivers I noticed that the PMIC interrupt to the SoC would
eventually stop working.

All these can wait for v4.12 merge window as these issues don't show
up currently. Two of the patches are also harmless currently, so I've
kept them in this series to avoid pointless merge conflicts.

Regards,

Tony

Changes since v1:

- Updated regap-irq patch to use out_runtime_put in regmap_irq_thread
  also if pm_runtime_get() fails

- Clarify patch description for regmap-irq changes to make clear
  this is an issue with the CPCAP PMIC and not SoC GPIO edge/level
  handling based on comments from Charles Keepax
  <ckeepax@opensource.wolfsonmicro.com>

- Collected acks

Tony Lindgren (4):
  regmap: irq: Fix lost interrupts by introducing handle_reread
  mfd: cpcap: Use handle_reread flag for interrupts
  mfd: cpcap: Use ack_invert interrupts
  mfd: cpcap: Fix bad use of IRQ sense register

 drivers/base/regmap/regmap-irq.c | 77 +++++++++++++++++++++++++++-------------
 drivers/mfd/motorola-cpcap.c     |  7 +++-
 include/linux/regmap.h           |  2 ++
 3 files changed, 61 insertions(+), 25 deletions(-)

-- 
2.11.1

[toc] | [next] | [standalone]


#1606791 — [PATCH 2/4] mfd: cpcap: Use handle_reread flag for interrupts

FromTony Lindgren <tony@atomide.com>
Date2017-03-22 18:20 +0100
Subject[PATCH 2/4] mfd: cpcap: Use handle_reread flag for interrupts
Message-ID<tnS5u-5Vz-63@gated-at.bofh.it>
In reply to#1606787
On CPCAP we need to keep reading interrupts until there are no
more interrupts. Otherwise the PMIC interrupt to the SoC will at
some point stop toggling. This seems to happen because new CPCAP
device interrupts show up while we're handling.

Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Tested-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/motorola-cpcap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c
--- a/drivers/mfd/motorola-cpcap.c
+++ b/drivers/mfd/motorola-cpcap.c
@@ -71,6 +71,7 @@ static struct regmap_irq_chip cpcap_irq_chip[CPCAP_NR_IRQ_CHIPS] = {
 		.ack_base = CPCAP_REG_MI1,
 		.mask_base = CPCAP_REG_MIM1,
 		.use_ack = true,
+		.handle_reread = true,
 	},
 	{
 		.name = "cpcap-m2",
@@ -79,6 +80,7 @@ static struct regmap_irq_chip cpcap_irq_chip[CPCAP_NR_IRQ_CHIPS] = {
 		.ack_base = CPCAP_REG_MI2,
 		.mask_base = CPCAP_REG_MIM2,
 		.use_ack = true,
+		.handle_reread = true,
 	},
 	{
 		.name = "cpcap1-4",
@@ -88,6 +90,7 @@ static struct regmap_irq_chip cpcap_irq_chip[CPCAP_NR_IRQ_CHIPS] = {
 		.mask_base = CPCAP_REG_INTM1,
 		.type_base = CPCAP_REG_INTS1,
 		.use_ack = true,
+		.handle_reread = true,
 	},
 };
 
-- 
2.11.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web