linux/drivers/media/pci/saa7134/saa7134-input.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *
 * handle saa7134 IR remotes via linux kernel input layer.
 */

#include "saa7134.h"
#include "saa7134-reg.h"

#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/slab.h>

#define MODULE_NAME

static unsigned int disable_ir;
module_param(disable_ir, int, 0444);
MODULE_PARM_DESC();

static unsigned int ir_debug;
module_param(ir_debug, int, 0644);
MODULE_PARM_DESC();

static int pinnacle_remote;
module_param(pinnacle_remote, int, 0644);    /* Choose Pinnacle PCTV remote */
MODULE_PARM_DESC();

#define input_dbg(fmt, arg...)
#define ir_dbg(ir, fmt, arg...)

/* Helper function for raw decoding at GPIO16 or GPIO18 */
static int saa7134_raw_decode_irq(struct saa7134_dev *dev);

/* -------------------- GPIO generic keycode builder -------------------- */

static int build_key(struct saa7134_dev *dev)
{}

/* --------------------- Chip specific I2C key builders ----------------- */

static int get_key_flydvb_trio(struct IR_i2c *ir, enum rc_proto *protocol,
			       u32 *scancode, u8 *toggle)
{}

static int get_key_msi_tvanywhere_plus(struct IR_i2c *ir,
				       enum rc_proto *protocol,
				       u32 *scancode, u8 *toggle)
{}

/* copied and modified from get_key_msi_tvanywhere_plus() */
static int get_key_kworld_pc150u(struct IR_i2c *ir, enum rc_proto *protocol,
				 u32 *scancode, u8 *toggle)
{}

static int get_key_purpletv(struct IR_i2c *ir, enum rc_proto *protocol,
			    u32 *scancode, u8 *toggle)
{}

static int get_key_beholdm6xx(struct IR_i2c *ir, enum rc_proto *protocol,
			      u32 *scancode, u8 *toggle)
{}

/* Common (grey or coloured) pinnacle PCTV remote handling
 *
 */
static int get_key_pinnacle(struct IR_i2c *ir, enum rc_proto *protocol,
			    u32 *scancode, u8 *toggle, int parity_offset,
			    int marker, int code_modulo)
{}

/* The grey pinnacle PCTV remote
 *
 *  There are one issue with this remote:
 *   - I2c packet does not change when the same key is pressed quickly. The workaround
 *     is to hold down each key for about half a second, so that another code is generated
 *     in the i2c packet, and the function can distinguish key presses.
 *
 * Sylvain Pasche <[email protected]>
 */
static int get_key_pinnacle_grey(struct IR_i2c *ir, enum rc_proto *protocol,
				 u32 *scancode, u8 *toggle)
{}


/* The new pinnacle PCTV remote (with the colored buttons)
 *
 * Ricardo Cerqueira <[email protected]>
 */
static int get_key_pinnacle_color(struct IR_i2c *ir, enum rc_proto *protocol,
				  u32 *scancode, u8 *toggle)
{}

void saa7134_input_irq(struct saa7134_dev *dev)
{}

static void saa7134_input_timer(struct timer_list *t)
{}

int saa7134_ir_open(struct rc_dev *rc)
{}

void saa7134_ir_close(struct rc_dev *rc)
{}

int saa7134_input_init1(struct saa7134_dev *dev)
{}

void saa7134_input_fini(struct saa7134_dev *dev)
{}

void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
{}

static int saa7134_raw_decode_irq(struct saa7134_dev *dev)
{}