#include <linux/unaligned.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/workqueue.h>
#include <media/rc-core.h>
#include <media/i2c/ir-kbd-i2c.h>
#define FLAG_TX …
#define FLAG_HDPVR …
static bool enable_hdpvr;
module_param(enable_hdpvr, bool, 0644);
static int get_key_haup_common(struct IR_i2c *ir, enum rc_proto *protocol,
u32 *scancode, u8 *ptoggle, int size)
{ … }
static int get_key_haup(struct IR_i2c *ir, enum rc_proto *protocol,
u32 *scancode, u8 *toggle)
{ … }
static int get_key_haup_xvr(struct IR_i2c *ir, enum rc_proto *protocol,
u32 *scancode, u8 *toggle)
{ … }
static int get_key_pixelview(struct IR_i2c *ir, enum rc_proto *protocol,
u32 *scancode, u8 *toggle)
{ … }
static int get_key_fusionhdtv(struct IR_i2c *ir, enum rc_proto *protocol,
u32 *scancode, u8 *toggle)
{ … }
static int get_key_knc1(struct IR_i2c *ir, enum rc_proto *protocol,
u32 *scancode, u8 *toggle)
{ … }
static int get_key_geniatech(struct IR_i2c *ir, enum rc_proto *protocol,
u32 *scancode, u8 *toggle)
{ … }
static int get_key_avermedia_cardbus(struct IR_i2c *ir, enum rc_proto *protocol,
u32 *scancode, u8 *toggle)
{ … }
static int ir_key_poll(struct IR_i2c *ir)
{ … }
static void ir_work(struct work_struct *work)
{ … }
static int ir_open(struct rc_dev *dev)
{ … }
static void ir_close(struct rc_dev *dev)
{ … }
#define XTAL_FREQ …
#define ZILOG_SEND …
#define ZILOG_UIR_END …
#define ZILOG_INIT_END …
#define ZILOG_LIR_END …
#define ZILOG_STATUS_OK …
#define ZILOG_STATUS_TX …
#define ZILOG_STATUS_SET …
struct code_block { … } __packed;
static int send_data_block(struct IR_i2c *ir, int cmd,
struct code_block *code_block)
{ … }
static int zilog_init(struct IR_i2c *ir)
{ … }
static void copy_codes(u8 *dst, u8 *src, unsigned int count)
{ … }
static int cmp_no_trail(u8 *a, u8 *b, unsigned int count)
{ … }
static int find_slot(u16 *array, unsigned int size, u16 val)
{ … }
static int zilog_ir_format(struct rc_dev *rcdev, unsigned int *txbuf,
unsigned int count, struct code_block *code_block)
{ … }
static int zilog_tx(struct rc_dev *rcdev, unsigned int *txbuf,
unsigned int count)
{ … }
static int zilog_tx_carrier(struct rc_dev *dev, u32 carrier)
{ … }
static int zilog_tx_duty_cycle(struct rc_dev *dev, u32 duty_cycle)
{ … }
static int ir_probe(struct i2c_client *client)
{ … }
static void ir_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id ir_kbd_id[] = …;
MODULE_DEVICE_TABLE(i2c, ir_kbd_id);
static struct i2c_driver ir_kbd_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;