linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH v2 1/4] mfd: sec-irq: Do not enforce (incorrect) interrupt trigger type
@ 2021-06-02 11:04 Krzysztof Kozlowski
  2021-06-02 11:04 ` [RESEND PATCH v2 2/4] mfd: max77686: " Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2021-06-02 11:04 UTC (permalink / raw)
  To: Chanwoo Choi, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Lee Jones, Liam Girdwood, linux-kernel, linux-clk, devicetree,
	linux-samsung-soc
  Cc: Krzysztof Kozlowski, Marek Szyprowski

From: Krzysztof Kozlowski <krzk@kernel.org>

Interrupt line can be configured on different hardware in different way,
even inverted.  Therefore driver should not enforce specific trigger
type - edge falling - but instead rely on Devicetree to configure it.

The Samsung PMIC drivers are used only on Devicetree boards.

Additionally, the PMIC datasheets describe the interrupt line as active
low with a requirement of acknowledge from the CPU therefore the edge
falling is not correct.

Marek Szyprowski reports that together with DTS change (proper level in
DTS) it fixes RTC alarm failure that he observed from time to time on
TM2e board.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

---

Rebased on https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/log/?h=for-mfd-next

Changes since v1:
1. Mention in commit msg that this fixes TM2e RTC alarm.
2. Add Marek's tested-by.
---
 drivers/mfd/sec-irq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c
index e473c2fb42d5..f5f59fdc72fe 100644
--- a/drivers/mfd/sec-irq.c
+++ b/drivers/mfd/sec-irq.c
@@ -479,8 +479,7 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
 	}
 
 	ret = devm_regmap_add_irq_chip(sec_pmic->dev, sec_pmic->regmap_pmic,
-				       sec_pmic->irq,
-				       IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+				       sec_pmic->irq, IRQF_ONESHOT,
 				       0, sec_irq_chip, &sec_pmic->irq_data);
 	if (ret != 0) {
 		dev_err(sec_pmic->dev, "Failed to register IRQ chip: %d\n", ret);
-- 
2.27.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-28  9:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 11:04 [RESEND PATCH v2 1/4] mfd: sec-irq: Do not enforce (incorrect) interrupt trigger type Krzysztof Kozlowski
2021-06-02 11:04 ` [RESEND PATCH v2 2/4] mfd: max77686: " Krzysztof Kozlowski
2021-09-28  9:53   ` Lee Jones
2021-06-02 11:04 ` [RESEND PATCH v2 3/4] mfd: max77693: " Krzysztof Kozlowski
2021-09-28  9:52   ` Lee Jones
2021-06-02 11:04 ` [RESEND PATCH v2 4/4] mfd: max14577: " Krzysztof Kozlowski
2021-09-28  9:52   ` Lee Jones
2021-09-22  8:10 ` [RESEND PATCH v2 1/4] mfd: sec-irq: " Krzysztof Kozlowski
2021-09-28  9:52 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).