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


Groups > linux.kernel > #1615680 > unrolled thread

[PATCHv3 0/3] CPCAP PMIC IRQ fix and related changes

Started byTony Lindgren <tony@atomide.com>
First post2017-04-04 05:20 +0200
Last post2017-04-04 05:20 +0200
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCHv3 0/3] CPCAP PMIC IRQ fix and related changes Tony Lindgren <tony@atomide.com> - 2017-04-04 05:20 +0200
    [PATCH 2/3] mfd: cpcap: Use ack_invert interrupts Tony Lindgren <tony@atomide.com> - 2017-04-04 05:20 +0200
    [PATCH 3/3] mfd: cpcap: Fix bad use of IRQ sense register Tony Lindgren <tony@atomide.com> - 2017-04-04 05:20 +0200

#1615680 — [PATCHv3 0/3] CPCAP PMIC IRQ fix and related changes

FromTony Lindgren <tony@atomide.com>
Date2017-04-04 05:20 +0200
Subject[PATCHv3 0/3] CPCAP PMIC IRQ fix and related changes
Message-ID<tsnaF-7AK-3@gated-at.bofh.it>
Hi all,

Here's v3 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. I'll send the related interrupt triggering dts change
separately.

Regards,

Tony

Changes since v2:

- Replaced first two regmap_irq related patches with proper interrupt
  triggering configuration after noticing the dts configuration did
  not get passed in

- Dropped regmap from the patch series subject line

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 (3):
  mfd: cpcap: Fix interrupt to use level interrupt
  mfd: cpcap: Use ack_invert interrupts
  mfd: cpcap: Fix bad use of IRQ sense register

 drivers/mfd/motorola-cpcap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.12.2

[toc] | [next] | [standalone]


#1615681 — [PATCH 2/3] mfd: cpcap: Use ack_invert interrupts

FromTony Lindgren <tony@atomide.com>
Date2017-04-04 05:20 +0200
Subject[PATCH 2/3] mfd: cpcap: Use ack_invert interrupts
Message-ID<tsnaF-7AK-7@gated-at.bofh.it>
In reply to#1615680
We should use ack_invert as the int_read_and_clear() in the Motorola
kernel tree does "ireg_val & ~mreg_val" before writing to the mask
register.

Fixes: 56e1d40d3bea ("mfd: cpcap: Add minimal support")
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
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,
+		.ack_invert = 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,
+		.ack_invert = 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,
+		.ack_invert = true,
 	},
 };
 
-- 
2.12.2

[toc] | [prev] | [next] | [standalone]


#1615682 — [PATCH 3/3] mfd: cpcap: Fix bad use of IRQ sense register

FromTony Lindgren <tony@atomide.com>
Date2017-04-04 05:20 +0200
Subject[PATCH 3/3] mfd: cpcap: Fix bad use of IRQ sense register
Message-ID<tsnaF-7AK-9@gated-at.bofh.it>
In reply to#1615680
The cpcap INTS registers are for getting the value of the line,
not for configuring the type.

Fixes: 56e1d40d3bea ("mfd: cpcap: Add minimal support")
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Cc: Sebastian Reichel <sre@kernel.org>
Reviewed-By: Sebastian Reichel <sre@kernel.org>
Tested-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/motorola-cpcap.c | 1 -
 1 file changed, 1 deletion(-)

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
@@ -88,7 +88,6 @@ static struct regmap_irq_chip cpcap_irq_chip[CPCAP_NR_IRQ_CHIPS] = {
 		.status_base = CPCAP_REG_INT1,
 		.ack_base = CPCAP_REG_INT1,
 		.mask_base = CPCAP_REG_INTM1,
-		.type_base = CPCAP_REG_INTS1,
 		.use_ack = true,
 		.ack_invert = true,
 	},
-- 
2.12.2

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web