> On 10/20/2020 10:22 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > > Should input be enabled unconditionally, as recommended by the Hardware > > Manual for backwards compatibility with existing software? > > As per (errata?) commit ae9550f635533b1c ("gpio-rcar: Use OUTDT when > > reading GPIOs configured as output"), the gpio-rcar driver does not use > > the INDT register to read the status of a GPIO line when configured for > > output. > > More investigation: > 1. On SH7734, R-Car Gen1, R-Car Gen2, and RZ/G1, INDT only reflects > the state of the input pin if the GPIO is configured for input > (documented, verified on R-Car M2-W), > 2. On R-Car Gen3 and RZ/G2, INDT always reflects the state of the > input pin (documented, verified on R-Car H3/M3-W/M3-N), > 3. On R-Car V3U, input enable can be configured explicitly through the > new INEN register (documented, unverified). > > Given register accesses are slow, I think it makes sense to enable input > explicitly and unconditionally on R-Car V3U, and always use INDT to read > pin state on R-Car Gen3 and V3U. That sounds like a good solution to me. CU Uli