aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-06-25 10:06:59 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-25 10:06:59 -0400
commitf6d1b15c154d07c88829426d2c83c6321fe31cf3 (patch)
tree3668dc50224327086f47e92c536e493c26df1a86 /drivers/media
parent8f7fa3c8014cc6a892e5bd0e31dc772989935ec3 (diff)
Revert "[media] radio: Add Sanyo LM7000 tuner driver"
This reverts commit 4ecbb69414c61af3594209e081d6e834ea68a16d. As requested by Hans Verkuil: > You accidentally merged the wrong first version of the lm7000 patch series. > > These are the correct second version patches: > > http://patchwork.linuxtv.org/patch/11689/ > http://patchwork.linuxtv.org/patch/11690/ > http://patchwork.linuxtv.org/patch/11691/ > > The second version is much simpler and doesn't require the creation of a whole > new driver. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/radio/Kconfig3
-rw-r--r--drivers/media/radio/Makefile1
-rw-r--r--drivers/media/radio/lm7000.c52
-rw-r--r--drivers/media/radio/lm7000.h32
4 files changed, 0 insertions, 88 deletions
diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index 5bcce129d718..c257da13d766 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -191,9 +191,6 @@ config RADIO_CADET
191 To compile this driver as a module, choose M here: the 191 To compile this driver as a module, choose M here: the
192 module will be called radio-cadet. 192 module will be called radio-cadet.
193 193
194config RADIO_LM7000
195 tristate
196
197config RADIO_RTRACK 194config RADIO_RTRACK
198 tristate "AIMSlab RadioTrack (aka RadioReveal) support" 195 tristate "AIMSlab RadioTrack (aka RadioReveal) support"
199 depends on ISA && VIDEO_V4L2 196 depends on ISA && VIDEO_V4L2
diff --git a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile
index 7f6aa63117c0..ca8c7d134b95 100644
--- a/drivers/media/radio/Makefile
+++ b/drivers/media/radio/Makefile
@@ -28,6 +28,5 @@ obj-$(CONFIG_RADIO_TEF6862) += tef6862.o
28obj-$(CONFIG_RADIO_TIMBERDALE) += radio-timb.o 28obj-$(CONFIG_RADIO_TIMBERDALE) += radio-timb.o
29obj-$(CONFIG_RADIO_WL1273) += radio-wl1273.o 29obj-$(CONFIG_RADIO_WL1273) += radio-wl1273.o
30obj-$(CONFIG_RADIO_WL128X) += wl128x/ 30obj-$(CONFIG_RADIO_WL128X) += wl128x/
31obj-$(CONFIG_RADIO_LM7000) += lm7000.o
32 31
33ccflags-y += -Isound 32ccflags-y += -Isound
diff --git a/drivers/media/radio/lm7000.c b/drivers/media/radio/lm7000.c
deleted file mode 100644
index 681f3af89260..000000000000
--- a/drivers/media/radio/lm7000.c
+++ /dev/null
@@ -1,52 +0,0 @@
1/* Sanyo LM7000 tuner chip driver
2 *
3 * Copyright 2012 Ondrej Zary <linux@rainbow-software.org>
4 * based on radio-aimslab.c by M. Kirkwood
5 * and radio-sf16fmi.c by M. Kirkwood and Petr Vandrovec
6 */
7
8#include <linux/delay.h>
9#include <linux/module.h>
10#include "lm7000.h"
11
12MODULE_AUTHOR("Ondrej Zary <linux@rainbow-software.org>");
13MODULE_DESCRIPTION("Routines for Sanyo LM7000 AM/FM radio tuner chip");
14MODULE_LICENSE("GPL");
15
16/* write the 24-bit register, starting with LSB */
17static void lm7000_write(struct lm7000 *lm, u32 val)
18{
19 int i;
20 u8 data;
21
22 for (i = 0; i < 24; i++) {
23 data = val & (1 << i) ? LM7000_DATA : 0;
24 lm->set_pins(lm, data | LM7000_CE);
25 udelay(2);
26 lm->set_pins(lm, data | LM7000_CE | LM7000_CLK);
27 udelay(2);
28 lm->set_pins(lm, data | LM7000_CE);
29 udelay(2);
30 }
31 lm->set_pins(lm, 0);
32}
33
34void lm7000_set_freq(struct lm7000 *lm, u32 freq)
35{
36 freq += 171200; /* Add 10.7 MHz IF */
37 freq /= 400; /* Convert to 25 kHz units */
38 lm7000_write(lm, freq | LM7000_FM_25 | LM7000_BIT_FM);
39}
40EXPORT_SYMBOL(lm7000_set_freq);
41
42static int __init lm7000_module_init(void)
43{
44 return 0;
45}
46
47static void __exit lm7000_module_exit(void)
48{
49}
50
51module_init(lm7000_module_init)
52module_exit(lm7000_module_exit)
diff --git a/drivers/media/radio/lm7000.h b/drivers/media/radio/lm7000.h
deleted file mode 100644
index a5bc7d632f1d..000000000000
--- a/drivers/media/radio/lm7000.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef __LM7000_H
2#define __LM7000_H
3
4#define LM7000_DATA (1 << 0)
5#define LM7000_CLK (1 << 1)
6#define LM7000_CE (1 << 2)
7
8#define LM7000_FREQ_MASK 0x3fff
9#define LM7000_BIT_T0 (1 << 14)
10#define LM7000_BIT_T1 (1 << 15)
11#define LM7000_BIT_B0 (1 << 16)
12#define LM7000_BIT_B1 (1 << 17)
13#define LM7000_BIT_B2 (1 << 18)
14#define LM7000_BIT_TB (1 << 19)
15#define LM7000_FM_100 (0 << 20)
16#define LM7000_FM_50 (1 << 20)
17#define LM7000_FM_25 (2 << 20)
18#define LM7000_AM_5 (3 << 20)
19#define LM7000_AM_10 (4 << 20)
20#define LM7000_AM_9 (5 << 20)
21#define LM7000_AM_1 (6 << 20)
22#define LM7000_AM_5_ (7 << 20)
23#define LM7000_BIT_FM (1 << 23)
24
25
26struct lm7000 {
27 void (*set_pins)(struct lm7000 *lm, u8 pins);
28};
29
30void lm7000_set_freq(struct lm7000 *lm, u32 freq);
31
32#endif /* __LM7000_H */