SlideShare une entreprise Scribd logo
1  sur  13
© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Serial Drivers
2© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What to Expect?
Serial Prologue
UART
TTY Driver Use Case
TTY Serial Subsystem
Low Level Driver API
UART Data Structures
3© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Serial Prologue
Typically known as RS232 protocol
But, it covers many more. Namely,
Infrared (back bone is RS232)
RS485 (industry enhanced RS232)
Serial Modem
Console
…
From Linux kernel's perspective
Serial Drivers provides a generic abstract view to the user
for all of these
4© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
UART
UART - Universal Asynchronous receiver
transmitter
Converts the parallel data from the CPU to serial
data to be transmitted on lines
Data Frame contains 5 to 9 data bits, start bit, 1
or more stop bits, an option parity bit
5© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
TTY Driver Use Case
Terminal
Physical
Line
UART
UART
Driver
Line
Discipline
TTY
Driver
User
Process
User
Process
User
Process
KernelHardware
Software
6© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
TTY Serial Subsystem
N_TTY
(n_tty.c)
N_IRDA
(irtty_sir.c)
TTY Core
(tty_io.c)
serial_core.c
usb-serial.c
(Core Module)
omap-serial.c
USB-Serial
Converter
Driver
User Applications (System Call Interface)
Line Discipline Layer
TTY Layer
Low-level Driver Layer
Physical Devices like Infrared, UART, USB-Serial Converter
7© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Low-level (UART) Driver related Data
Structures & APIs
Data Structures
struct uart_driver
struct uart_port
struct uart_ops
APIs
int uart_register_driver(struct uart_driver *);
int uart_unregister_driver(struct uart_driver *);
int uart_add_one_port(struct uart_driver *, struct uart_port);
int uart_remove_one_port(struct uart_driver *, struct uart_port);
Typically implemented as a platform driver
Header: <linux/serial_core.h>
8© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
UART Driver structure
struct uart_driver
struct module *owner;
const char *driver_name; /* Name */
const char *dev_name; /* dev node names */
int major; /* Major number */
int minor; /* Minor number */
struct tty_driver *tty_driver; /* tty driver */
9© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
UART Port structure
struct uart_port
spinlock_t lock; /* lock */
unsigned int iobase; /* in/out[bwl] */
unsigned char __iomem *membase; /* I/O membase */
unsigned int irq; /* irq number */
unsigned int uartclk; /* base uart clock */
unsigned char fifosize; /* tx fifo size */
unsigned char x_char; /* flow control */
10© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
UART Operations structure
struct uart_ops
uint (*tx_empty)(struct uart_port *); /* Is TX FIFO empty? */
void (*set_mctrl)(struct uart_port *, unsigned int mctrl); /* Set
modem control params */
uint (*get_mctrl)(struct uart_port *); /* Get modem control params */
void (*stop_tx)(struct uart_port *); /* Stop xmission */
void (*start_tx)(struct uart_port *); /* Start xmission */
void (*shutdown)(struct uart_port *); /* Disable the port */
void (*set_termios)(struct uart_port *, struct termios *new, struct
termios *old); /* Terminal interface parameters */
void (*config_port) (struct uart_port *, int);
11© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
TTY Driver related Data Structures &
APIs
Header: <linux/tty.h>
Data Structures
struct tty_struct
struct tty_flip_buffer
struct tty_driver
APIs
int tty_register_driver(struct tty_driver *);
int tty_unregister_driver(struct tty_driver *);
struct device *tty_register_device(struct tty_driver *, unsigned,
struct device);
void tty_unregister_device(struct tty_driver *, unsigned);
12© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What all have we learnt?
Serial Prologue
UART
TTY Driver Use Case
TTY Serial Subsystem
Low Level Driver API
UART Data Structures
13© 2010-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Any Queries?

Contenu connexe

Tendances

LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
Linaro
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
Linaro
 

Tendances (20)

I2C Drivers
I2C DriversI2C Drivers
I2C Drivers
 
Timers
TimersTimers
Timers
 
Embedded Applications
Embedded ApplicationsEmbedded Applications
Embedded Applications
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Spi drivers
Spi driversSpi drivers
Spi drivers
 
LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
 
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8
 
Embedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOSEmbedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOS
 
Lcu14 306 - OP-TEE Future Enhancements
Lcu14 306 - OP-TEE Future EnhancementsLcu14 306 - OP-TEE Future Enhancements
Lcu14 306 - OP-TEE Future Enhancements
 
Let's Play STM32
Let's Play STM32Let's Play STM32
Let's Play STM32
 
HKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting ReviewHKG15-311: OP-TEE for Beginners and Porting Review
HKG15-311: OP-TEE for Beginners and Porting Review
 
建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card
 
Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_
 
ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!
 
Linux PCI device driver
Linux PCI device driverLinux PCI device driver
Linux PCI device driver
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted Firmware
 
Ch9 v70 multiproject_en
Ch9 v70 multiproject_enCh9 v70 multiproject_en
Ch9 v70 multiproject_en
 
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDevLearn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
 

En vedette (16)

Block Drivers
Block DriversBlock Drivers
Block Drivers
 
File System Modules
File System ModulesFile System Modules
File System Modules
 
PCI Drivers
PCI DriversPCI Drivers
PCI Drivers
 
Introduction to Linux Drivers
Introduction to Linux DriversIntroduction to Linux Drivers
Introduction to Linux Drivers
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
References
ReferencesReferences
References
 
Embedded C
Embedded CEmbedded C
Embedded C
 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Character Drivers
Character DriversCharacter Drivers
Character Drivers
 
Platform Drivers
Platform DriversPlatform Drivers
Platform Drivers
 
Kernel Programming
Kernel ProgrammingKernel Programming
Kernel Programming
 
Low-level Accesses
Low-level AccessesLow-level Accesses
Low-level Accesses
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
BeagleBoard-xM Bootloaders
BeagleBoard-xM BootloadersBeagleBoard-xM Bootloaders
BeagleBoard-xM Bootloaders
 
File Systems
File SystemsFile Systems
File Systems
 

Similaire à Serial Drivers

etherlink plus developers guide
etherlink plus developers guideetherlink plus developers guide
etherlink plus developers guide
panamjayait
 
MICROCONTROLLER PROGRAMMING.pdf
MICROCONTROLLER PROGRAMMING.pdfMICROCONTROLLER PROGRAMMING.pdf
MICROCONTROLLER PROGRAMMING.pdf
KarthiA15
 
selfridge_alec_chipspec
selfridge_alec_chipspecselfridge_alec_chipspec
selfridge_alec_chipspec
Alec Selfridge
 
8251
82518251
8251
Aisu
 

Similaire à Serial Drivers (20)

Id. 01 router (computing)
Id. 01 router (computing)Id. 01 router (computing)
Id. 01 router (computing)
 
Intel Quark HSUART
Intel Quark HSUARTIntel Quark HSUART
Intel Quark HSUART
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver
 
etherlink plus developers guide
etherlink plus developers guideetherlink plus developers guide
etherlink plus developers guide
 
MICROCONTROLLER PROGRAMMING.pdf
MICROCONTROLLER PROGRAMMING.pdfMICROCONTROLLER PROGRAMMING.pdf
MICROCONTROLLER PROGRAMMING.pdf
 
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWERMastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
Mastering Microcontroller : TIMERS, PWM, CAN, RTC,LOW POWER
 
CCNA CHAPTER 5 BY jetarvind kumar madhukar
CCNA CHAPTER 5 BY jetarvind kumar madhukarCCNA CHAPTER 5 BY jetarvind kumar madhukar
CCNA CHAPTER 5 BY jetarvind kumar madhukar
 
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdfBRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdf
 
Ch4 v70 system_configuration_en
Ch4 v70 system_configuration_enCh4 v70 system_configuration_en
Ch4 v70 system_configuration_en
 
Uart
UartUart
Uart
 
Ae01 system overview
Ae01 system overviewAe01 system overview
Ae01 system overview
 
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 1
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 1CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 1
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 1
 
Detailed explanation of Basic router configuration
Detailed explanation of Basic router configurationDetailed explanation of Basic router configuration
Detailed explanation of Basic router configuration
 
Rfc768
Rfc768Rfc768
Rfc768
 
Modbus.ppt
Modbus.pptModbus.ppt
Modbus.ppt
 
modbus.ppt
modbus.pptmodbus.ppt
modbus.ppt
 
selfridge_alec_chipspec
selfridge_alec_chipspecselfridge_alec_chipspec
selfridge_alec_chipspec
 
8251
82518251
8251
 
Alcatel vm
Alcatel vmAlcatel vm
Alcatel vm
 
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPKrzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
 

Plus de SysPlay eLearning Academy for You (12)

Linux Internals Part - 3
Linux Internals Part - 3Linux Internals Part - 3
Linux Internals Part - 3
 
Linux Internals Part - 2
Linux Internals Part - 2Linux Internals Part - 2
Linux Internals Part - 2
 
