linux/drivers/usb/host/xhci-dbgtty.c

// SPDX-License-Identifier: GPL-2.0
/*
 * xhci-dbgtty.c - tty glue for xHCI debug capability
 *
 * Copyright (C) 2017 Intel Corporation
 *
 * Author: Lu Baolu <[email protected]>
 */

#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/idr.h>

#include "xhci.h"
#include "xhci-dbgcap.h"

static struct tty_driver *dbc_tty_driver;
static struct idr dbc_tty_minors;
static DEFINE_MUTEX(dbc_tty_minors_lock);

static inline struct dbc_port *dbc_to_port(struct xhci_dbc *dbc)
{}

static unsigned int
dbc_send_packet(struct dbc_port *port, char *packet, unsigned int size)
{}

static int dbc_start_tx(struct dbc_port *port)
	__releases(&port->port_lock)
	__acquires(&port->port_lock)
{}

static void dbc_start_rx(struct dbc_port *port)
	__releases(&port->port_lock)
	__acquires(&port->port_lock)
{}

static void
dbc_read_complete(struct xhci_dbc *dbc, struct dbc_request *req)
{}

static void dbc_write_complete(struct xhci_dbc *dbc, struct dbc_request *req)
{}

static void xhci_dbc_free_req(struct dbc_request *req)
{}

static int
xhci_dbc_alloc_requests(struct xhci_dbc *dbc, unsigned int direction,
			struct list_head *head,
			void (*fn)(struct xhci_dbc *, struct dbc_request *))
{}

static void
xhci_dbc_free_requests(struct list_head *head)
{}

static int dbc_tty_install(struct tty_driver *driver, struct tty_struct *tty)
{}

static int dbc_tty_open(struct tty_struct *tty, struct file *file)
{}

static void dbc_tty_close(struct tty_struct *tty, struct file *file)
{}

static ssize_t dbc_tty_write(struct tty_struct *tty, const u8 *buf,
			     size_t count)
{}

static int dbc_tty_put_char(struct tty_struct *tty, u8 ch)
{}

static void dbc_tty_flush_chars(struct tty_struct *tty)
{}

static unsigned int dbc_tty_write_room(struct tty_struct *tty)
{}

static unsigned int dbc_tty_chars_in_buffer(struct tty_struct *tty)
{}

static void dbc_tty_unthrottle(struct tty_struct *tty)
{}

static const struct tty_operations dbc_tty_ops =;

static void dbc_rx_push(struct tasklet_struct *t)
{}

static int dbc_port_activate(struct tty_port *_port, struct tty_struct *tty)
{}

static const struct tty_port_operations dbc_port_ops =;

static void
xhci_dbc_tty_init_port(struct xhci_dbc *dbc, struct dbc_port *port)
{}

static void
xhci_dbc_tty_exit_port(struct dbc_port *port)
{}

static int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
{}

static void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
{}

static const struct dbc_driver dbc_driver =;

int xhci_dbc_tty_probe(struct device *dev, void __iomem *base, struct xhci_hcd *xhci)
{}

/*
 * undo what probe did, assume dbc is stopped already.
 * we also assume tty_unregister_device() is called before this
 */
void xhci_dbc_tty_remove(struct xhci_dbc *dbc)
{}

int dbc_tty_init(void)
{}

void dbc_tty_exit(void)
{}