linux/drivers/isdn/hardware/mISDN/w6692.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * w6692.c     mISDN driver for Winbond w6692 based cards
 *
 * Author      Karsten Keil <[email protected]>
 *             based on the w6692 I4L driver from Petr Novak <[email protected]>
 *
 * Copyright 2009  by Karsten Keil <[email protected]>
 */

#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/mISDNhw.h>
#include <linux/slab.h>
#include "w6692.h"

#define W6692_REV

#define DBUSY_TIMER_VALUE

enum {};

/* private data in the PCI devices list */
struct w6692map {};

static const struct w6692map  w6692_map[] =;

#define PCI_DEVICE_ID_USR_6692

struct w6692_ch {};

struct w6692_hw {};

static LIST_HEAD(Cards);
static DEFINE_RWLOCK(card_lock); /* protect Cards */

static int w6692_cnt;
static int debug;
static u32 led;
static u32 pots;

static void
_set_debug(struct w6692_hw *card)
{}

static int
set_debug(const char *val, const struct kernel_param *kp)
{}

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_VERSION();
module_param_call();
MODULE_PARM_DESC();
module_param(led, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC();
module_param(pots, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC();

static inline u8
ReadW6692(struct w6692_hw *card, u8 offset)
{}

static inline void
WriteW6692(struct w6692_hw *card, u8 offset, u8 value)
{}

static inline u8
ReadW6692B(struct w6692_ch *bc, u8 offset)
{}

static inline void
WriteW6692B(struct w6692_ch *bc, u8 offset, u8 value)
{}

static void
enable_hwirq(struct w6692_hw *card)
{}

static void
disable_hwirq(struct w6692_hw *card)
{}

static const char *W6692Ver[] =;

static void
W6692Version(struct w6692_hw *card)
{}

static void
w6692_led_handler(struct w6692_hw *card, int on)
{}

static void
ph_command(struct w6692_hw *card, u8 cmd)
{}

static void
W6692_new_ph(struct w6692_hw *card)
{}

static void
W6692_ph_bh(struct dchannel *dch)
{}

static void
W6692_empty_Dfifo(struct w6692_hw *card, int count)
{}

static void
W6692_fill_Dfifo(struct w6692_hw *card)
{}

static void
d_retransmit(struct w6692_hw *card)
{}

static void
handle_rxD(struct w6692_hw *card) {}

static void
handle_txD(struct w6692_hw *card) {}

static void
handle_statusD(struct w6692_hw *card)
{}

static void
W6692_empty_Bfifo(struct w6692_ch *wch, int count)
{}

static void
W6692_fill_Bfifo(struct w6692_ch *wch)
{}

#if 0
static int
setvolume(struct w6692_ch *wch, int mic, struct sk_buff *skb)
{
	struct w6692_hw *card = wch->bch.hw;
	u16 *vol = (u16 *)skb->data;
	u8 val;

	if ((!(card->fmask & pots)) ||
	    !test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
		return -ENODEV;
	if (skb->len < 2)
		return -EINVAL;
	if (*vol > 7)
		return -EINVAL;
	val = *vol & 7;
	val = 7 - val;
	if (mic) {
		val <<= 3;
		card->xaddr &= 0xc7;
	} else {
		card->xaddr &= 0xf8;
	}
	card->xaddr |= val;
	WriteW6692(card, W_XADDR, card->xaddr);
	return 0;
}

static int
enable_pots(struct w6692_ch *wch)
{
	struct w6692_hw *card = wch->bch.hw;

	if ((!(card->fmask & pots)) ||
	    !test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
		return -ENODEV;
	wch->b_mode |= W_B_MODE_EPCM | W_B_MODE_BSW0;
	WriteW6692B(wch, W_B_MODE, wch->b_mode);
	WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_XRST);
	card->pctl |= ((wch->bch.nr & 2) ? W_PCTL_PCX : 0);
	WriteW6692(card, W_PCTL, card->pctl);
	return 0;
}
#endif

static int
disable_pots(struct w6692_ch *wch)
{}

static int
w6692_mode(struct w6692_ch *wch, u32 pr)
{}

static void
send_next(struct w6692_ch *wch)
{}

static void
W6692B_interrupt(struct w6692_hw *card, int ch)
{}

static irqreturn_t
w6692_irq(int intno, void *dev_id)
{}

static void
dbusy_timer_handler(struct timer_list *t)
{}

static void initW6692(struct w6692_hw *card)
{}

static void
reset_w6692(struct w6692_hw *card)
{}

static int
init_card(struct w6692_hw *card)
{}

static int
w6692_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
{}

static int
channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
{}

static int
open_bchannel(struct w6692_hw *card, struct channel_req *rq)
{}

static int
channel_ctrl(struct w6692_hw *card, struct mISDN_ctrl_req *cq)
{}

static int
w6692_bctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
{}

static int
w6692_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
{}

static int
w6692_l1callback(struct dchannel *dch, u32 cmd)
{}

static int
open_dchannel(struct w6692_hw *card, struct channel_req *rq, void *caller)
{}

static int
w6692_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
{}

static int
setup_w6692(struct w6692_hw *card)
{}

static void
release_card(struct w6692_hw *card)
{}

static int
setup_instance(struct w6692_hw *card)
{}

static int
w6692_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{}

static void
w6692_remove_pci(struct pci_dev *pdev)
{}

static const struct pci_device_id w6692_ids[] =;
MODULE_DEVICE_TABLE(pci, w6692_ids);

static struct pci_driver w6692_driver =;

static int __init w6692_init(void)
{}

static void __exit w6692_cleanup(void)
{}

module_init();
module_exit(w6692_cleanup);