#include <linux/completion.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/workqueue.h>
#include <linux/serio.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/delay.h>
#include <media/cec.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int debug;
static int persistent_config;
module_param(debug, int, 0644);
module_param(persistent_config, int, 0644);
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
enum pulse8_msgcodes { … };
static const char * const pulse8_msgnames[] = …;
static const char *pulse8_msgname(u8 cmd)
{ … }
#define MSGSTART …
#define MSGEND …
#define MSGESC …
#define MSGOFFSET …
#define DATA_SIZE …
#define PING_PERIOD …
#define NUM_MSGS …
struct pulse8 { … };
static int pulse8_send(struct serio *serio, const u8 *command, u8 cmd_len)
{ … }
static int pulse8_send_and_wait_once(struct pulse8 *pulse8,
const u8 *cmd, u8 cmd_len,
u8 response, u8 size)
{ … }
static int pulse8_send_and_wait(struct pulse8 *pulse8,
const u8 *cmd, u8 cmd_len, u8 response, u8 size)
{ … }
static void pulse8_tx_work_handler(struct work_struct *work)
{ … }
static void pulse8_irq_work_handler(struct work_struct *work)
{ … }
static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
unsigned int flags)
{ … }
static int pulse8_cec_adap_enable(struct cec_adapter *adap, bool enable)
{ … }
static int pulse8_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr)
{ … }
static int pulse8_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
u32 signal_free_time, struct cec_msg *msg)
{ … }
static void pulse8_cec_adap_free(struct cec_adapter *adap)
{ … }
static const struct cec_adap_ops pulse8_cec_adap_ops = …;
static void pulse8_disconnect(struct serio *serio)
{ … }
static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
struct cec_log_addrs *log_addrs, u16 *pa)
{ … }
static int pulse8_apply_persistent_config(struct pulse8 *pulse8,
struct cec_log_addrs *log_addrs,
u16 pa)
{ … }
static void pulse8_ping_eeprom_work_handler(struct work_struct *work)
{ … }
static int pulse8_connect(struct serio *serio, struct serio_driver *drv)
{ … }
static const struct serio_device_id pulse8_serio_ids[] = …;
MODULE_DEVICE_TABLE(serio, pulse8_serio_ids);
static struct serio_driver pulse8_drv = …;
module_serio_driver(…) …;