drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / drivers / tty / serial / serial_ctrl.c
blob6fcf634425dc0586867922cdfc34d5ade427e028
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 * Serial core controller driver
5 * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
6 * Author: Tony Lindgren <tony@atomide.com>
8 * This driver manages the serial core controller struct device instances.
9 * The serial core controller devices are children of the physical serial
10 * port device.
13 #include <linux/device.h>
14 #include <linux/module.h>
15 #include <linux/pm_runtime.h>
16 #include <linux/serial_core.h>
17 #include <linux/spinlock.h>
19 #include "serial_base.h"
21 static int serial_ctrl_probe(struct device *dev)
23 pm_runtime_enable(dev);
25 return 0;
28 static int serial_ctrl_remove(struct device *dev)
30 pm_runtime_disable(dev);
32 return 0;
36 * Serial core controller device init functions. Note that the physical
37 * serial port device driver may not have completed probe at this point.
39 int serial_ctrl_register_port(struct uart_driver *drv, struct uart_port *port)
41 return serial_core_register_port(drv, port);
44 void serial_ctrl_unregister_port(struct uart_driver *drv, struct uart_port *port)
46 serial_core_unregister_port(drv, port);
49 static struct device_driver serial_ctrl_driver = {
50 .name = "ctrl",
51 .suppress_bind_attrs = true,
52 .probe = serial_ctrl_probe,
53 .remove = serial_ctrl_remove,
56 int serial_base_ctrl_init(void)
58 return serial_base_driver_register(&serial_ctrl_driver);
61 void serial_base_ctrl_exit(void)
63 serial_base_driver_unregister(&serial_ctrl_driver);
66 MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
67 MODULE_DESCRIPTION("Serial core controller driver");
68 MODULE_LICENSE("GPL");