diff options
author | Minsu, Kim <minsu78.kim@samsung.com> | 2011-01-14 13:28:48 +0900 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-17 17:52:55 -0800 |
commit | e5cc05ef38659db41d529f202b1daf2f7a4b4ab2 (patch) | |
tree | 96b54bf79476aac147dde82af0b352c7137f9eac | |
parent | 12504f15c1d51e4249df85fe56d3587250f36a72 (diff) | |
download | kernel_samsung_crespo-e5cc05ef38659db41d529f202b1daf2f7a4b4ab2.zip kernel_samsung_crespo-e5cc05ef38659db41d529f202b1daf2f7a4b4ab2.tar.gz kernel_samsung_crespo-e5cc05ef38659db41d529f202b1daf2f7a4b4ab2.tar.bz2 |
5PC11X: BATTERY: seperate ADC table for OLED and TFT
Battery ADC values for TFT LCD are different from those for OLED LCD.
Change-Id: Ia6f21c040e80aead1712a9df481ee2e4c794db2a
Signed-off-by: Minsu Kim <minsu78.kim@samsung.com>
-rwxr-xr-x | arch/arm/mach-s5pv210/mach-herring.c | 102 |
1 files changed, 99 insertions, 3 deletions
diff --git a/arch/arm/mach-s5pv210/mach-herring.c b/arch/arm/mach-s5pv210/mach-herring.c index cd80c01..3296809 100755 --- a/arch/arm/mach-s5pv210/mach-herring.c +++ b/arch/arm/mach-s5pv210/mach-herring.c @@ -736,7 +736,7 @@ static struct max8998_regulator_data herring_regulators[] = { { MAX8998_BUCK4, &herring_buck4_data }, }; -static struct max8998_adc_table_data temper_table[] = { +static struct max8998_adc_table_data temper_table_oled[] = { /* ADC, Temperature (C/10) */ { 222, 700 }, { 230, 690 }, @@ -820,6 +820,90 @@ static struct max8998_adc_table_data temper_table[] = { { 1697, (-90) }, { 1715, (-100) }, }; +static struct max8998_adc_table_data temper_table_tft[] = { + /* ADC, Temperature (C/10) */ + { 242, 700 }, + { 253, 690 }, + { 264, 680 }, + { 275, 670 }, + { 286, 660 }, + { 297, 650 }, + { 310, 640 }, + { 323, 630 }, + { 336, 620 }, + { 349, 610 }, + { 362, 600 }, + { 375, 590 }, + { 388, 580 }, + { 401, 570 }, + { 414, 560 }, + { 430, 550 }, + { 444, 540 }, + { 458, 530 }, + { 472, 520 }, + { 486, 510 }, + { 500, 500 }, + { 515, 490 }, + { 530, 480 }, + { 545, 470 }, + { 560, 460 }, + { 575, 450 }, + { 590, 440 }, + { 605, 430 }, + { 625, 420 }, + { 645, 410 }, + { 665, 400 }, + { 683, 390 }, + { 702, 380 }, + { 735, 370 }, + { 768, 360 }, + { 768, 350 }, + { 790, 340 }, + { 812, 330 }, + { 834, 320 }, + { 856, 310 }, + { 881, 300 }, + { 905, 290 }, + { 929, 280 }, + { 955, 270 }, + { 979, 260 }, + { 1002, 250 }, + { 1027, 240 }, + { 1053, 230 }, + { 1078, 220 }, + { 1105, 210 }, + { 1130, 200 }, + { 1151, 190 }, + { 1174, 180 }, + { 1195, 170 }, + { 1219, 160 }, + { 1237, 150 }, + { 1261, 140 }, + { 1285, 130 }, + { 1309, 120 }, + { 1331, 110 }, + { 1359, 100 }, + { 1381, 90 }, + { 1404, 80 }, + { 1426, 70 }, + { 1438, 60 }, + { 1470, 50 }, + { 1488, 40 }, + { 1506, 30 }, + { 1524, 20 }, + { 1532, 10 }, + { 1560, 0 }, + { 1586, (-10) }, + { 1604, (-20) }, + { 1614, (-30) }, + { 1622, (-40) }, + { 1630, (-50) }, + { 1648, (-60) }, + { 1666, (-70) }, + { 1684, (-80) }, + { 1702, (-90) }, + { 1720, (-100) }, +}; struct max8998_charger_callbacks *callbacks; static enum cable_type_t set_cable_status; @@ -835,10 +919,21 @@ static void max8998_charger_register_callbacks( static struct max8998_charger_data herring_charger = { .register_callbacks = &max8998_charger_register_callbacks, - .adc_table = temper_table, - .adc_array_size = ARRAY_SIZE(temper_table), }; +static void set_adc_table(void) +{ + if (system_rev < 0x30) { + herring_charger.adc_table = temper_table_oled; + herring_charger.adc_array_size = + ARRAY_SIZE(temper_table_oled); + } else { + herring_charger.adc_table = temper_table_tft; + herring_charger.adc_array_size = + ARRAY_SIZE(temper_table_tft); + } +} + static struct max8998_platform_data max8998_pdata = { .num_regulators = ARRAY_SIZE(herring_regulators), .regulators = herring_regulators, @@ -4495,6 +4590,7 @@ static void __init herring_machine_init(void) s3c_i2c2_set_platdata(NULL); #endif k3g_irq_init(); + set_adc_table(); /* H/W I2C lines */ if (system_rev >= 0x05) { /* gyro sensor */ |