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

/*
 * Linux V4L2 radio driver for the Griffin radioSHARK2 USB radio receiver
 *
 * Note the radioSHARK2 offers the audio through a regular USB audio device,
 * this driver only handles the tuning.
 *
 * The info necessary to drive the shark2 was taken from the small userspace
 * shark2.c program by Hisaaki Shibata, 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 "radio-tea5777.h"

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

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

static int debug;
module_param(debug, int, 0);
MODULE_PARM_DESC();

#define SHARK_IN_EP
#define SHARK_OUT_EP

#define TB_LEN
#define DRV_NAME

#define v4l2_dev_to_shark(d)

enum {};

struct shark_device {};

static atomic_t shark_instance =;

static int shark_write_reg(struct radio_tea5777 *tea, u64 reg)
{}

static int shark_read_reg(struct radio_tea5777 *tea, u32 *reg_ret)
{}

static const struct radio_tea5777_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_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();