[PATCH 05/14] The BQ27000 Battery requires HDQ

Sven Rebhan odinshorse at googlemail.com
Sun Feb 22 22:08:14 CET 2009


Move the battery section within the HDQ_GPIO_BITBANG ifdef because it uses
functions only available if HDQ bitbanging is enabled.

Signed-off-by: Sven Rebhan <odinshorse at googlemail.com>

diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
index ab73137..6f32ccf 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -465,25 +465,6 @@ static void gta02_udc_vbus_draw(unsigned int ma)
 #define gta02_udc_vbus_draw             NULL
 #endif
 
-/* BQ27000 Battery */
-
-struct bq27000_platform_data bq27000_pdata = {
-	.name = "battery",
-	.rsense_mohms = 20,
-	.hdq_read = hdq_read,
-	.hdq_write = hdq_write,
-	.hdq_initialized = hdq_initialized,
-	.get_charger_online_status = gta02_get_charger_online_status,
-	.get_charger_active_status = gta02_get_charger_active_status
-};
-
-struct platform_device bq27000_battery_device = {
-	.name 		= "bq27000-battery",
-	.dev = {
-		.platform_data = &bq27000_pdata,
-	},
-};
-
 static struct platform_device gta01_pm_gps_dev = {
 	.name		= "neo1973-pm-gps",
 };
@@ -792,6 +773,25 @@ struct platform_device gta02_hdq_device = {
 		.platform_data = &gta02_hdq_platform_data,
 	},
 };
+
+/* BQ27000 Battery */
+
+struct bq27000_platform_data bq27000_pdata = {
+	.name = "battery",
+	.rsense_mohms = 20,
+	.hdq_read = hdq_read,
+	.hdq_write = hdq_write,
+	.hdq_initialized = hdq_initialized,
+	.get_charger_online_status = gta02_get_charger_online_status,
+	.get_charger_active_status = gta02_get_charger_active_status
+};
+
+struct platform_device bq27000_battery_device = {
+	.name 		= "bq27000-battery",
+	.dev = {
+		.platform_data = &bq27000_pdata,
+	},
+};
 #endif
 
 /* vibrator (child of FIQ) */
-- 
1.6.0.6




More information about the openmoko-kernel mailing list