linux -> drivers -> serial -> Atmel_serial.c
/*Perform initialization and enable port for reception*/
static int atmel_startup(struct uart_port *port)
{
/*Allocate the IRQ*/
retval = request_irq(port->irq, atmel_interrupt, IRQF_SHARED, "atmel_serial", port);
}
static struct uart_ops atmel_pops = {
.startup = atmel_startup,}
static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, struct platform_device *pdev)
{ port->ops = &atmel_pops; }
static int __devinit atmel_serial_probe(struct platform_device *pdev)
{ atmel_init_port(port, pdev); }
static struct platform_driver atmel_serial_driver = {
.probe = atmel_serial_probe,}
static int __init atmel_serial_init(void)
{ ret = platform_driver_register(&atmel_serial_driver); }
本文介绍了Linux内核中Atmel串行通信控制器的驱动实现。主要内容包括初始化串口、分配IRQ中断请求,并设置相应的操作结构体。此外还涉及平台设备初始化及注册驱动的过程。

被折叠的 条评论
为什么被折叠?



