lkml.org 
[lkml]   [2018]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] regmap: regmap-irq: silently ignore unsupported type settings
Hi Matti,

On Thu, Dec 27, 2018 at 9:44 AM Matti Vaittinen
<matti.vaittinen@fi.rohmeurope.com> wrote:
> 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>

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>

> ---
>
> 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?

Thanks, that seems to fix the issue with da9063-rtc.

I don't know how to trigger an actual interrupt, though.

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

Gr{oetje,eeting}s,

Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

\
 
 \ /
  Last update: 2018-12-29 12:14    [W:0.084 / U:26.648 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site