aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c2440
diff options
context:
space:
mode:
authormokopatches <mokopatches@openmoko.org>2008-11-19 17:03:18 +0000
committerwarmcat <andy@warmcat.com>2008-11-19 17:03:18 +0000
commit53e151f7b262f68e7df33a86d94f5f27ca2d757f (patch)
tree63f5d39b11979deab3a93a9e02c96ed47f0eb050 /arch/arm/mach-s3c2440
parented36a6e47e095f266031f6fb532d1098b4bf42dc (diff)
bq27000-battery-driver.patch
Diffstat (limited to 'arch/arm/mach-s3c2440')
-rw-r--r--arch/arm/mach-s3c2440/Kconfig2
-rw-r--r--arch/arm/mach-s3c2440/mach-gta02.c21
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index ed3f2cd4d7f..cbcf9fc37c1 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -87,6 +87,8 @@ config MACH_NEO1973_GTA02
bool "FIC Neo1973 GSM Phone (GTA02 Hardware)"
select CPU_S3C2442
select SENSORS_PCF50633
+ select POWER_SUPPLY
+ select GTA02_HDQ
help
Say Y here if you are using the FIC Neo1973 GSM Phone
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index cea76e7fa71..3816ea5f9b0 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -81,6 +81,8 @@
#include <asm/arch/fiq_ipc_gta02.h>
#include "fiq_c_isr.h"
+#include <linux/gta02_hdq.h>
+#include <linux/bq27000_battery.h>
/* arbitrates which sensor IRQ owns the shared SPI bus */
static spinlock_t motion_irq_lock;
@@ -583,6 +585,24 @@ struct platform_device gta02_hdq_device = {
};
#endif
+/* BQ27000 Battery */
+
+struct bq27000_platform_data bq27000_pdata = {
+ .name = "bat",
+ .rsense_mohms = 20,
+ .hdq_read = gta02hdq_read,
+ .hdq_write = gta02hdq_write,
+ .hdq_initialized = gta02hdq_initialized,
+};
+
+struct platform_device bq27000_battery_device = {
+ .name = "bq27000-battery",
+ .dev = {
+ .platform_data = &bq27000_pdata,
+ },
+};
+
+
/* NOR Flash */
#define GTA02_FLASH_BASE 0x18000000 /* GCS3 */
@@ -1271,6 +1291,7 @@ static void __init gta02_machine_init(void)
case GTA02v5_SYSTEM_REV:
case GTA02v6_SYSTEM_REV:
platform_device_register(&gta02_hdq_device);
+ platform_device_register(&bq27000_battery_device);
break;
default:
break;