linux/drivers/media/radio/radio-shark.c

/*
 * Linux V4L2 radio driver for the Griffin radioSHARK USB radio receiver
 *
 * Note the radioSHARK offers the audio through a regular USB audio device,
 * this driver only handles the tuning.
 *
 * The info necessary to drive the shark was taken from the small userspace
 * shark.c program by Michael Rolig, which he kindly placed in the Public
 * Domain.
 *
 * Copyright (c) 2012 Hans de Goede <[email protected]>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
*/

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/workqueue.h>
#include <media/v4l2-device.h>
#include <media/drv-intf/tea575x.h>

#if defined(CONFIG_LEDS_CLASS) || \
    (defined(CONFIG_LEDS_CLASS_MODULE) && defined(CONFIG_RADIO_SHARK_MODULE))
#define SHARK_USE_LEDS
#endif

/*
 * Version Information
 */
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

#define SHARK_IN_EP
#define SHARK_OUT_EP

#define TEA575X_BIT_MONO
#define TEA575X_BIT_BAND_MASK
#define TEA575X_BIT_BAND_FM

#define TB_LEN
#define DRV_NAME

#define v4l2_dev_to_shark(d)

/* Note BLUE_IS_PULSE comes after NO_LEDS as it is a status bit, not a LED */
enum {};

struct shark_device {};

static atomic_t shark_instance =;

static void shark_write_val(struct snd_tea575x *tea, u32 val)
{}

static u32 shark_read_val(struct snd_tea575x *tea)
{}

static const struct snd_tea575x_ops shark_tea_ops =;

#ifdef SHARK_USE_LEDS
static void shark_led_work(struct work_struct *work)
{}

static void shark_led_set_blue(struct led_classdev *led_cdev,
			       enum led_brightness value)
{}

static void shark_led_set_blue_pulse(struct led_classdev *led_cdev,
				     enum led_brightness value)
{}

static void shark_led_set_red(struct led_classdev *led_cdev,
			      enum led_brightness value)
{}

static const struct led_classdev shark_led_templates[NO_LEDS] =;

static int shark_register_leds(struct shark_device *shark, struct device *dev)
{}

static void shark_unregister_leds(struct shark_device *shark)
{}

static inline void shark_resume_leds(struct shark_device *shark)
{}
#else
static int shark_register_leds(struct shark_device *shark, struct device *dev)
{
	v4l2_warn(&shark->v4l2_dev,
		  "CONFIG_LEDS_CLASS not enabled, LED support disabled\n");
	return 0;
}
static inline void shark_unregister_leds(struct shark_device *shark) { }
static inline void shark_resume_leds(struct shark_device *shark) { }
#endif

static void usb_shark_disconnect(struct usb_interface *intf)
{}

static void usb_shark_release(struct v4l2_device *v4l2_dev)
{}

static int usb_shark_probe(struct usb_interface *intf,
			   const struct usb_device_id *id)
{}

#ifdef CONFIG_PM
static int usb_shark_suspend(struct usb_interface *intf, pm_message_t message)
{}

static int usb_shark_resume(struct usb_interface *intf)
{}
#endif

/* Specify the bcdDevice value, as the radioSHARK and radioSHARK2 share ids */
static const struct usb_device_id usb_shark_device_table[] =;
MODULE_DEVICE_TABLE(usb, usb_shark_device_table);

static struct usb_driver usb_shark_driver =;
module_usb_driver();