Commit 5223c511 authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Geert Uytterhoeven

pinctrl: renesas: rzg2l: Return -EINVAL for pins which have input disabled

Pin status reported by pinconf-pins file always reported pin status as
"input enabled" even for pins which had input disabled. Fix this by
returning -EINVAL for the pins which have input disabled.

Fixes: c4c4637e ("pinctrl: renesas: Add RZ/G2L pin and gpio controller driver")
Reported-by: default avatarPhil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: default avatarPhil Edworthy <phil.edworthy@renesas.com>
Link: https://lore.kernel.org/r/20220511094057.3151-1-prabhakar.mahadev-lad.rj@bp.renesas.comSigned-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent f2906aa8
......@@ -517,6 +517,8 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev,
if (!(cfg & PIN_CFG_IEN))
return -EINVAL;
arg = rzg2l_read_pin_config(pctrl, IEN(port_offset), bit, IEN_MASK);
if (!arg)
return -EINVAL;
break;
case PIN_CONFIG_POWER_SOURCE: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment