bms-batterydata-samsung-2800mah.c 3.2 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 = {2800,2779,2786,2781,2769},
  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. {1311,269,100,80,71},
  30. {1311,269,100,80,71},
  31. {1204,275,102,82,73},
  32. {1163,279,105,84,75},
  33. {1127,286,107,86,76},
  34. {1021,302,116,92,79},
  35. {1011,249,115,92,80},
  36. {995,250,127,96,82},
  37. {1013,246,122,102,88},
  38. {1050,240,102,88,79},
  39. {1097,238,98,80,73},
  40. {1149,237,98,82,75},
  41. {1205,242,100,85,77},
  42. {1260,256,101,86,80},
  43. {1323,280,103,84,78},
  44. {1391,310,107,83,74},
  45. {1482,337,105,83,75},
  46. {1660,357,104,83,75},
  47. {1822,385,102,82,74},
  48. {1833,406,103,83,76},
  49. {1730,404,104,85,77},
  50. {1806,400,105,86,78},
  51. {1986,412,108,89,79},
  52. {2198,434,112,91,80},
  53. {2476,457,117,92,80},
  54. {2830,480,117,90,79},
  55. {3351,501,112,86,77},
  56. {4280,536,115,89,80},
  57. {8011,592,127,96,87},
  58. {76763,719,9114,128,706}
  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,4326,4324,4320,4312},
  68. {4214,4247,4254,4252,4248},
  69. {4140,4190,4198,4196,4192},
  70. {4092,4139,4144,4142,4138},
  71. {4035,4091,4092,4090,4087},
  72. {3936,4041,4054,4049,4040},
  73. {3894,3954,3984,3992,3996},
  74. {3851,3918,3958,3958,3956},
  75. {3828,3886,3915,3920,3918},
  76. {3812,3854,3867,3871,3872},
  77. {3800,3828,3836,3837,3837},
  78. {3787,3804,3814,3815,3814},
  79. {3776,3790,3796,3797,3796},
  80. {3762,3780,3782,3782,3780},
  81. {3748,3772,3772,3768,3764},
  82. {3732,3761,3764,3755,3742},
  83. {3715,3740,3746,3736,3722},
  84. {3698,3716,3718,3710,3696},
  85. {3680,3704,3694,3686,3676},
  86. {3666,3696,3689,3682,3670},
  87. {3656,3694,3688,3681,3670},
  88. {3644,3692,3687,3680,3669},
  89. {3630,3688,3686,3680,3668},
  90. {3612,3685,3684,3678,3666},
  91. {3590,3680,3680,3674,3660},
  92. {3558,3664,3666,3658,3638},
  93. {3516,3633,3624,3615,3593},
  94. {3454,3582,3560,3552,3529},
  95. {3358,3502,3468,3464,3438},
  96. {3232,3370,3318,3323,3287},
  97. {3000,3000,3000,3000,3000}
  98. }
  99. };
  100. struct bms_battery_data samsung_2800mAH_data = {
  101. .fcc = 2800,
  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 = 169
  107. };