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

// SPDX-License-Identifier: GPL-2.0-only
/* SF16-FMR2 and SF16-FMD2 radio driver for Linux
 * Copyright (c) 2011 Ondrej Zary
 *
 * Original driver was (c) 2000-2002 Ziglio Frediano, [email protected]
 * but almost nothing remained here after conversion to generic TEA575x
 * implementation
 */

#include <linux/delay.h>
#include <linux/module.h>	/* Modules			*/
#include <linux/init.h>		/* Initdata			*/
#include <linux/slab.h>
#include <linux/ioport.h>	/* request_region		*/
#include <linux/io.h>		/* outb, outb_p			*/
#include <linux/isa.h>
#include <linux/pnp.h>
#include <media/drv-intf/tea575x.h>

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

/* these cards can only use two different ports (0x384 and 0x284) */
#define FMR2_MAX

static int radio_nr[FMR2_MAX] =;
module_param_array();
MODULE_PARM_DESC();

struct fmr2 {};

static int num_fmr2_cards;
static struct fmr2 *fmr2_cards[FMR2_MAX];
static bool isa_registered;
static bool pnp_registered;

/* the port is hardwired on SF16-FMR2 */
#define FMR2_PORT

/* TEA575x tuner pins */
#define STR_DATA
#define STR_CLK
#define STR_WREN
#define STR_MOST
/* PT2254A/TC9154A volume control pins */
#define PT_ST
#define PT_CK
#define PT_DATA
/* volume control presence pin */
#define FMR2_HASVOL

static void fmr2_tea575x_set_pins(struct snd_tea575x *tea, u8 pins)
{}

static u8 fmr2_tea575x_get_pins(struct snd_tea575x *tea)
{}

static void fmr2_tea575x_set_direction(struct snd_tea575x *tea, bool output)
{}

static const struct snd_tea575x_ops fmr2_tea_ops =;

/* TC9154A/PT2254A volume control */

/* 18-bit shift register bit definitions */
#define TC9154A_ATT_MAJ_0DB
#define TC9154A_ATT_MAJ_10DB
#define TC9154A_ATT_MAJ_20DB
#define TC9154A_ATT_MAJ_30DB
#define TC9154A_ATT_MAJ_40DB
#define TC9154A_ATT_MAJ_50DB
#define TC9154A_ATT_MAJ_60DB

#define TC9154A_ATT_MIN_0DB
#define TC9154A_ATT_MIN_2DB
#define TC9154A_ATT_MIN_4DB
#define TC9154A_ATT_MIN_6DB
#define TC9154A_ATT_MIN_8DB
/* bit 12 is ignored */
#define TC9154A_CHANNEL_LEFT
#define TC9154A_CHANNEL_RIGHT
/* bits 15, 16, 17 must be 0 */

#define TC9154A_ATT_MAJ(x)
#define TC9154A_ATT_MIN(x)

static void tc9154a_set_pins(struct fmr2 *fmr2, u8 pins)
{}

static void tc9154a_set_attenuation(struct fmr2 *fmr2, int att, u32 channel)
{}

static int fmr2_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops fmr2_ctrl_ops =;

static int fmr2_tea_ext_init(struct snd_tea575x *tea)
{}

static const struct pnp_device_id fmr2_pnp_ids[] =;
MODULE_DEVICE_TABLE(pnp, fmr2_pnp_ids);

static int fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io)
{}

static int fmr2_isa_match(struct device *pdev, unsigned int ndev)
{}

static int fmr2_pnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *id)
{}

static void fmr2_remove(struct fmr2 *fmr2)
{}

static void fmr2_isa_remove(struct device *pdev, unsigned int ndev)
{}

static void fmr2_pnp_remove(struct pnp_dev *pdev)
{}

static struct isa_driver fmr2_isa_driver =;

static struct pnp_driver fmr2_pnp_driver =;

static int __init fmr2_init(void)
{}

static void __exit fmr2_exit(void)
{}

module_init();
module_exit(fmr2_exit);