summaryrefslogtreecommitdiffstats
path: root/include/media/tvaudio.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-04-01 09:00:30 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-07 02:44:25 +0200
commit940088a16221fa517f5b921266afa8e46f49b784 (patch)
tree41e7635a3cddc38a4a04d4c65a50b96f8f13ada6 /include/media/tvaudio.h
parentV4L/DVB (11375): v4l2: use v4l2_i2c_new_probed_subdev_addr where appropriate. (diff)
downloadlinux-940088a16221fa517f5b921266afa8e46f49b784.tar.xz
linux-940088a16221fa517f5b921266afa8e46f49b784.zip
V4L/DVB (11376): tvaudio.h: add static inline to retrieve the list of possible i2c addrs.
Rather than duplicating this list everywhere, just put it in tvaudio.h. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/tvaudio.h')
-rw-r--r--include/media/tvaudio.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/media/tvaudio.h b/include/media/tvaudio.h
index 6915aafc875a..1ac8184693f8 100644
--- a/include/media/tvaudio.h
+++ b/include/media/tvaudio.h
@@ -21,10 +21,29 @@
#ifndef _TVAUDIO_H
#define _TVAUDIO_H
+#include <media/i2c-addr.h>
+
/* The tvaudio module accepts the following inputs: */
#define TVAUDIO_INPUT_TUNER 0
#define TVAUDIO_INPUT_RADIO 1
#define TVAUDIO_INPUT_EXTERN 2
#define TVAUDIO_INPUT_INTERN 3
+static inline const unsigned short *tvaudio_addrs(void)
+{
+ static const unsigned short addrs[] = {
+ I2C_ADDR_TDA8425 >> 1,
+ I2C_ADDR_TEA6300 >> 1,
+ I2C_ADDR_TEA6420 >> 1,
+ I2C_ADDR_TDA9840 >> 1,
+ I2C_ADDR_TDA985x_L >> 1,
+ I2C_ADDR_TDA985x_H >> 1,
+ I2C_ADDR_TDA9874 >> 1,
+ I2C_ADDR_PIC16C54 >> 1,
+ I2C_CLIENT_END
+ };
+
+ return addrs;
+}
+
#endif