gpio: msm_gpio: return correct value for gpio read
authorAswin Murugan <aswin.murugan@oss.qualcomm.com>
Thu, 8 May 2025 11:36:46 +0000 (17:06 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 24 Jun 2025 13:53:33 +0000 (07:53 -0600)
commitddc527ac4331b3cc73f29d30127944f477d6a6f0
tree43b47cce22669aeba6924fce6d58bf353cbf17ca
parent35811a7b0d68ce1a32446953e3ccf7a2186f08f8
gpio: msm_gpio: return correct value for gpio read

In the current implementation, the GPIO read operation considers
both the input and outbut bits (bits 0 and 1). It should only consider
the state of input bit, i.e bit 0. To address this, mask input bit
alone and read it.

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250508113646.1462518-1-aswin.murugan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
drivers/gpio/msm_gpio.c