gpio: pcie-idio-24: Use -ENOTSUPP consistently

The GPIO library expects the drivers to return -ENOTSUPP in some cases
and not using analogue POSIX code. Make the driver to follow this.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: William Breathitt Gray <wbg@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
Andy Shevchenko 2024-04-10 09:41:56 +03:00 committed by Bartosz Golaszewski
parent 3de14369c2
commit 6219132cad

View File

@ -267,7 +267,7 @@ static int idio_24_reg_mask_xlate(struct gpio_regmap *const gpio, const unsigned
case IDIO_24_CONTROL_REG: case IDIO_24_CONTROL_REG:
/* We can only set direction for TTL/CMOS lines */ /* We can only set direction for TTL/CMOS lines */
if (offset < 48) if (offset < 48)
return -EOPNOTSUPP; return -ENOTSUPP;
*reg = IDIO_24_CONTROL_REG; *reg = IDIO_24_CONTROL_REG;
*mask = CONTROL_REG_OUT_MODE; *mask = CONTROL_REG_OUT_MODE;