bms-batterydata-lis-samsung-4450mah.c 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* Copyright (c) 2013, Samsung Electronics Co. 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 = {4673, 4711, 4712, 4705, 4675},
  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. {1773, 246, 100, 86, 82},
  30. {1770, 246, 100, 86, 82},
  31. {1701, 249, 100, 87, 83},
  32. {1646, 256, 103, 88, 83},
  33. {1529, 265, 105, 89, 84},
  34. {1514, 277, 108, 90, 85},
  35. {1514, 258, 112, 93, 86},
  36. {1543, 249, 121, 98, 89},
  37. {1586, 240, 119, 98, 89},
  38. {1631, 240, 105, 90, 85},
  39. {1682, 246, 102, 88, 83},
  40. {1734, 256, 103, 88, 84},
  41. {1786, 272, 105, 89, 85},
  42. {1845, 293, 107, 91, 86},
  43. {1909, 323, 107, 90, 84},
  44. {1994, 360, 107, 89, 83},
  45. {2108, 409, 106, 89, 83},
  46. {2362, 455, 108, 89, 83},
  47. {2497, 501, 109, 89, 83},
  48. {2919, 559, 110, 89, 84},
  49. {3182, 595, 113, 90, 84},
  50. {3502, 640, 115, 91, 85},
  51. {3940, 693, 118, 92, 86},
  52. {4420, 754, 123, 94, 87},
  53. {5043, 813, 126, 95, 87},
  54. {5868, 874, 128, 94, 85},
  55. {6964, 970, 133, 94, 85},
  56. {8491, 1101, 140, 96, 87},
  57. {8491, 1101, 140, 96, 87},
  58. {8491, 1101, 140, 96, 87}
  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. {4328, 4327, 4322, 4317, 4310},
  68. {4207, 4246, 4254, 4253, 4248},
  69. {4126, 4186, 4197, 4196, 4192},
  70. {4062, 4132, 4142, 4141, 4138},
  71. {3979, 4081, 4091, 4089, 4086},
  72. {3930, 4028, 4042, 4041, 4038},
  73. {3890, 3968, 3996, 3997, 3995},
  74. {3861, 3925, 3957, 3958, 3955},
  75. {3839, 3884, 3911, 3914, 3913},
  76. {3820, 3850, 3867, 3869, 3868},
  77. {3802, 3823, 3836, 3838, 3838},
  78. {3786, 3802, 3814, 3815, 3814},
  79. {3770, 3788, 3795, 3796, 3796},
  80. {3755, 3777, 3780, 3781, 3780},
  81. {3740, 3767, 3768, 3764, 3759},
  82. {3724, 3752, 3755, 3747, 3735},
  83. {3706, 3728, 3736, 3728, 3715},
  84. {3687, 3702, 3712, 3705, 3692},
  85. {3669, 3687, 3689, 3682, 3670},
  86. {3652, 3680, 3683, 3678, 3667},
  87. {3642, 3677, 3682, 3676, 3665},
  88. {3628, 3673, 3680, 3675, 3664},
  89. {3611, 3668, 3677, 3673, 3662},
  90. {3591, 3659, 3674, 3669, 3659},
  91. {3566, 3639, 3665, 3661, 3648},
  92. {3533, 3603, 3638, 3634, 3620},
  93. {3488, 3553, 3592, 3588, 3573},
  94. {3423, 3489, 3529, 3525, 3511},
  95. {3327, 3400, 3442, 3439, 3425},
  96. {3191, 3269, 3311, 3305, 3293},
  97. {3000, 3000, 3000, 3000, 3000}
  98. }
  99. };
  100. struct bms_battery_data samsung_lis_4450mAH_data = {
  101. .fcc = 4450,
  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 = 99
  107. };