summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlejandro Sierra <b18039@freescale.com>2012-04-06 20:32:55 -0500
committerJason Liu <r64343@freescale.com>2012-07-20 13:35:57 +0800
commit9efbba04b4426fe022a7a47b2775b32111885966 (patch)
treeb520f135d437c77d33c331deece3a36d428645f2 /include
parent841de62a59e9bc296c526d7f78f2070504c4ca2e (diff)
ENGR00179123 AMFM I2C module to ARD platform for IMX6Q and IMX6DL
Basic I2C module integration of AMFM module to ARD platform IMX6Q and IMX6DL rev A and rev B boards. Supported for kernel 3.0.15. Signed-off-by: Alejandro Sierra <b18039@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/radio-si4763.h20
-rw-r--r--include/media/si4763.h48
2 files changed, 68 insertions, 0 deletions
diff --git a/include/media/radio-si4763.h b/include/media/radio-si4763.h
new file mode 100644
index 000000000000..e7abac285c14
--- /dev/null
+++ b/include/media/radio-si4763.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2008-2012 Freescale Semiconductor, Inc. All Rights Reserved.
+ */
+
+#ifndef RADIO_SI4763_H
+#define RADIO_SI4763_H
+
+#include <linux/i2c.h>
+
+#define SI4763_NAME "radio-si4763"
+
+/*
+ * Platform dependent definition
+ */
+struct radio_si4763_platform_data {
+ int i2c_bus;
+ struct i2c_board_info *subdev_board_info;
+};
+
+#endif /* ifndef RADIO_SI4763_H*/
diff --git a/include/media/si4763.h b/include/media/si4763.h
new file mode 100644
index 000000000000..494542e15c36
--- /dev/null
+++ b/include/media/si4763.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2008-2012 Freescale Semiconductor, Inc. All Rights Reserved.
+ */
+
+/*
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#ifndef SI4713_H
+#define SI4713_H
+
+/* The SI4713 I2C sensor chip has a fixed slave address of 0xc6 or 0x22. */
+#define SI4713_I2C_ADDR_BUSEN_HIGH 0x63
+#define SI4713_I2C_ADDR_BUSEN_LOW 0x11
+
+/*
+ * Platform dependent definition
+ */
+struct si4713_platform_data {
+ /* Set power state, zero is off, non-zero is on. */
+ int (*set_power)(int power);
+};
+
+/*
+ * Structure to query for Received Noise Level (RNL).
+ */
+struct si4713_rnl {
+ __u32 index; /* modulator index */
+ __u32 frequency; /* frequency to peform rnl measurement */
+ __s32 rnl; /* result of measurement in dBuV */
+ __u32 reserved[4]; /* drivers and apps must init this to 0 */
+};
+
+/*
+ * This is the ioctl number to query for rnl. Users must pass a
+ * struct si4713_rnl pointer specifying desired frequency in 'frequency' field
+ * following driver capabilities (i.e V4L2_TUNER_CAP_LOW).
+ * Driver must return measured value in the same struture, filling 'rnl' field.
+ */
+#define SI4713_IOC_MEASURE_RNL _IOWR('V', BASE_VIDIOC_PRIVATE + 0, \
+ struct si4713_rnl)
+
+#endif /* ifndef SI4713_H*/