summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/lm7000.h
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2012-06-12 19:37:54 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-21 17:12:03 +0200
commit4ecbb69414c61af3594209e081d6e834ea68a16d (patch)
tree3af05249ef46680174185336c5dd200d724eb511 /drivers/media/radio/lm7000.h
parent[media] em28xx: Make a few drxk_config structs static (diff)
downloadlinux-4ecbb69414c61af3594209e081d6e834ea68a16d.tar.xz
linux-4ecbb69414c61af3594209e081d6e834ea68a16d.zip
[media] radio: Add Sanyo LM7000 tuner driver
Add very simple driver for Sanyo LM7000 AM/FM tuner chip. Only FM is supported as there is no known HW with AM implemented. This will be used by radio-aimslab and radio-sf16fmi. 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/lm7000.h')
-rw-r--r--drivers/media/radio/lm7000.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/media/radio/lm7000.h b/drivers/media/radio/lm7000.h
new file mode 100644
index 000000000000..a5bc7d632f1d
--- /dev/null
+++ b/drivers/media/radio/lm7000.h
@@ -0,0 +1,32 @@
+#ifndef __LM7000_H
+#define __LM7000_H
+
+#define LM7000_DATA (1 << 0)
+#define LM7000_CLK (1 << 1)
+#define LM7000_CE (1 << 2)
+
+#define LM7000_FREQ_MASK 0x3fff
+#define LM7000_BIT_T0 (1 << 14)
+#define LM7000_BIT_T1 (1 << 15)
+#define LM7000_BIT_B0 (1 << 16)
+#define LM7000_BIT_B1 (1 << 17)
+#define LM7000_BIT_B2 (1 << 18)
+#define LM7000_BIT_TB (1 << 19)
+#define LM7000_FM_100 (0 << 20)
+#define LM7000_FM_50 (1 << 20)
+#define LM7000_FM_25 (2 << 20)
+#define LM7000_AM_5 (3 << 20)
+#define LM7000_AM_10 (4 << 20)
+#define LM7000_AM_9 (5 << 20)
+#define LM7000_AM_1 (6 << 20)
+#define LM7000_AM_5_ (7 << 20)
+#define LM7000_BIT_FM (1 << 23)
+
+
+struct lm7000 {
+ void (*set_pins)(struct lm7000 *lm, u8 pins);
+};
+
+void lm7000_set_freq(struct lm7000 *lm, u32 freq);
+
+#endif /* __LM7000_H */