diff options
author | Nicolas Ferre <nicolas.ferre@microchip.com> | 2018-09-26 14:58:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-02 13:38:55 -0700 |
commit | 377fedd1866ae3979e4fe36193475b8acbc82784 (patch) | |
tree | f7af5d413eb92eb10d5f6c5c5d90d9dda1410a14 /drivers/tty/serial/atmel_serial.h | |
parent | ad8c0eaa0a418ae8ef3f9217638bb86439399eac (diff) | |
download | linux-stable-377fedd1866ae3979e4fe36193475b8acbc82784.tar.gz linux-stable-377fedd1866ae3979e4fe36193475b8acbc82784.tar.bz2 linux-stable-377fedd1866ae3979e4fe36193475b8acbc82784.zip |
tty/serial: atmel: add ISO7816 support
When mode is set in atmel_config_iso7816() we backup last RS232 mode
for coming back to this mode if requested.
Also allow setup of T=0 and T=1 parameter and basic support in set_termios
function as well.
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
[ludovic.desroches@microchip.com: rebase, add check on fidi ratio, checkpatch fixes]
Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/atmel_serial.h')
-rw-r--r-- | drivers/tty/serial/atmel_serial.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/atmel_serial.h b/drivers/tty/serial/atmel_serial.h index ba3a2437cde4..d811d4f2d0c0 100644 --- a/drivers/tty/serial/atmel_serial.h +++ b/drivers/tty/serial/atmel_serial.h @@ -78,7 +78,8 @@ #define ATMEL_US_OVER BIT(19) /* Oversampling Mode */ #define ATMEL_US_INACK BIT(20) /* Inhibit Non Acknowledge */ #define ATMEL_US_DSNACK BIT(21) /* Disable Successive NACK */ -#define ATMEL_US_MAX_ITER GENMASK(26, 24) /* Max Iterations */ +#define ATMEL_US_MAX_ITER_MASK GENMASK(26, 24) /* Max Iterations */ +#define ATMEL_US_MAX_ITER(n) (((n) << 24) & ATMEL_US_MAX_ITER_MASK) #define ATMEL_US_FILTER BIT(28) /* Infrared Receive Line Filter */ #define ATMEL_US_IER 0x08 /* Interrupt Enable Register */ |