]> www.infradead.org Git - users/jedix/linux-maple.git/commit
serial: sc16is7xx: hardware reset chip if reset-gpios is defined in DT
authorHui Wang <hui.wang@canonical.com>
Tue, 18 Jun 2024 11:26:20 +0000 (19:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2024 14:10:36 +0000 (16:10 +0200)
commit4fb92bdb8e84e618f8c289dc56a923b914a72cac
tree5a38cebd7028b24291047e56635ded7372a18b4b
parenta9411ef13f8fada29775fd21a3dfab7dcc49216a
serial: sc16is7xx: hardware reset chip if reset-gpios is defined in DT

Some boards connect a GPIO to the reset pin, and the reset pin needs
to be set up correctly before accessing the chip.

Add a function to handle the chip reset. If the reset-gpios is defined
in the DT, do hardware reset through this GPIO, otherwise do software
reset as before.

Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com>
Tested-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20240618112620.152848-2-hui.wang@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c