linux/include/linux/serio.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 1999-2002 Vojtech Pavlik
 */
#ifndef _SERIO_H
#define _SERIO_H


#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <uapi/linux/serio.h>

extern const struct bus_type serio_bus;

struct serio {};
#define to_serio_port(d)

struct serio_driver {};
#define to_serio_driver(d)

int serio_open(struct serio *serio, struct serio_driver *drv);
void serio_close(struct serio *serio);
void serio_rescan(struct serio *serio);
void serio_reconnect(struct serio *serio);
irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags);

void __serio_register_port(struct serio *serio, struct module *owner);

/* use a define to avoid include chaining to get THIS_MODULE */
#define serio_register_port(serio)

void serio_unregister_port(struct serio *serio);
void serio_unregister_child_port(struct serio *serio);

int __must_check __serio_register_driver(struct serio_driver *drv,
				struct module *owner, const char *mod_name);

/* use a define to avoid include chaining to get THIS_MODULE & friends */
#define serio_register_driver(drv)

void serio_unregister_driver(struct serio_driver *drv);

/**
 * module_serio_driver() - Helper macro for registering a serio driver
 * @__serio_driver: serio_driver struct
 *
 * Helper macro for serio drivers which do not do anything special in
 * module init/exit. This eliminates a lot of boilerplate. Each module
 * may only use this macro once, and calling it replaces module_init()
 * and module_exit().
 */
#define module_serio_driver(__serio_driver)

static inline int serio_write(struct serio *serio, unsigned char data)
{}

static inline void serio_drv_write_wakeup(struct serio *serio)
{}

/*
 * Use the following functions to manipulate serio's per-port
 * driver-specific data.
 */
static inline void *serio_get_drvdata(struct serio *serio)
{}

static inline void serio_set_drvdata(struct serio *serio, void *data)
{}

/*
 * Use the following functions to protect critical sections in
 * driver code from port's interrupt handler
 */
static inline void serio_pause_rx(struct serio *serio)
{}

static inline void serio_continue_rx(struct serio *serio)
{}

#endif