linux/drivers/tty/serial/serial_base_bus.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Serial base bus layer for controllers
 *
 * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
 * Author: Tony Lindgren <[email protected]>
 *
 * The serial core bus manages the serial core controller instances.
 */

#include <linux/cleanup.h>
#include <linux/container_of.h>
#include <linux/device.h>
#include <linux/idr.h>
#include <linux/module.h>
#include <linux/serial_core.h>
#include <linux/slab.h>
#include <linux/spinlock.h>

#include "serial_base.h"

static bool serial_base_initialized;

static const struct device_type serial_ctrl_type =;

static const struct device_type serial_port_type =;

static int serial_base_match(struct device *dev, const struct device_driver *drv)
{}

static const struct bus_type serial_base_bus_type =;

int serial_base_driver_register(struct device_driver *driver)
{}

void serial_base_driver_unregister(struct device_driver *driver)
{}

static int serial_base_device_init(struct uart_port *port,
				   struct device *dev,
				   struct device *parent_dev,
				   const struct device_type *type,
				   void (*release)(struct device *dev),
				   unsigned int ctrl_id,
				   unsigned int port_id)
{}

static void serial_base_ctrl_release(struct device *dev)
{}

void serial_base_ctrl_device_remove(struct serial_ctrl_device *ctrl_dev)
{}

struct serial_ctrl_device *serial_base_ctrl_add(struct uart_port *port,
						struct device *parent)
{}

static void serial_base_port_release(struct device *dev)
{}

struct serial_port_device *serial_base_port_add(struct uart_port *port,
						struct serial_ctrl_device *ctrl_dev)
{}

void serial_base_port_device_remove(struct serial_port_device *port_dev)
{}

#ifdef CONFIG_SERIAL_CORE_CONSOLE

/**
 * serial_base_match_and_update_preferred_console - Match and update a preferred console
 * @drv: Serial port device driver
 * @port: Serial port instance
 *
 * Tries to match and update the preferred console for a serial port for
 * the kernel command line option console=DEVNAME:0.0.
 *
 * Cannot be called early for ISA ports, depends on struct device.
 *
 * Return: 0 on success, negative error code on failure.
 */
int serial_base_match_and_update_preferred_console(struct uart_driver *drv,
						   struct uart_port *port)
{}

#endif

static int serial_base_init(void)
{}
arch_initcall(serial_base_init);

static void serial_base_exit(void)
{}
module_exit(serial_base_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();