serial: 8250_fintek: Return -EINVAL on invalid configuration
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Mon, 6 Nov 2017 10:49:12 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2017 12:09:35 +0000 (13:09 +0100)
commit7ecc77011c6fb40d3eef7c6a0ebcec61e69b3ec3
treefa409afa4b009b0146f4068fa302edb351e6d565
parente5656d43dce828bfcacbecd614e22355073e918b
serial: 8250_fintek: Return -EINVAL on invalid configuration

Hardware does not support having the same RTS level during RX and TX
when RS485 mode is on (URA in Fintek terminology).

The manufacturer has also confirmed that the delays are not enabled if
the RS485 mode is not enabled.

Therefore we should return -EINVAL if the user wants to have the same
value for RTS_ON_SEND and RTS_AFTER_SEND.

Cc: "Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>
Cc: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_fintek.c