提交 7326446c 编写于 作者: G Greg Kroah-Hartman

Staging: remove telephony drivers

We said we would wait until the 3.6 kernel release to remove these
drivers.  So we waited 6 months longer, that should be fine.

If anyone wants them back, it is trivial to revert these, but given that
I don't think they even build anymore, I doubt anyone will want them.

Cc: Joe Perches <joe@perches.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 34ec83f4
......@@ -118,8 +118,6 @@ source "drivers/staging/omapdrm/Kconfig"
source "drivers/staging/android/Kconfig"
source "drivers/staging/telephony/Kconfig"
source "drivers/staging/ozwpan/Kconfig"
source "drivers/staging/ccg/Kconfig"
......
......@@ -52,7 +52,6 @@ obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += ste_rmi4/
obj-$(CONFIG_MFD_NVEC) += nvec/
obj-$(CONFIG_DRM_OMAP) += omapdrm/
obj-$(CONFIG_ANDROID) += android/
obj-$(CONFIG_PHONE) += telephony/
obj-$(CONFIG_USB_WPAN_HCD) += ozwpan/
obj-$(CONFIG_USB_G_CCG) += ccg/
obj-$(CONFIG_WIMAX_GDM72XX) += gdm72xx/
......
#
# Telephony device configuration
#
menuconfig PHONE
tristate "Telephony support"
depends on HAS_IOMEM
---help---
Say Y here if you have a telephony card, which for example allows
you to use a regular phone for voice-over-IP applications.
Note: this has nothing to do with modems. You do not need to say Y
here in order to be able to use a modem under Linux.
To compile this driver as a module, choose M here: the
module will be called phonedev.
if PHONE
config PHONE_IXJ
tristate "QuickNet Internet LineJack/PhoneJack support"
depends on ISA || PCI
---help---
Say M if you have a telephony card manufactured by Quicknet
Technologies, Inc. These include the Internet PhoneJACK and
Internet LineJACK Telephony Cards. You will get a module called
ixj.
For the ISA versions of these products, you can configure the
cards using the isapnp tools (pnpdump/isapnp) or you can use the
isapnp support. Please read <file:Documentation/telephony/ixj.txt>.
For more information on these cards, see Quicknet's web site at:
<http://www.quicknet.net/>.
If you do not have any Quicknet telephony cards, you can safely
say N here.
config PHONE_IXJ_PCMCIA
tristate "QuickNet Internet LineJack/PhoneJack PCMCIA support"
depends on PHONE_IXJ && PCMCIA
help
Say Y here to configure in PCMCIA service support for the Quicknet
cards manufactured by Quicknet Technologies, Inc. This changes the
card initialization code to work with the card manager daemon.
endif # PHONE
#
# Makefile for drivers/telephony
#
obj-$(CONFIG_PHONE) += phonedev.o
obj-$(CONFIG_PHONE_IXJ) += ixj.o
obj-$(CONFIG_PHONE_IXJ_PCMCIA) += ixj_pcmcia.o
TODO
. Determine if the boards are still in use
and move this module back to drivers/telephony if necessary
. Coding style cleanups
Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
cc Joe Perches <joe@perches.com> if the module should be reactivated.
If no module activity occurs before version 3.6 is released, this
module should be removed.
/* configuration management identifiers */
#define IXJ_VER_MAJOR 1
#define IXJ_VER_MINOR 0
#define IXJ_BLD_VER 1
此差异已折叠。
此差异已折叠。
#include "ixj-ver.h"
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h> /* printk() */
#include <linux/fs.h> /* everything... */
#include <linux/errno.h> /* error codes */
#include <linux/slab.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include "ixj.h"
/*
* PCMCIA service support for Quicknet cards
*/
typedef struct ixj_info_t {
int ndev;
struct ixj *port;
} ixj_info_t;
static void ixj_detach(struct pcmcia_device *p_dev);
static int ixj_config(struct pcmcia_device * link);
static void ixj_cs_release(struct pcmcia_device * link);
static int ixj_probe(struct pcmcia_device *p_dev)
{
dev_dbg(&p_dev->dev, "ixj_attach()\n");
/* Create new ixj device */
p_dev->priv = kzalloc(sizeof(struct ixj_info_t), GFP_KERNEL);
if (!p_dev->priv) {
return -ENOMEM;
}
return ixj_config(p_dev);
}
static void ixj_detach(struct pcmcia_device *link)
{
dev_dbg(&link->dev, "ixj_detach\n");
ixj_cs_release(link);
kfree(link->priv);
}
static void ixj_get_serial(struct pcmcia_device * link, IXJ * j)
{
char *str;
int i, place;
dev_dbg(&link->dev, "ixj_get_serial\n");
str = link->prod_id[0];
if (!str)
goto failed;
printk("%s", str);
str = link->prod_id[1];
if (!str)
goto failed;
printk(" %s", str);
str = link->prod_id[2];
if (!str)
goto failed;
place = 1;
for (i = strlen(str) - 1; i >= 0; i--) {
switch (str[i]) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
j->serial += (str[i] - 48) * place;
break;
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
j->serial += (str[i] - 55) * place;
break;
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
j->serial += (str[i] - 87) * place;
break;
}
place = place * 0x10;
}
str = link->prod_id[3];
if (!str)
goto failed;
printk(" version %s\n", str);
failed:
return;
}
static int ixj_config_check(struct pcmcia_device *p_dev, void *priv_data)
{
p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
p_dev->resource[1]->flags &= ~IO_DATA_PATH_WIDTH;
p_dev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
p_dev->io_lines = 3;
return pcmcia_request_io(p_dev);
}
static int ixj_config(struct pcmcia_device * link)
{
IXJ *j;
ixj_info_t *info;
info = link->priv;
dev_dbg(&link->dev, "ixj_config\n");
link->config_flags = CONF_AUTO_SET_IO;
if (pcmcia_loop_config(link, ixj_config_check, NULL))
goto failed;
if (pcmcia_enable_device(link))
goto failed;
/*
* Register the card with the core.
*/
j = ixj_pcmcia_probe(link->resource[0]->start,
link->resource[0]->start + 0x10);
info->ndev = 1;
ixj_get_serial(link, j);
return 0;
failed:
ixj_cs_release(link);
return -ENODEV;
}
static void ixj_cs_release(struct pcmcia_device *link)
{
ixj_info_t *info = link->priv;
dev_dbg(&link->dev, "ixj_cs_release\n");
info->ndev = 0;
pcmcia_disable_device(link);
}
static const struct pcmcia_device_id ixj_ids[] = {
PCMCIA_DEVICE_MANF_CARD(0x0257, 0x0600),
PCMCIA_DEVICE_NULL
};
MODULE_DEVICE_TABLE(pcmcia, ixj_ids);
static struct pcmcia_driver ixj_driver = {
.owner = THIS_MODULE,
.name = "ixj_cs",
.probe = ixj_probe,
.remove = ixj_detach,
.id_table = ixj_ids,
};
static int __init ixj_pcmcia_init(void)
{
return pcmcia_register_driver(&ixj_driver);
}
static void ixj_pcmcia_exit(void)
{
pcmcia_unregister_driver(&ixj_driver);
}
module_init(ixj_pcmcia_init);
module_exit(ixj_pcmcia_exit);
MODULE_LICENSE("GPL");
/*
* Telephony registration for Linux
*
* (c) Copyright 1999 Red Hat Software Inc.
*
* 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.
*
* Author: Alan Cox, <alan@lxorguk.ukuu.org.uk>
*
* Fixes: Mar 01 2000 Thomas Sparr, <thomas.l.sparr@telia.com>
* phone_register_device now works with unit!=PHONE_UNIT_ANY
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/phonedev.h>
#include <linux/init.h>
#include <asm/uaccess.h>
#include <linux/kmod.h>
#include <linux/sem.h>
#include <linux/mutex.h>
#define PHONE_NUM_DEVICES 256
/*
* Active devices
*/
static struct phone_device *phone_device[PHONE_NUM_DEVICES];
static DEFINE_MUTEX(phone_lock);
/*
* Open a phone device.
*/
static int phone_open(struct inode *inode, struct file *file)
{
unsigned int minor = iminor(inode);
int err = 0;
struct phone_device *p;
const struct file_operations *old_fops, *new_fops = NULL;
if (minor >= PHONE_NUM_DEVICES)
return -ENODEV;
mutex_lock(&phone_lock);
p = phone_device[minor];
if (p)
new_fops = fops_get(p->f_op);
if (!new_fops) {
mutex_unlock(&phone_lock);
request_module("char-major-%d-%d", PHONE_MAJOR, minor);
mutex_lock(&phone_lock);
p = phone_device[minor];
if (p == NULL || (new_fops = fops_get(p->f_op)) == NULL)
{
err=-ENODEV;
goto end;
}
}
old_fops = file->f_op;
file->f_op = new_fops;
if (p->open)
err = p->open(p, file); /* Tell the device it is open */
if (err) {
fops_put(file->f_op);
file->f_op = fops_get(old_fops);
}
fops_put(old_fops);
end:
mutex_unlock(&phone_lock);
return err;
}
/*
* Telephony For Linux device drivers request registration here.
*/
int phone_register_device(struct phone_device *p, int unit)
{
int base;
int end;
int i;
base = 0;
end = PHONE_NUM_DEVICES - 1;
if (unit != PHONE_UNIT_ANY) {
base = unit;
end = unit + 1; /* enter the loop at least one time */
}
mutex_lock(&phone_lock);
for (i = base; i < end; i++) {
if (phone_device[i] == NULL) {
phone_device[i] = p;
p->minor = i;
mutex_unlock(&phone_lock);
return 0;
}
}
mutex_unlock(&phone_lock);
return -ENFILE;
}
/*
* Unregister an unused Telephony for linux device
*/
void phone_unregister_device(struct phone_device *pfd)
{
mutex_lock(&phone_lock);
if (likely(phone_device[pfd->minor] == pfd))
phone_device[pfd->minor] = NULL;
mutex_unlock(&phone_lock);
}
static const struct file_operations phone_fops =
{
.owner = THIS_MODULE,
.open = phone_open,
.llseek = noop_llseek,
};
/*
* Board init functions
*/
/*
* Initialise Telephony for linux
*/
static int __init telephony_init(void)
{
printk(KERN_INFO "Linux telephony interface: v1.00\n");
if (register_chrdev(PHONE_MAJOR, "telephony", &phone_fops)) {
printk("phonedev: unable to get major %d\n", PHONE_MAJOR);
return -EIO;
}
return 0;
}
static void __exit telephony_exit(void)
{
unregister_chrdev(PHONE_MAJOR, "telephony");
}
module_init(telephony_init);
module_exit(telephony_exit);
MODULE_LICENSE("GPL");
EXPORT_SYMBOL(phone_register_device);
EXPORT_SYMBOL(phone_unregister_device);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册