diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2012-06-12 13:38:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-21 11:12:40 -0400 |
commit | 1e70a6cf7e965bafd89bf363772eb1a4b8e35934 (patch) | |
tree | 8088855c04907456e19fe52faa4fe4efff4d6099 /drivers/media/radio/Kconfig | |
parent | bece083a6b2b242c7ab74117640396e1bd851e49 (diff) |
[media] radio-sf16fmi: Use LM7000 driver
Convert radio-sf16fmi to use generic LM7000 driver.
Tested with SF16-FMI, SF16-FMP and SF16-FMD.
radio.");
@@ -48,37 +50,40 @@ struct fmi
bool mute;
unsigned long curfreq; /* freq in kHz */
struct mutex lock;
+ struct lm7000 lm;
};
static struct fmi fmi_card;
static struct pnp_dev *dev;
bool pnp_attached;
-/* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */
-/* It is only useful to give freq in interval of 800 (=0.05Mhz),
- * other bits will be truncated, e.g 92.7400016 -> 92.7, but
- * 92.7400017 -> 92.75
- */
-#define RSF16_ENCODE(x) ((x) / 800 + 214)
#define RSF16_MINFREQ (87 * 16000)
#define RSF16_MAXFREQ (108 * 16000)
-static void outbits(int bits, unsigned int data, int io)
+#define FMI_BIT_TUN_CE (1 << 0)
+#define FMI_BIT_TUN_CLK (1 << 1)
+#define FMI_BIT_TUN_DATA (1 << 2)
+#define FMI_BIT_VOL_SW (1 << 3)
+#define FMI_BIT_TUN_STRQ (1 << 4)
+
+void fmi_set_pins(struct lm7000 *lm, u8 pins)
{
- while (bits--) {
- if (data & 1) {
- outb(5, io);
- udelay(6);
- outb(7, io);
- udelay(6);
- } else {
- outb(1, io);
- udelay(6);
- outb(3, io);
- udelay(6);
- }
- data >>= 1;
- }
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/Kconfig')
-rw-r--r-- | drivers/media/radio/Kconfig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index abdf43c05720..f4c392481b3c 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig | |||
@@ -193,8 +193,8 @@ config RADIO_CADET | |||
193 | 193 | ||
194 | config RADIO_LM7000 | 194 | config RADIO_LM7000 |
195 | tristate | 195 | tristate |
196 | depends on RADIO_RTRACK | 196 | depends on RADIO_RTRACK || RADIO_SF16FMI |
197 | default RADIO_RTRACK | 197 | default RADIO_RTRACK || RADIO_SF16FMI |
198 | 198 | ||
199 | config RADIO_RTRACK | 199 | config RADIO_RTRACK |
200 | tristate "AIMSlab RadioTrack (aka RadioReveal) support" | 200 | tristate "AIMSlab RadioTrack (aka RadioReveal) support" |
@@ -328,6 +328,7 @@ config RADIO_MIROPCM20 | |||
328 | config RADIO_SF16FMI | 328 | config RADIO_SF16FMI |
329 | tristate "SF16-FMI/SF16-FMP/SF16-FMD Radio" | 329 | tristate "SF16-FMI/SF16-FMP/SF16-FMD Radio" |
330 | depends on ISA && VIDEO_V4L2 | 330 | depends on ISA && VIDEO_V4L2 |
331 | select RADIO_LM7000 | ||
331 | ---help--- | 332 | ---help--- |
332 | Choose Y here if you have one of these FM radio cards. | 333 | Choose Y here if you have one of these FM radio cards. |
333 | 334 | ||