Permalink
Browse files

fix rfkill source code

  • Loading branch information...
1 parent 22e84dc commit b36119155b9a246db7387bb08474db4ce0e6a596 @lvchaqiu committed Oct 16, 2012
@@ -1,5 +1,7 @@
-/*
- * Copyright (C) 2010 Meizu, Inc.
+/* arch/arm/mach-exynos/include/mach/mx_bt_rfkill.h
+ *
+ * Copyright (C) 2012 Meizu Technology Co.Ltd, Zhuhai, China
+ *
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -9,10 +11,13 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
- */
+ */
+
+#ifndef _MX_RFKILL_H_
+#define _MX_RFKILL_H_
struct mx_rfkill_pd {
+ char *name;
int bt_rxd;//BT_RXD
int bt_txd;//BT_TXD
int bt_cts;//BT_CTS
@@ -27,4 +32,6 @@
int wifi_reset;//WL_RESET
int wifi_cd;//WL_CD_PIN
};
-extern void bt_uart_wake_peer(struct uart_port *port);
+extern void bt_uart_wake_peer(struct uart_port *port);
+
+#endif /* _MX_RFKILL_H_ */
@@ -163,9 +163,18 @@ static struct s3c2410_uartcfg __initdata m030_uartcfgs[] = {
};
#if defined(CONFIG_BT)
+static struct mx_rfkill_pd __initdata m030_rfkill_pd = {
+ .name = "bcm4329_bt",
+ .bt_power = EXYNOS4_GPF2(3),
+ .bt_reset = EXYNOS4_GPF2(1),
+ .bt_wake = EXYNOS4_GPF3(1),
+ .bt_host_wake = EXYNOS4_GPX1(1),
+ .wifi_power = EXYNOS4_GPF1(5),
+ .wifi_reset = EXYNOS4_GPF1(0),
+};
static struct platform_device m030_bt_ctr = {
- .name = "bt_ctr",
- .id = -1,
+ .name = "bt_ctr",
+ .id = -1,
};
#endif
@@ -330,8 +339,13 @@ struct max17042_reg_data max17042_init_data[] = {
};
struct max17042_reg_data max17042_alert_init_data[] = {
+#ifdef CONFIG_MX_RECOVERY_KERNEL
+ /* SALRT Threshold setting (disable) */
+ { MAX17042_REG_SALRT_TH, 0x00, 0xFF },
+#else
/* SALRT Threshold setting to 6% => 5% wake lock */
{ MAX17042_REG_SALRT_TH, 0x06, 0xFF },
+#endif
/* VALRT Threshold setting (disable) */
{ MAX17042_REG_VALRT_TH, 0x00, 0xFF },
/* TALRT Threshold setting (disable) */
@@ -1160,6 +1174,11 @@ static void __init m030_machine_init(void)
exynos4_tmu_set_platdata();
#endif
+#ifdef CONFIG_BT
+ s3c_set_platdata(&m030_rfkill_pd, sizeof(struct mx_rfkill_pd),
+ &m030_bt_ctr);
+#endif
+
platform_add_devices(m030_devices, ARRAY_SIZE(m030_devices));
}
@@ -143,9 +143,18 @@ static struct s3c2410_uartcfg __initdata m032_uartcfgs[] = {
};
#ifdef CONFIG_BT
+static struct mx_rfkill_pd __initdata m032_rfkill_pd = {
+ .name = "bcm4329_bt",
+ .bt_power = EXYNOS4_GPY6(7),
+ .bt_reset = EXYNOS4_GPY5(5),
+ .bt_wake = EXYNOS4_GPY6(6),
+ .bt_host_wake = EXYNOS4_GPX2(4),
+ .wifi_power = EXYNOS4_GPY6(3),
+ .wifi_reset = EXYNOS4_GPY5(1),
+};
static struct platform_device m032_bt_ctr = {
- .name = "bt_ctr",
- .id = -1,
+ .name = "bt_ctr",
+ .id = -1,
};
#endif
@@ -1113,6 +1122,11 @@ static void __init m032_machine_init(void)
exynos4_tmu_set_platdata();
#endif
+#ifdef CONFIG_BT
+ s3c_set_platdata(&m032_rfkill_pd, sizeof(struct mx_rfkill_pd),
+ &m032_bt_ctr);
+#endif
+
platform_add_devices(m032_devices, ARRAY_SIZE(m032_devices));
}
Oops, something went wrong.

0 comments on commit b361191

Please sign in to comment.