serial: sh-sci: Introduced function pointers
authorThierry Bultel <thierry.bultel.yh@bp.renesas.com>
Thu, 3 Apr 2025 21:29:10 +0000 (23:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 14:56:30 +0000 (16:56 +0200)
commit21fc3d6b45ba42c471fb718ce922d1f9abe26238
treebd705025d7e2265329797705a169b87b0ce14061
parentd004e3595718b8b55009c08ff59cf13be5490f59
serial: sh-sci: Introduced function pointers

The aim here is to prepare support for new sci controllers like
the T2H/RSCI whose registers are too much different for being
handled in common code.

This named serial controller also has 32 bits register,
so some return types had to be changed.

The needed generic functions are no longer static, with prototypes
defined in sh-sci-common.h so that they can be used from specific
implementation in a separate file, to keep this driver as little
changed as possible.

For doing so, a set of 'ops' is added to struct sci_port.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com>
Link: https://lore.kernel.org/r/20250403212919.1137670-9-thierry.bultel.yh@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci-common.h [new file with mode: 0644]
drivers/tty/serial/sh-sci.c
drivers/tty/serial/sh-sci.h