#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/serial_reg.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <media/rc-core.h>
struct serial_ir_hw { … };
#define IR_HOMEBREW …
#define IR_IRDEO …
#define IR_IRDEO_REMOTE …
#define IR_ANIMAX …
#define IR_IGOR …
static int type;
static int io;
static int irq;
static ulong iommap;
static int ioshift;
static bool softcarrier = …;
static bool share_irq;
static int sense = …;
static bool txsense;
static void send_pulse_irdeo(unsigned int length, ktime_t edge);
static void send_space_irdeo(void);
#ifdef CONFIG_IR_SERIAL_TRANSMITTER
static void send_pulse_homebrew(unsigned int length, ktime_t edge);
static void send_space_homebrew(void);
#endif
static struct serial_ir_hw hardware[] = …;
#define RS_ISR_PASS_LIMIT …
struct serial_ir { … };
static struct serial_ir serial_ir;
static u8 sinp(int offset)
{ … }
static void soutp(int offset, u8 value)
{ … }
static void on(void)
{ … }
static void off(void)
{ … }
static void send_pulse_irdeo(unsigned int length, ktime_t target)
{ … }
static void send_space_irdeo(void)
{ … }
#ifdef CONFIG_IR_SERIAL_TRANSMITTER
static void send_pulse_homebrew_softcarrier(unsigned int length, ktime_t edge)
{ … }
static void send_pulse_homebrew(unsigned int length, ktime_t edge)
{ … }
static void send_space_homebrew(void)
{ … }
#endif
static void frbwrite(unsigned int l, bool is_pulse)
{ … }
static irqreturn_t serial_ir_irq_handler(int i, void *blah)
{ … }
static int hardware_init_port(void)
{ … }
static void serial_ir_timeout(struct timer_list *unused)
{ … }
static int serial_ir_tx(struct rc_dev *dev, unsigned int *txbuf,
unsigned int count);
static int serial_ir_tx_duty_cycle(struct rc_dev *dev, u32 cycle);
static int serial_ir_tx_carrier(struct rc_dev *dev, u32 carrier);
static int serial_ir_open(struct rc_dev *rcdev);
static void serial_ir_close(struct rc_dev *rcdev);
static int serial_ir_probe(struct platform_device *dev)
{ … }
static int serial_ir_open(struct rc_dev *rcdev)
{ … }
static void serial_ir_close(struct rc_dev *rcdev)
{ … }
static int serial_ir_tx(struct rc_dev *dev, unsigned int *txbuf,
unsigned int count)
{ … }
static int serial_ir_tx_duty_cycle(struct rc_dev *dev, u32 cycle)
{ … }
static int serial_ir_tx_carrier(struct rc_dev *dev, u32 carrier)
{ … }
static int serial_ir_suspend(struct platform_device *dev,
pm_message_t state)
{ … }
static int serial_ir_resume(struct platform_device *dev)
{ … }
static struct platform_driver serial_ir_driver = …;
static int __init serial_ir_init(void)
{ … }
static void serial_ir_exit(void)
{ … }
static int __init serial_ir_init_module(void)
{ … }
static void __exit serial_ir_exit_module(void)
{ … }
module_init(…) …;
module_exit(serial_ir_exit_module);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
module_param(type, int, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(io, int, ioport, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(iommap, ulong, other, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(ioshift, int, other, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(irq, int, irq, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(share_irq, bool, other, 0444);
MODULE_PARM_DESC(…) …;
module_param(sense, int, 0444);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_IR_SERIAL_TRANSMITTER
module_param(txsense, bool, 0444);
MODULE_PARM_DESC(…) …;
#endif
module_param(softcarrier, bool, 0444);
MODULE_PARM_DESC(…) …;