Abhijeet Dharmapurikar | e8771be | 2012-03-01 10:32:49 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/mfd/pm8xxx/pm8921-bms.h> |
| 14 | |
| 15 | static struct single_row_lut desay_5200_fcc_temp = { |
| 16 | .x = {-20, 0, 25, 40}, |
| 17 | .y = {5690, 5722, 5722, 5727}, |
| 18 | .cols = 4 |
| 19 | }; |
| 20 | |
| 21 | static struct single_row_lut desay_5200_fcc_sf = { |
| 22 | .x = {0}, |
| 23 | .y = {100}, |
| 24 | .cols = 1 |
| 25 | }; |
| 26 | |
| 27 | static struct pc_temp_ocv_lut desay_5200_pc_temp_ocv = { |
| 28 | .rows = 29, |
| 29 | .cols = 4, |
| 30 | .temp = {-20, 0, 25, 40}, |
| 31 | .percent = {100, 95, 90, 85, 80, 75, 70, 65, 60, 55, |
| 32 | 50, 45, 40, 35, 30, 25, 20, 15, 10, 9, 8, |
| 33 | 7, 6, 5, 4, 3, 2, 1, 0 |
| 34 | }, |
| 35 | .ocv = { |
| 36 | {4185, 4184, 4181, 4178}, |
| 37 | {4103, 4117, 4120, 4119}, |
| 38 | {4044, 4067, 4074, 4073}, |
| 39 | {3987, 4019, 4031, 4030}, |
| 40 | {3941, 3974, 3992, 3992}, |
| 41 | {3902, 3936, 3958, 3957}, |
| 42 | {3866, 3901, 3926, 3926}, |
| 43 | {3835, 3870, 3891, 3896}, |
| 44 | {3811, 3842, 3855, 3858}, |
| 45 | {3792, 3818, 3827, 3827}, |
| 46 | {3776, 3795, 3806, 3806}, |
| 47 | {3762, 3778, 3789, 3790}, |
| 48 | {3748, 3765, 3777, 3777}, |
| 49 | {3735, 3752, 3767, 3765}, |
| 50 | {3720, 3739, 3756, 3754}, |
| 51 | {3704, 3726, 3743, 3736}, |
| 52 | {3685, 3712, 3723, 3716}, |
| 53 | {3664, 3697, 3695, 3689}, |
| 54 | {3623, 3672, 3669, 3664}, |
| 55 | {3611, 3666, 3666, 3661}, |
| 56 | {3597, 3659, 3662, 3658}, |
| 57 | {3579, 3648, 3657, 3653}, |
| 58 | {3559, 3630, 3644, 3639}, |
| 59 | {3532, 3600, 3612, 3606}, |
| 60 | {3497, 3558, 3565, 3559}, |
| 61 | {3450, 3500, 3504, 3498}, |
| 62 | {3380, 3417, 3421, 3416}, |
| 63 | {3265, 3287, 3296, 3293}, |
| 64 | {3000, 3000, 3000, 3000} |
| 65 | }, |
| 66 | }; |
| 67 | |
Abhijeet Dharmapurikar | f6fdcaa0 | 2012-02-27 00:10:10 -0800 | [diff] [blame^] | 68 | static struct sf_lut desay_5200_pc_sf = { |
Abhijeet Dharmapurikar | e8771be | 2012-03-01 10:32:49 -0800 | [diff] [blame] | 69 | .rows = 1, |
| 70 | .cols = 1, |
Abhijeet Dharmapurikar | f6fdcaa0 | 2012-02-27 00:10:10 -0800 | [diff] [blame^] | 71 | /* row_entries are cycles here */ |
| 72 | .row_entries = {0}, |
Abhijeet Dharmapurikar | e8771be | 2012-03-01 10:32:49 -0800 | [diff] [blame] | 73 | .percent = {100}, |
| 74 | .sf = { |
| 75 | {100} |
| 76 | }, |
| 77 | }; |
| 78 | |
| 79 | struct pm8921_bms_battery_data desay_5200_data = { |
| 80 | .fcc = 5200, |
| 81 | .fcc_temp_lut = &desay_5200_fcc_temp, |
| 82 | .fcc_sf_lut = &desay_5200_fcc_sf, |
| 83 | .pc_temp_ocv_lut = &desay_5200_pc_temp_ocv, |
| 84 | .pc_sf_lut = &desay_5200_pc_sf, |
Abhijeet Dharmapurikar | f6fdcaa0 | 2012-02-27 00:10:10 -0800 | [diff] [blame^] | 85 | .default_rbatt_mohm = 156, |
Abhijeet Dharmapurikar | e8771be | 2012-03-01 10:32:49 -0800 | [diff] [blame] | 86 | }; |