]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: renesas: rzg2l: Return -EINVAL if the pin doesn't support PIN_CFG_OEN
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tue, 23 Jul 2024 16:47:44 +0000 (17:47 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 2 Aug 2024 09:25:31 +0000 (11:25 +0200)
commitd56abfed1c02814b5ee96b0ed1f989ea9d7f6cbb
tree495b462705974b1908308657ac78a47d53dd7520
parentf82c086bcca6365ce5361a2fb668556fe0c4dc38
pinctrl: renesas: rzg2l: Return -EINVAL if the pin doesn't support PIN_CFG_OEN

Update the rzg2l_pinctrl_pinconf_get() function to return -EINVAL for
PIN_CONFIG_OUTPUT_ENABLE config if the pin doesn't support the PIN_CFG_OEN
configuration.

-EINVAL is a valid error when dumping the pin configurations. Returning
-EOPNOTSUPP for a pin that does not support PIN_CFG_OEN resulted in the
message 'ERROR READING CONFIG SETTING 16' being printed during dumping
pinconf-pins.

For consistency do similar change in rzg2l_pinctrl_pinconf_set() for
PIN_CONFIG_OUTPUT_ENABLE config.

Fixes: a9024a323af2 ("pinctrl: renesas: rzg2l: Clean up and refactor OEN read/write functions")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20240723164744.505233-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c