Hi Geert,
On 12.08.19 13:17, Geert Uytterhoeven wrote:
Hi Stefan,
On Thu, Aug 8, 2019 at 3:25 PM Stefan Roese <sr@xxxxxxx> wrote:
This patch fixes a backward compatibility issue, when boards use the
old style GPIO suffix "-gpio" instead of the new "-gpios". This
potential problem has been introduced by commit d99482673f95 ("serial:
mctrl_gpio: Check if GPIO property exisits before requesting it").
This patch now fixes this issue by iterating over all supported GPIO
suffixes by using the newly introduced for_each_gpio_suffix() helper.
Also, the string buffer is now allocated on the stack to avoid the
problem of allocation in a loop and its potential failure.
Signed-off-by: Stefan Roese <sr@xxxxxxx>
Do we really need to spread this *-gpio" legacy support all over the kernel?
Seeing the only in-kernel users of legacy "rts-gpio" are
arch/arm/boot/dts/am335x-nano.dts: rts-gpio = <&gpio0 13
GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/am335x-nano.dts: rts-gpio = <&gpio2 15
GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/am335x-pdu001.dts: rts-gpio = <&gpio1 9
GPIO_ACTIVE_HIGH>;
and this is handled by omap-serial.c, predating mctrl_gpio, I'd like to
reconsider.
Documentation/devicetree/bindings/serial/serial.txt always described
the "*-gpios"
variants, so there should be no users of the legacy "*-gpio" variants.
Hmmm, you were the one to comment about supporting (not breaking) the
"-gpio" variant:
https://lkml.org/lkml/2019/6/24/248
That was my main motivation to work on this patch.
If we all agree, that only the documented "-gpios" variant needs to
be supported, then we can drop this patch.
Thanks,
Stefan