#include <linux/completion.h>
#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/serio.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/time.h>
#include <linux/workqueue.h>
#include <media/cec.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
#define DATA_SIZE …
struct rain { … };
static void rain_process_msg(struct rain *rain)
{ … }
static void rain_irq_work_handler(struct work_struct *work)
{ … }
static irqreturn_t rain_interrupt(struct serio *serio, unsigned char data,
unsigned int flags)
{ … }
static void rain_disconnect(struct serio *serio)
{ … }
static int rain_send(struct rain *rain, const char *command)
{ … }
static int rain_send_and_wait(struct rain *rain,
const char *cmd, const char *reply)
{ … }
static int rain_setup(struct rain *rain, struct serio *serio,
struct cec_log_addrs *log_addrs, u16 *pa)
{ … }
static int rain_cec_adap_enable(struct cec_adapter *adap, bool enable)
{ … }
static int rain_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr)
{ … }
static int rain_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
u32 signal_free_time, struct cec_msg *msg)
{ … }
static const struct cec_adap_ops rain_cec_adap_ops = …;
static int rain_connect(struct serio *serio, struct serio_driver *drv)
{ … }
static const struct serio_device_id rain_serio_ids[] = …;
MODULE_DEVICE_TABLE(serio, rain_serio_ids);
static struct serio_driver rain_drv = …;
module_serio_driver(…) …;