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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2012 Hans Verkuil <[email protected]>
 */

/* kernel includes */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <linux/usb.h>
#include <linux/mutex.h>

/* driver and module definitions */
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

/* Actually, it advertises itself as a Logitech */
#define USB_KEENE_VENDOR
#define USB_KEENE_PRODUCT

/* Probably USB_TIMEOUT should be modified in module parameter */
#define BUFFER_LENGTH
#define USB_TIMEOUT

/* Frequency limits in MHz */
#define FREQ_MIN
#define FREQ_MAX
#define FREQ_MUL

/* USB Device ID List */
static const struct usb_device_id usb_keene_device_table[] =;

MODULE_DEVICE_TABLE(usb, usb_keene_device_table);

struct keene_device {};

static inline struct keene_device *to_keene_dev(struct v4l2_device *v4l2_dev)
{}

/* Set frequency (if non-0), PA, mute and turn on/off the FM transmitter. */
static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play)
{}

/* Set TX, stereo and preemphasis mode (50 us vs 75 us). */
static int keene_cmd_set(struct keene_device *radio)
{}

/* Handle unplugging the device.
 * We call video_unregister_device in any case.
 * The last function called in this procedure is
 * usb_keene_device_release.
 */
static void usb_keene_disconnect(struct usb_interface *intf)
{}

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

static int usb_keene_resume(struct usb_interface *intf)
{}

static int vidioc_querycap(struct file *file, void *priv,
					struct v4l2_capability *v)
{}

static int vidioc_g_modulator(struct file *file, void *priv,
				struct v4l2_modulator *v)
{}

static int vidioc_s_modulator(struct file *file, void *priv,
				const struct v4l2_modulator *v)
{}

static int vidioc_s_frequency(struct file *file, void *priv,
				const struct v4l2_frequency *f)
{}

static int vidioc_g_frequency(struct file *file, void *priv,
				struct v4l2_frequency *f)
{}

static int keene_s_ctrl(struct v4l2_ctrl *ctrl)
{}

/* File system interface */
static const struct v4l2_file_operations usb_keene_fops =;

static const struct v4l2_ctrl_ops keene_ctrl_ops =;

static const struct v4l2_ioctl_ops usb_keene_ioctl_ops =;

static void usb_keene_video_device_release(struct v4l2_device *v4l2_dev)
{}

/* check if the device is present and register with v4l and usb if it is */
static int usb_keene_probe(struct usb_interface *intf,
				const struct usb_device_id *id)
{}

/* USB subsystem interface */
static struct usb_driver usb_keene_driver =;

module_usb_driver();