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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 = {2098, 2097, 2096, 2093, 2084},
  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. {1157, 239, 100, 86, 87},
  30. {1095, 240, 100, 88, 88},
  31. {1077, 244, 101, 88, 88},
  32. {1019, 249, 103, 89, 89},
  33. {972, 254, 106, 91, 90},
  34. {909, 257, 111, 94, 92},
  35. {896, 233, 116, 97, 93},
  36. {884, 232, 125, 101, 96},
  37. {888, 227, 129, 109, 101},
  38. {903, 224, 107, 98, 96},
  39. {925, 224, 100, 89, 89},
  40. {956, 225, 100, 89, 89},
  41. {990, 229, 102, 90, 92},
  42. {1036, 236, 103, 93, 94},
  43. {1092, 251, 106, 93, 94},
  44. {1158, 265, 109, 92, 91},
  45. {1249, 274, 106, 90, 90},
  46. {1390, 284, 105, 90, 90},
  47. {1618, 308, 102, 88, 89},
  48. {2002, 341, 103, 90, 90},
  49. {2175, 349, 103, 90, 92},
  50. {2698, 389, 105, 92, 92},
  51. {3579, 486, 108, 94, 94},
  52. {4964, 670, 112, 96, 97},
  53. {7516, 885, 118, 99, 99},
  54. {11629, 1162, 123, 99, 97},
  55. {17704, 1708, 121, 96, 94},
  56. {26440, 2631, 131, 100, 97},
  57. {39109, 4127, 168, 109, 106},
  58. {57797, 6638, 736, 281, 167},
  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. {4326, 4326, 4322, 4317, 4309},
  68. {4226, 4250, 4252, 4249, 4244},
  69. {4154, 4190, 4193, 4191, 4187},
  70. {4097, 4134, 4137, 4135, 4132},
  71. {4037, 4082, 4084, 4083, 4080},
  72. {3961, 4027, 4038, 4036, 4031},
  73. {3916, 3958, 3983, 3988, 3987},
  74. {3875, 3919, 3950, 3950, 3948},
  75. {3843, 3883, 3912, 3914, 3912},
  76. {3819, 3851, 3860, 3865, 3864},
  77. {3799, 3825, 3828, 3829, 3829},
  78. {3784, 3803, 3806, 3807, 3806},
  79. {3770, 3786, 3790, 3789, 3789},
  80. {3757, 3774, 3776, 3776, 3774},
  81. {3743, 3764, 3767, 3763, 3760},
  82. {3728, 3751, 3759, 3750, 3737},
  83. {3709, 3728, 3739, 3730, 3716},
  84. {3690, 3707, 3710, 3702, 3689},
  85. {3672, 3694, 3683, 3675, 3666},
  86. {3656, 3686, 3676, 3670, 3659},
  87. {3648, 3682, 3674, 3668, 3657},
  88. {3637, 3677, 3672, 3666, 3656},
  89. {3624, 3673, 3669, 3664, 3654},
  90. {3612, 3667, 3667, 3661, 3651},
  91. {3594, 3659, 3662, 3656, 3646},
  92. {3573, 3645, 3649, 3641, 3628},
  93. {3545, 3614, 3613, 3603, 3587},
  94. {3505, 3565, 3554, 3543, 3528},
  95. {3443, 3490, 3473, 3462, 3449},
  96. {3340, 3372, 3352, 3343, 3331},
  97. {3000, 3000, 3000, 3000, 3000}
  98. }
  99. };
  100. struct bms_battery_data samsung_2100mAH_data = {
  101. .fcc = 2100,
  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 = 177
  107. };