linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regmap: regmap-irq: silently ignore unsupported type settings
@ 2018-12-27  8:44 Matti Vaittinen
  2018-12-29 11:13 ` Geert Uytterhoeven
  2019-01-03 17:27 ` Charles Keepax
  0 siblings, 2 replies; 9+ messages in thread
From: Matti Vaittinen @ 2018-12-27  8:44 UTC (permalink / raw)
  To: mazziesaccount, matti.vaittinen
  Cc: broonie, gregkh, rafael, geert, linux-kernel

Do not return error if irq-type setting is requested for
controlloer which does not support this. This is how
regmap-irq has previously handled the undupported type
settings and existing drivers seem to be upset if failure
is now reported.

Fixes: 1c2928e3e321 ("regmap: regmap-irq/gpio-max77620: add level-irq support")
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
---

Geert reported that 1c2928e3e321 breaks da9063-rtc on the Renesas
Koelsch board:

https://lore.kernel.org/lkml/20181227075648.GB2461@localhost.localdomain/T/#m194616cc88d7b4c2a78f7ce07907608fdb64a092

Geert, do you know if anyone vould to test this?

 drivers/base/regmap/regmap-irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 1bd1145ad8b5..d2d0014b0d23 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -258,7 +258,7 @@ static int regmap_irq_set_type(struct irq_data *data, unsigned int type)
 	const struct regmap_irq_type *t = &irq_data->type;
 
 	if ((t->types_supported & type) != type)
-		return -ENOTSUPP;
+		return 0;
 
 	reg = t->type_reg_offset / map->reg_stride;
 
-- 
2.14.3


-- 
Matti Vaittinen
ROHM Semiconductors

~~~ "I don't think so," said Rene Descartes.  Just then, he vanished ~~~

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

end of thread, other threads:[~2019-01-08 10:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27  8:44 [PATCH] regmap: regmap-irq: silently ignore unsupported type settings Matti Vaittinen
2018-12-29 11:13 ` Geert Uytterhoeven
2018-12-31 19:14   ` Mark Brown
2019-01-01 17:36     ` Geert Uytterhoeven
2019-01-02 15:31       ` Steve Twiss
2019-01-04 15:47         ` Geert Uytterhoeven
2019-01-07 18:52           ` Steve Twiss
2019-01-08 10:21   ` Steve Twiss
2019-01-03 17:27 ` Charles Keepax

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).