gpio: msm: return correct value return for special output pins
authorNeil Armstrong <neil.armstrong@linaro.org>
Tue, 1 Apr 2025 07:45:20 +0000 (09:45 +0200)
committerCaleb Connolly <caleb.connolly@linaro.org>
Fri, 11 Apr 2025 13:24:54 +0000 (15:24 +0200)
commit8803cd6dd782cd66f5978e79da022aa2de9710d9
treed7ee774c40bc564001e2140c257fa42892e1afdc
parent0708bdd34d4fdd0680706d2719de34704402719d
gpio: msm: return correct value return for special output pins

When a special pin is output only, the current code would return 0,
but if the pin is output only we can get the output value.

Try to return the output value and in all the other cases return
an error instead of 0.

Fixes: f9bb539460d ("gpio: msm: add support for special pins")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250401-topic-sm8x50-msm-gpio-special-fixes-v1-2-a1148a02bb16@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
drivers/gpio/msm_gpio.c