#include <linux/unaligned.h>
#include <linux/device.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/input.h>
#include <media/rc-core.h>
#define DRIVER_AUTHOR …
#define DRIVER_AUTHOR2 …
#define DRIVER_DESC …
#define DRIVER_NAME …
#define RR3_ERROR …
#define RR3_MOD_SIGNAL_IN …
#define RR3_MOD_SIGNAL_OUT …
#define RR3_FW_VERSION …
#define RR3_FW_VERSION_LEN …
#define RR3_TX_SEND_SIGNAL …
#define RR3_SET_IR_PARAM …
#define RR3_GET_IR_PARAM …
#define RR3_BLINK_LED …
#define RR3_READ_SER_NO …
#define RR3_SER_NO_LEN …
#define RR3_RC_DET_ENABLE …
#define RR3_RC_DET_DISABLE …
#define RR3_MODSIG_CAPTURE …
#define RR3_RC_DET_STATUS …
#define RR3_RESET …
#define RR3_IR_IO_MAX_LENGTHS …
#define RR3_IR_IO_PERIODS_MF …
#define RR3_IR_IO_SIG_MEM_SIZE …
#define RR3_IR_IO_LENGTH_FUZZ …
#define RR3_IR_IO_SIG_TIMEOUT …
#define RR3_IR_IO_MIN_PAUSE …
#define RR3_CLK …
#define RR3_CLK_PER_COUNT …
#define RR3_CLK_CONV_FACTOR …
#define RR3_WIDE_IN_EP_ADDR …
#define RR3_NARROW_IN_EP_ADDR …
#define RR3_DRIVER_MAXLENS …
#define RR3_MAX_SIG_SIZE …
#define RR3_TIME_UNIT …
#define RR3_END_OF_SIGNAL …
#define RR3_TX_TRAILER_LEN …
#define RR3_RX_MIN_TIMEOUT …
#define RR3_RX_MAX_TIMEOUT …
#define RR3_CPUCS_REG_ADDR …
#define USB_RR3USB_VENDOR_ID …
#define USB_RR3USB_PRODUCT_ID …
#define USB_RR3IIUSB_PRODUCT_ID …
static int length_fuzz = …;
module_param(length_fuzz, uint, 0644);
MODULE_PARM_DESC(…) …;
static int minimum_pause = …;
module_param(minimum_pause, uint, 0644);
MODULE_PARM_DESC(…) …;
static int periods_measure_carrier = …;
module_param(periods_measure_carrier, uint, 0644);
MODULE_PARM_DESC(…) …;
struct redrat3_header { … } __packed;
struct redrat3_irdata { … } __packed;
struct redrat3_error { … } __packed;
static const struct usb_device_id redrat3_dev_table[] = …;
struct redrat3_dev { … };
static void redrat3_dump_fw_error(struct redrat3_dev *rr3, int code)
{ … }
static u32 redrat3_val_to_mod_freq(struct redrat3_irdata *irdata)
{ … }
static u32 redrat3_len_to_us(u32 length)
{ … }
static u32 redrat3_us_to_len(u32 microsec)
{ … }
static void redrat3_process_ir_data(struct redrat3_dev *rr3)
{ … }
static int redrat3_send_cmd(int cmd, struct redrat3_dev *rr3)
{ … }
static int redrat3_enable_detector(struct redrat3_dev *rr3)
{ … }
static inline void redrat3_delete(struct redrat3_dev *rr3,
struct usb_device *udev)
{ … }
static u32 redrat3_get_timeout(struct redrat3_dev *rr3)
{ … }
static int redrat3_set_timeout(struct rc_dev *rc_dev, unsigned int timeoutus)
{ … }
static void redrat3_reset(struct redrat3_dev *rr3)
{ … }
static void redrat3_get_firmware_rev(struct redrat3_dev *rr3)
{ … }
static void redrat3_read_packet_start(struct redrat3_dev *rr3, unsigned len)
{ … }
static void redrat3_read_packet_continue(struct redrat3_dev *rr3, unsigned len)
{ … }
static int redrat3_get_ir_data(struct redrat3_dev *rr3, unsigned len)
{ … }
static void redrat3_handle_async(struct urb *urb)
{ … }
static u16 mod_freq_to_val(unsigned int mod_freq)
{ … }
static int redrat3_set_tx_carrier(struct rc_dev *rcdev, u32 carrier)
{ … }
static int redrat3_transmit_ir(struct rc_dev *rcdev, unsigned *txbuf,
unsigned count)
{ … }
static void redrat3_brightness_set(struct led_classdev *led_dev, enum
led_brightness brightness)
{ … }
static int redrat3_wideband_receiver(struct rc_dev *rcdev, int enable)
{ … }
static void redrat3_learn_complete(struct urb *urb)
{ … }
static void redrat3_led_complete(struct urb *urb)
{ … }
static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3)
{ … }
static int redrat3_dev_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void redrat3_dev_disconnect(struct usb_interface *intf)
{ … }
static int redrat3_dev_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int redrat3_dev_resume(struct usb_interface *intf)
{ … }
static struct usb_driver redrat3_dev_driver = …;
module_usb_driver(…) …;
MODULE_DESCRIPTION(…);
MODULE_AUTHOR(…);
MODULE_AUTHOR(…);
MODULE_LICENSE(…) …;
MODULE_DEVICE_TABLE(usb, redrat3_dev_table);