serdev: BREAK/FRAME/PARITY/OVERRUN notification prototype V2
authorMagnus Damm <damm+renesas@opensource.se>
Sun, 12 Dec 2021 13:21:28 +0000 (22:21 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Dec 2021 12:29:56 +0000 (13:29 +0100)
commitd8e9a406a931f687945703a4bac45042eb81ce92
treee93562187f9adb69b1d7002ae1e1c303ec525482
parentad234e2bac274a43c9fa540bde8cd9f0c627b71f
serdev: BREAK/FRAME/PARITY/OVERRUN notification prototype V2

Allow serdev device drivers get notified by hardware errors such as BREAK,
FRAME, PARITY and OVERRUN.

With this patch, in the event of an error detected in the UART device driver
the serdev_device_driver will get the newly introduced ->error() callback
invoked if serdev_device_set_error_mask() has previously been used to enable
the type of error. The errors are taken straight from the TTY layer and fed
into the serdev_device_driver after filtering out only enabled errors.

Without this patch the hardware errors never reach the serdev_device_driver.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Link: https://lore.kernel.org/r/163931528842.27756.3665040315954968747.sendpatchset@octo
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serdev/core.c
drivers/tty/serdev/serdev-ttyport.c
include/linux/serdev.h