]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit54de29eccc0a9326e4d6c0dec28889f34928617b
treee93562187f9adb69b1d7002ae1e1c303ec525482
parent9c0df07face9a8c47cdcbad090d2e96210fa9634
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