linux/drivers/media/rc/streamzap.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Streamzap Remote Control driver
 *
 * Copyright (c) 2005 Christoph Bartelmus <[email protected]>
 * Copyright (c) 2010 Jarod Wilson <[email protected]>
 *
 * This driver was based on the work of Greg Wickham and Adrian
 * Dewhurst. It was substantially rewritten to support correct signal
 * gaps and now maintains a delay buffer, which is used to present
 * consistent timing behaviour to user space applications. Without the
 * delay buffer an ugly hack would be required in lircd, which can
 * cause sluggish signal decoding in certain situations.
 *
 * Ported to in-kernel ir-core interface by Jarod Wilson
 *
 * This driver is based on the USB skeleton driver packaged with the
 * kernel; copyright (C) 2001-2003 Greg Kroah-Hartman ([email protected])
 */

#include <linux/device.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_NAME
#define DRIVER_DESC

#define USB_STREAMZAP_VENDOR_ID
#define USB_STREAMZAP_PRODUCT_ID

/* table of devices that work with this driver */
static const struct usb_device_id streamzap_table[] =;

MODULE_DEVICE_TABLE(usb, streamzap_table);

#define SZ_PULSE_MASK
#define SZ_SPACE_MASK
#define SZ_TIMEOUT
#define SZ_RESOLUTION

/* number of samples buffered */
#define SZ_BUF_LEN

enum StreamzapDecoderState {};

/* structure to hold our device specific stuff */
struct streamzap_ir {};


/* local function prototypes */
static int streamzap_probe(struct usb_interface *interface,
			   const struct usb_device_id *id);
static void streamzap_disconnect(struct usb_interface *interface);
static void streamzap_callback(struct urb *urb);
static int streamzap_suspend(struct usb_interface *intf, pm_message_t message);
static int streamzap_resume(struct usb_interface *intf);

/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver streamzap_driver =;

static void sz_push(struct streamzap_ir *sz, struct ir_raw_event rawir)
{}

static void sz_push_full_pulse(struct streamzap_ir *sz,
			       unsigned char value)
{}

static void sz_push_half_pulse(struct streamzap_ir *sz,
			       unsigned char value)
{}

static void sz_push_full_space(struct streamzap_ir *sz,
			       unsigned char value)
{}

static void sz_push_half_space(struct streamzap_ir *sz,
			       unsigned long value)
{}

/*
 * streamzap_callback - usb IRQ handler callback
 *
 * This procedure is invoked on reception of data from
 * the usb remote.
 */
static void streamzap_callback(struct urb *urb)
{}

static struct rc_dev *streamzap_init_rc_dev(struct streamzap_ir *sz,
					    struct usb_device *usbdev)
{}

/*
 *	streamzap_probe
 *
 *	Called by usb-core to associated with a candidate device
 *	On any failure the return value is the ERROR
 *	On success return 0
 */
static int streamzap_probe(struct usb_interface *intf,
			   const struct usb_device_id *id)
{}

/*
 * streamzap_disconnect
 *
 * Called by the usb core when the device is removed from the system.
 *
 * This routine guarantees that the driver will not submit any more urbs
 * by clearing dev->usbdev.  It is also supposed to terminate any currently
 * active urbs.  Unfortunately, usb_bulk_msg(), used in streamzap_read(),
 * does not provide any way to do this.
 */
static void streamzap_disconnect(struct usb_interface *interface)
{}

static int streamzap_suspend(struct usb_interface *intf, pm_message_t message)
{}

static int streamzap_resume(struct usb_interface *intf)
{}

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();