Re: [PATCH] regmap: regmap-irq: silently ignore unsupported type settings
From: Geert Uytterhoeven
Date: Sat Dec 29 2018 - 06:14:13 EST
On Thu, Dec 27, 2018 at 9:44 AM Matti Vaittinen
> 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@xxxxxxxxxxxxxxxxx>
Reported-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Geert reported that 1c2928e3e321 breaks da9063-rtc on the Renesas
> Koelsch board:
> 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;
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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