bms-batterydata-samsung-2600mah.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* Copyright (c) 2011-2013, The Linux Foundation. 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. #include <linux/batterydata-lib.h>
  13. static struct single_row_lut fcc_temp = {
  14. .x = {-20, 0, 25, 40, 60},
  15. .y = {2589, 2589, 2587, 2577, 2564},
  16. .cols = 5
  17. };
  18. static struct single_row_lut fcc_sf = {
  19. .x = {0},
  20. .y = {100},
  21. .cols = 1
  22. };
  23. static struct sf_lut rbatt_sf = {
  24. .rows = 30,
  25. .cols = 5,
  26. .row_entries = {-20, 0, 25, 40, 60},
  27. .percent = {100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 16, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1},
  28. .sf = {
  29. {982, 232, 100, 84, 78},
  30. {980, 232, 100, 84, 78},
  31. {921, 234, 101, 85, 78},
  32. {878, 238, 102, 86, 79},
  33. {855, 245, 105, 89, 81},
  34. {778, 260, 112, 94, 82},
  35. {767, 236, 111, 93, 85},
  36. {763, 230, 120, 97, 86},
  37. {767, 222, 125, 102, 90},
  38. {788, 211, 117, 104, 92},
  39. {817, 209, 100, 86, 80},
  40. {851, 208, 97, 84, 79},
  41. {887, 212, 98, 86, 81},
  42. {924, 223, 99, 88, 83},
  43. {961, 240, 102, 88, 82},
  44. {1005, 262, 105, 86, 79},
  45. {1058, 280, 104, 86, 79},
  46. {1104, 287, 102, 87, 80},
  47. {1048, 273, 99, 85, 78},
  48. {1075, 279, 97, 84, 78},
  49. {1105, 288, 99, 85, 80},
  50. {1136, 296, 101, 86, 81},
  51. {1170, 308, 104, 88, 82},
  52. {1208, 324, 106, 90, 85},
  53. {1252, 342, 110, 93, 88},
  54. {1304, 365, 113, 96, 91},
  55. {1366, 378, 110, 94, 83},
  56. {1629, 397, 109, 90, 84},
  57. {2096, 440, 116, 96, 88},
  58. {3426, 604, 137, 116, 106},
  59. }
  60. };
  61. static struct pc_temp_ocv_lut pc_temp_ocv = {
  62. .rows = 31,
  63. .cols = 5,
  64. .temp = {-20, 0, 25, 40, 60},
  65. .percent = {100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 16, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
  66. .ocv = {
  67. #if defined(CONFIG_MACH_BAFFIN2_CHN_CMCC)
  68. {4310, 4310, 4305, 4298, 4294},
  69. #else
  70. {4326, 4326, 4322, 4317, 4310},
  71. #endif
  72. {4222, 4244, 4249, 4247, 4243},
  73. {4158, 4188, 4192, 4190, 4187},
  74. {4102, 4136, 4139, 4137, 4134},
  75. {4052, 4088, 4089, 4087, 4084},
  76. {3963, 4041, 4045, 4042, 4036},
  77. {3914, 3968, 3984, 3989, 3993},
  78. {3875, 3926, 3955, 3957, 3954},
  79. {3845, 3891, 3921, 3922, 3919},
  80. {3826, 3856, 3878, 3883, 3882},
  81. {3812, 3829, 3837, 3838, 3838},
  82. {3800, 3807, 3813, 3814, 3813},
  83. {3787, 3792, 3795, 3796, 3795},
  84. {3773, 3783, 3781, 3782, 3781},
  85. {3758, 3774, 3772, 3769, 3765},
  86. {3743, 3765, 3764, 3756, 3744},
  87. {3727, 3747, 3747, 3738, 3724},
  88. {3714, 3723, 3724, 3716, 3703},
  89. {3703, 3703, 3696, 3689, 3676},
  90. {3692, 3695, 3688, 3681, 3669},
  91. {3687, 3693, 3687, 3680, 3668},
  92. {3680, 3691, 3686, 3679, 3667},
  93. {3672, 3688, 3685, 3678, 3667},
  94. {3662, 3686, 3684, 3677, 3665},
  95. {3647, 3683, 3681, 3674, 3663},
  96. {3625, 3676, 3675, 3668, 3655},
  97. {3592, 3653, 3648, 3643, 3625},
  98. {3548, 3604, 3594, 3592, 3571},
  99. {3487, 3532, 3517, 3519, 3498},
  100. {3388, 3422, 3404, 3415, 3395},
  101. {3200, 3200, 3200, 3200, 3200}
  102. }
  103. };
  104. struct bms_battery_data samsung_8x26_2600mAh_data = {
  105. .fcc = 2600,
  106. .fcc_temp_lut = &fcc_temp,
  107. .fcc_sf_lut = &fcc_sf,
  108. .pc_temp_ocv_lut = &pc_temp_ocv,
  109. .rbatt_sf_lut = &rbatt_sf,
  110. .default_rbatt_mohm = 175
  111. };