aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/configs/gta01_moredrivers_defconfig4
-rw-r--r--arch/arm/configs/gta02_moredrivers_defconfig2
-rw-r--r--arch/arm/configs/gta02_packaging_defconfig6
-rw-r--r--arch/arm/mach-s3c2410/mach-gta01.c6
-rw-r--r--arch/arm/mach-s3c2442/mach-gta02.c38
-rw-r--r--arch/arm/plat-s3c24xx/neo1973_pm_gps.c3
6 files changed, 45 insertions, 14 deletions
diff --git a/arch/arm/configs/gta01_moredrivers_defconfig b/arch/arm/configs/gta01_moredrivers_defconfig
index 1f5883729dc..36d2b170b52 100644
--- a/arch/arm/configs/gta01_moredrivers_defconfig
+++ b/arch/arm/configs/gta01_moredrivers_defconfig
@@ -1839,7 +1839,7 @@ CONFIG_NLS_CODEPAGE_850=m
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
+CONFIG_NLS_CODEPAGE_866=m
# CONFIG_NLS_CODEPAGE_869 is not set
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
@@ -1848,7 +1848,7 @@ CONFIG_NLS_CODEPAGE_950=m
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_CODEPAGE_1251=m
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
diff --git a/arch/arm/configs/gta02_moredrivers_defconfig b/arch/arm/configs/gta02_moredrivers_defconfig
index 8d06cd6c70b..bd66869f74a 100644
--- a/arch/arm/configs/gta02_moredrivers_defconfig
+++ b/arch/arm/configs/gta02_moredrivers_defconfig
@@ -1177,7 +1177,7 @@ CONFIG_APM_POWER=y
CONFIG_CHARGER_PCF50633=y
CONFIG_BATTERY_BQ27000_HDQ=y
CONFIG_HDQ_GPIO_BITBANG=y
-# CONFIG_BATTERY_GTA01 is not set
+CONFIG_BATTERY_GTA01=m
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_AD7414 is not set
diff --git a/arch/arm/configs/gta02_packaging_defconfig b/arch/arm/configs/gta02_packaging_defconfig
index dfdfb19a2f1..15defd28841 100644
--- a/arch/arm/configs/gta02_packaging_defconfig
+++ b/arch/arm/configs/gta02_packaging_defconfig
@@ -1180,7 +1180,7 @@ CONFIG_APM_POWER=y
CONFIG_CHARGER_PCF50633=y
CONFIG_BATTERY_BQ27000_HDQ=y
CONFIG_HDQ_GPIO_BITBANG=y
-# CONFIG_BATTERY_GTA01 is not set
+CONFIG_BATTERY_GTA01=m
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_AD7414 is not set
@@ -1953,7 +1953,7 @@ CONFIG_NLS_CODEPAGE_850=m
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
+CONFIG_NLS_CODEPAGE_866=m
# CONFIG_NLS_CODEPAGE_869 is not set
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
@@ -1962,7 +1962,7 @@ CONFIG_NLS_CODEPAGE_950=m
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_CODEPAGE_1251=m
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c
index 1fe3eef2257..8a13a4adcfd 100644
--- a/arch/arm/mach-s3c2410/mach-gta01.c
+++ b/arch/arm/mach-s3c2410/mach-gta01.c
@@ -237,7 +237,7 @@ static int gta01_bat_get_voltage(void)
adc = pcf50606_adc_sync_read(pcf, PCF50606_ADCMUX_BATVOLT_RES);
mv = (adc * 6000) / 1024;
- return mv;
+ return mv * 1000;
}
static int gta01_bat_get_current(void)
@@ -248,10 +248,10 @@ static int gta01_bat_get_current(void)
adc_battvolt = pcf50606_adc_sync_read(pcf, PCF50606_ADCMUX_BATVOLT_SUBTR);
adc_adcin1 = pcf50606_adc_sync_read(pcf, PCF50606_ADCMUX_ADCIN1_SUBTR);
- res = (adc_adcin1 - adc_battvolt) * 2400;
+ res = (adc_battvolt - adc_adcin1) * 2400;
/*rsense is 220 milli */
- return (res * 1000) / (220 * 1024);
+ return (res * 1000) / (220 * 1024) * 1000;
}
static struct gta01_bat_platform_data gta01_bat_pdata = {
diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
index e7a5f0a55a1..0a93749ef8c 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -100,6 +100,7 @@
#include <linux/hdq.h>
#include <linux/bq27000_battery.h>
+#include <linux/gta01_battery.h>
#include "../plat-s3c24xx/neo1973_pm_gps.h"
@@ -391,7 +392,7 @@ static int gta02_get_charger_online_status(void)
{
struct pcf50633 *pcf = gta02_pcf;
- return pcf50633_mbc_get_status(pcf) & PCF50633_MBC_USB_ONLINE;
+ return pcf50633_mbc_get_usb_online_status(pcf);
}
static int gta02_get_charger_active_status(void)
@@ -484,12 +485,13 @@ static int gta02_udc_vbus_status(void)
if (!gta02_pcf)
return -ENODEV;
- return !!(pcf50633_mbc_get_status(pcf) & PCF50633_MBC_USB_ONLINE);
+ return pcf50633_mbc_get_usb_online_status(pcf);
}
#else /* !CONFIG_CHARGER_PCF50633 */
#define gta02_get_charger_online_status NULL
#define gta02_get_charger_active_status NULL
#define gta02_pmu_event_callback NULL
+#define gta02_pmu_force_shutdown NULL
#define gta02_udc_vbus_draw NULL
#define gta02_udc_vbus_status NULL
#endif
@@ -569,7 +571,6 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
.batteries = gta02_batteries,
.num_batteries = ARRAY_SIZE(gta02_batteries),
- .charging_restart_interval = (900 * HZ),
.chg_ref_current_ma = 1000,
.reg_init_data = {
@@ -726,7 +727,7 @@ static void mangle_pmu_pdata_by_system_rev(void)
reg_init_data[PCF50633_REGULATOR_LDO1]
.constraints.min_uV = 3300000;
reg_init_data[PCF50633_REGULATOR_LDO1]
- .constraints.min_uV = 3300000;
+ .constraints.max_uV = 3300000;
reg_init_data[PCF50633_REGULATOR_LDO1]
.constraints.state_mem.enabled = 0;
@@ -747,6 +748,34 @@ static void mangle_pmu_pdata_by_system_rev(void)
}
}
+static int gta02_bat_get_voltage(void)
+{
+ struct pcf50633 *pcf = gta02_pcf;
+ u16 adc, mv = 0;
+ adc = pcf50633_adc_sync_read(pcf,
+ PCF50633_ADCC1_MUX_BATSNS_RES,
+ PCF50633_ADCC1_AVERAGE_16);
+ /* The formula from DS is for divide-by-two mode, current driver uses
+ divide-by-three */
+ mv = (adc * 6000) / 1023;
+ return mv * 1000;
+}
+
+static struct gta01_bat_platform_data gta01_bat_pdata = {
+#ifdef CONFIG_CHARGER_PCF50633
+ .get_charging_status = gta02_get_charger_active_status,
+#endif
+ .get_voltage = gta02_bat_get_voltage,
+};
+
+struct platform_device gta01_bat = {
+ .name = "gta01_battery",
+ .id = -1,
+ .dev = {
+ .platform_data = &gta01_bat_pdata,
+ }
+};
+
#ifdef CONFIG_HDQ_GPIO_BITBANG
/* BQ27000 Battery */
@@ -1551,6 +1580,7 @@ static struct platform_device *gta02_devices_pmu_children[] = {
&gta02_spi_gpio_dev, /* input 2 and 3 */
&gta02_button_dev, /* input 4 */
&gta02_resume_reason_device,
+ &gta01_bat,
};
static void gta02_pmu_regulator_registered(struct pcf50633 *pcf, int id)
diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
index 93b491137e7..b59d4959257 100644
--- a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
+++ b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
@@ -305,7 +305,8 @@ static void gps_pwron_set(int on)
/* remove pulldown now it won't be floating any more */
s3c2410_gpio_pullup(S3C2410_GPH5, 0);
- if (!neo1973_gps.power_was_on)
+ if (!regulator_is_enabled(neo1973_gps.regulator[
+ GTA02_GPS_REG_RF_3V]))
regulator_enable(neo1973_gps.regulator[
GTA02_GPS_REG_RF_3V]);
return;