Linux Internals Part - 1
Linux Internals Part - 1Linux Internals Part - 1
Linux Internals Part - 1
 
Understanding the BBB
Understanding the BBBUnderstanding the BBB
Understanding the BBB
 
POSIX Threads
POSIX ThreadsPOSIX Threads
POSIX Threads
 
Cache Management
Cache ManagementCache Management
Cache Management
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Introduction to BeagleBone Black
Introduction to BeagleBone BlackIntroduction to BeagleBone Black
Introduction to BeagleBone Black
 
Introduction to BeagleBoard-xM
Introduction to BeagleBoard-xMIntroduction to BeagleBoard-xM
Introduction to BeagleBoard-xM
 
BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
 
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting ProcessBeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
 
Linux System
Linux SystemLinux System
Linux System
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Serial Drivers

  • 1. © 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Serial Drivers
  • 2. 2© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. What to Expect? Serial Prologue UART TTY Driver Use Case TTY Serial Subsystem Low Level Driver API UART Data Structures
  • 3. 3© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Serial Prologue Typically known as RS232 protocol But, it covers many more. Namely, Infrared (back bone is RS232) RS485 (industry enhanced RS232) Serial Modem Console … From Linux kernel's perspective Serial Drivers provides a generic abstract view to the user for all of these
  • 4. 4© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. UART UART - Universal Asynchronous receiver transmitter Converts the parallel data from the CPU to serial data to be transmitted on lines Data Frame contains 5 to 9 data bits, start bit, 1 or more stop bits, an option parity bit
  • 5. 5© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. TTY Driver Use Case Terminal Physical Line UART UART Driver Line Discipline TTY Driver User Process User Process User Process KernelHardware Software
  • 6. 6© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. TTY Serial Subsystem N_TTY (n_tty.c) N_IRDA (irtty_sir.c) TTY Core (tty_io.c) serial_core.c usb-serial.c (Core Module) omap-serial.c USB-Serial Converter Driver User Applications (System Call Interface) Line Discipline Layer TTY Layer Low-level Driver Layer Physical Devices like Infrared, UART, USB-Serial Converter
  • 7. 7© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Low-level (UART) Driver related Data Structures & APIs Data Structures struct uart_driver struct uart_port struct uart_ops APIs int uart_register_driver(struct uart_driver *); int uart_unregister_driver(struct uart_driver *); int uart_add_one_port(struct uart_driver *, struct uart_port); int uart_remove_one_port(struct uart_driver *, struct uart_port); Typically implemented as a platform driver Header: <linux/serial_core.h>
  • 8. 8© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. UART Driver structure struct uart_driver struct module *owner; const char *driver_name; /* Name */ const char *dev_name; /* dev node names */ int major; /* Major number */ int minor; /* Minor number */ struct tty_driver *tty_driver; /* tty driver */
  • 9. 9© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. UART Port structure struct uart_port spinlock_t lock; /* lock */ unsigned int iobase; /* in/out[bwl] */ unsigned char __iomem *membase; /* I/O membase */ unsigned int irq; /* irq number */ unsigned int uartclk; /* base uart clock */ unsigned char fifosize; /* tx fifo size */ unsigned char x_char; /* flow control */
  • 10. 10© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. UART Operations structure struct uart_ops uint (*tx_empty)(struct uart_port *); /* Is TX FIFO empty? */ void (*set_mctrl)(struct uart_port *, unsigned int mctrl); /* Set modem control params */ uint (*get_mctrl)(struct uart_port *); /* Get modem control params */ void (*stop_tx)(struct uart_port *); /* Stop xmission */ void (*start_tx)(struct uart_port *); /* Start xmission */ void (*shutdown)(struct uart_port *); /* Disable the port */ void (*set_termios)(struct uart_port *, struct termios *new, struct termios *old); /* Terminal interface parameters */ void (*config_port) (struct uart_port *, int);
  • 11. 11© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. TTY Driver related Data Structures & APIs Header: <linux/tty.h> Data Structures struct tty_struct struct tty_flip_buffer struct tty_driver APIs int tty_register_driver(struct tty_driver *); int tty_unregister_driver(struct tty_driver *); struct device *tty_register_device(struct tty_driver *, unsigned, struct device); void tty_unregister_device(struct tty_driver *, unsigned);
  • 12. 12© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. What all have we learnt? Serial Prologue UART TTY Driver Use Case TTY Serial Subsystem Low Level Driver API UART Data Structures
  • 13. 13© 2010-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Any Queries?