regmap: regmap-irq: silently ignore unsupported type settings

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: 1c2928e3e3 ("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>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Matti Vaittinen 2018-12-27 10:44:43 +02:00 коммит произвёл Mark Brown
Родитель 58331d618b
Коммит 74d4b4e0f4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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; const struct regmap_irq_type *t = &irq_data->type;
if ((t->types_supported & type) != type) if ((t->types_supported & type) != type)
return -ENOTSUPP; return 0;
reg = t->type_reg_offset / map->reg_stride; reg = t->type_reg_offset / map->reg_stride;