aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c/si47xx_common.h
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.com>2012-09-22 09:48:20 +0200
committercodeworkx <codeworkx@cyanogenmod.com>2012-09-22 14:02:16 +0200
commit2489007e7d740ccbc3e0a202914e243ad5178787 (patch)
treeb8e6380ea7b1da63474ad68a5dba997e01146043 /include/linux/i2c/si47xx_common.h
parent5f67568eb31e3a813c7c52461dcf66ade15fc2e7 (diff)
downloadkernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.zip
kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.gz
kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.bz2
merge opensource jb u5
Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
Diffstat (limited to 'include/linux/i2c/si47xx_common.h')
-rw-r--r--include/linux/i2c/si47xx_common.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/include/linux/i2c/si47xx_common.h b/include/linux/i2c/si47xx_common.h
new file mode 100644
index 0000000..456e623
--- /dev/null
+++ b/include/linux/i2c/si47xx_common.h
@@ -0,0 +1,60 @@
+/*
+ * Si47xx_common.h -- Si47xx FM Radio driver
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _COMMON_H
+#define _COMMON_H
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <mach/gpio.h>
+
+#define error(fmt, arg...) printk(KERN_CRIT fmt "\n", ##arg)
+
+#ifdef Si47xx_DEBUG
+#define debug(fmt, arg...) printk(KERN_CRIT "--------" fmt "\n", ##arg)
+#else
+#define debug(fmt, arg...)
+#endif
+
+#define FM_PORT "GPX13"
+
+#define SI47XX_VOLUME_NUM 16
+
+struct si47xx_platform_data {
+ u16 rx_vol[SI47XX_VOLUME_NUM];
+ void (*power) (int on);
+};
+
+struct Si47xx_data {
+ struct si47xx_platform_data *pdata;
+ struct i2c_client *client;
+ struct device *dev;
+};
+
+
+/* VNVS:28-OCT'09 : For testing FM tune and seek operation status */
+#define TEST_FM
+
+/* VNVS:7-JUNE'10 : RDS Interrupt ON Always */
+/* (Enabling interrupt when RDS is enabled) */
+#define RDS_INTERRUPT_ON_ALWAYS
+
+/* VNVS:18-JUN'10 : For testing RDS */
+/* Enable only for debugging RDS */
+/* #define RDS_TESTING */
+#ifdef RDS_TESTING
+#define debug_rds(fmt, arg...) printk(KERN_CRIT "--------" fmt "\n", ##arg)
+#define GROUP_TYPE_2A (2 * 2 + 0)
+#define GROUP_TYPE_2B (2 * 2 + 1)
+#else
+#define debug_rds(fmt, arg...)
+#endif
+
+extern wait_queue_head_t Si47xx_waitq;
+#endif