bms-batterydata-samsung-2000mah.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* Copyright (c) 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 = {2123, 2113, 2114, 2109, 2092},
  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. {1161, 273, 100, 83, 80},
  30. {1154, 273, 100, 83, 80},
  31. {1033, 272, 101, 85, 80},
  32. {964, 271, 103, 86, 81},
  33. {933, 275, 107, 88, 82},
  34. {856, 280, 111, 90, 84},
  35. {846, 242, 115, 92, 86},
  36. {843, 236, 123, 97, 89},
  37. {847, 235, 120, 103, 93},
  38. {871, 231, 106, 95, 90},
  39. {907, 230, 98, 84, 81},
  40. {953, 230, 98, 84, 81},
  41. {1004, 238, 100, 87, 83},
  42. {1057, 254, 101, 88, 86},
  43. {1110, 277, 104, 88, 84},
  44. {1194, 304, 106, 88, 83},
  45. {1369, 328, 105, 86, 82},
  46. {1443, 341, 104, 87, 83},
  47. {1568, 348, 102, 83, 80},
  48. {1793, 372, 103, 86, 82},
  49. {1941, 389, 105, 88, 83},
  50. {2118, 408, 107, 89, 84},
  51. {2331, 431, 111, 91, 87},
  52. {2603, 457, 114, 93, 90},
  53. {2976, 490, 119, 97, 94},
  54. {3517, 522, 121, 96, 90},
  55. {4388, 554, 118, 92, 86},
  56. {6787, 610, 126, 97, 90},
  57. {44101, 704, 144, 112, 105},
  58. {170766, 4208, 1758, 1385, 157}
  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. {4334, 4333, 4329, 4324, 4316},
  68. {4226, 4254, 4259, 4257, 4253},
  69. {4159, 4196, 4202, 4200, 4196},
  70. {4099, 4142, 4147, 4145, 4141},
  71. {4045, 4093, 4096, 4093, 4089},
  72. {3953, 4040, 4046, 4042, 4040},
  73. {3907, 3959, 3990, 3994, 3995},
  74. {3868, 3918, 3957, 3958, 3956},
  75. {3835, 3886, 3915, 3920, 3918},
  76. {3816, 3854, 3868, 3874, 3875},
  77. {3802, 3827, 3835, 3836, 3835},
  78. {3790, 3805, 3812, 3813, 3812},
  79. {3778, 3790, 3794, 3795, 3794},
  80. {3766, 3781, 3780, 3780, 3779},
  81. {3753, 3773, 3771, 3767, 3761},
  82. {3739, 3762, 3762, 3753, 3741},
  83. {3723, 3744, 3745, 3735, 3721},
  84. {3707, 3718, 3717, 3709, 3696},
  85. {3690, 3704, 3692, 3683, 3671},
  86. {3676, 3697, 3688, 3681, 3669},
  87. {3666, 3695, 3687, 3680, 3668},
  88. {3656, 3692, 3686, 3679, 3668},
  89. {3641, 3690, 3685, 3678, 3667},
  90. {3621, 3688, 3683, 3676, 3664},
  91. {3594, 3682, 3679, 3672, 3659},
  92. {3556, 3669, 3665, 3655, 3638},
  93. {3499, 3635, 3623, 3611, 3593},
  94. {3407, 3576, 3559, 3548, 3530},
  95. {3286, 3487, 3472, 3463, 3448},
  96. {3159, 3346, 3336, 3325, 3313},
  97. {3000, 3000, 3000, 3000, 3000}
  98. }
  99. };
  100. struct bms_battery_data samsung_2000mAH_data = {
  101. .fcc = 2000,
  102. .fcc_temp_lut = &fcc_temp,
  103. .fcc_sf_lut = &fcc_sf,
  104. .pc_temp_ocv_lut = &pc_temp_ocv,
  105. .rbatt_sf_lut = &rbatt_sf,
  106. .default_rbatt_mohm = 192
  107. };