bms-batterydata-samsung-1720mah.c 3.5 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 = {1679, 1710, 1692, 1692, 1680},
  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. {1024, 261, 100, 78, 66},
  30. {1006, 266, 106, 82, 69},
  31. {1007, 269, 106, 82, 69},
  32. {976, 279, 111, 86, 73},
  33. {952, 283, 116, 90, 76},
  34. {931, 284, 122, 94, 79},
  35. {918, 277, 129, 100, 83},
  36. {917, 267, 135, 105, 87},
  37. {918, 261, 127, 105, 88},
  38. {929, 261, 106, 86, 74},
  39. {958, 264, 103, 83, 72},
  40. {1016, 270, 108, 88, 76},
  41. {1117, 280, 113, 91, 82},
  42. {1280, 296, 118, 94, 86},
  43. {1532, 328, 123, 96, 80},
  44. {2122, 411, 125, 92, 76},
  45. {3608, 710, 127, 92, 77},
  46. {6522, 1101, 130, 92, 77},
  47. {12172, 1544, 140, 91, 76},
  48. {19425, 2203, 164, 93, 76},
  49. {29742, 3007, 194, 98, 78},
  50. {40856, 4089, 220, 101, 81},
  51. {58153, 6107, 271, 106, 83},
  52. {84171, 9408, 378, 113, 84},
  53. {120055, 13909, 545, 122, 86},
  54. {176691, 19678, 797, 132, 87},
  55. {245818, 27215, 1196, 151, 86},
  56. {333293, 37866, 1962, 213, 88},
  57. {456301, 53683, 3346, 418, 97},
  58. {607971, 77884, 5445, 923, 115}
  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. {4387, 4385, 4379, 4373, 4363},
  68. {4297, 4310, 4311, 4308, 4299},
  69. {4217, 4242, 4249, 4248, 4239},
  70. {4141, 4177, 4188, 4187, 4180},
  71. {4071, 4114, 4128, 4129, 4122},
  72. {4007, 4054, 4073, 4073, 4068},
  73. {3950, 3995, 4022, 4023, 4018},
  74. {3903, 3941, 3976, 3977, 3974},
  75. {3862, 3895, 3924, 3930, 3927},
  76. {3828, 3857, 3873, 3877, 3878},
  77. {3802, 3826, 3839, 3843, 3843},
  78. {3782, 3801, 3814, 3817, 3818},
  79. {3765, 3781, 3794, 3796, 3797},
  80. {3749, 3766, 3777, 3778, 3779},
  81. {3733, 3752, 3765, 3763, 3757},
  82. {3715, 3733, 3750, 3745, 3734},
  83. {3696, 3705, 3726, 3722, 3710},
  84. {3679, 3683, 3695, 3693, 3683},
  85. {3663, 3669, 3669, 3669, 3660},
  86. {3651, 3660, 3656, 3656, 3649},
  87. {3646, 3655, 3652, 3653, 3646},
  88. {3641, 3649, 3648, 3650, 3643},
  89. {3636, 3642, 3644, 3646, 3640},
  90. {3630, 3634, 3640, 3642, 3635},
  91. {3621, 3624, 3634, 3636, 3630},
  92. {3608, 3612, 3623, 3624, 3618},
  93. {3590, 3592, 3600, 3598, 3589},
  94. {3557, 3554, 3557, 3553, 3544},
  95. {3497, 3495, 3497, 3493, 3485},
  96. {3411, 3414, 3416, 3414, 3408},
  97. {3300, 3300, 3300, 3300, 3300}
  98. }
  99. };
  100. struct bms_battery_data samsung_1720mAH_data = {
  101. .fcc = 1720,
  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 = 159
  107. };