/arch/arm/mach-msm/bms-batterydata-desay.c

https://github.com/AICP/kernel_google_msm · C · 86 lines · 68 code · 6 blank · 12 comment · 0 complexity · b6f1968c20ca5c048353a875e1f96f10 MD5 · raw file

  1. /* Copyright (c) 2011-2012, 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/mfd/pm8xxx/pm8921-bms.h>
  13. static struct single_row_lut desay_5200_fcc_temp = {
  14. .x = {-20, 0, 25, 40},
  15. .y = {5690, 5722, 5722, 5727},
  16. .cols = 4
  17. };
  18. static struct single_row_lut desay_5200_fcc_sf = {
  19. .x = {0},
  20. .y = {100},
  21. .cols = 1
  22. };
  23. static struct pc_temp_ocv_lut desay_5200_pc_temp_ocv = {
  24. .rows = 29,
  25. .cols = 4,
  26. .temp = {-20, 0, 25, 40},
  27. .percent = {100, 95, 90, 85, 80, 75, 70, 65, 60, 55,
  28. 50, 45, 40, 35, 30, 25, 20, 15, 10, 9, 8,
  29. 7, 6, 5, 4, 3, 2, 1, 0
  30. },
  31. .ocv = {
  32. {4185, 4184, 4181, 4178},
  33. {4103, 4117, 4120, 4119},
  34. {4044, 4067, 4074, 4073},
  35. {3987, 4019, 4031, 4030},
  36. {3941, 3974, 3992, 3992},
  37. {3902, 3936, 3958, 3957},
  38. {3866, 3901, 3926, 3926},
  39. {3835, 3870, 3891, 3896},
  40. {3811, 3842, 3855, 3858},
  41. {3792, 3818, 3827, 3827},
  42. {3776, 3795, 3806, 3806},
  43. {3762, 3778, 3789, 3790},
  44. {3748, 3765, 3777, 3777},
  45. {3735, 3752, 3767, 3765},
  46. {3720, 3739, 3756, 3754},
  47. {3704, 3726, 3743, 3736},
  48. {3685, 3712, 3723, 3716},
  49. {3664, 3697, 3695, 3689},
  50. {3623, 3672, 3669, 3664},
  51. {3611, 3666, 3666, 3661},
  52. {3597, 3659, 3662, 3658},
  53. {3579, 3648, 3657, 3653},
  54. {3559, 3630, 3644, 3639},
  55. {3532, 3600, 3612, 3606},
  56. {3497, 3558, 3565, 3559},
  57. {3450, 3500, 3504, 3498},
  58. {3380, 3417, 3421, 3416},
  59. {3265, 3287, 3296, 3293},
  60. {3000, 3000, 3000, 3000}
  61. },
  62. };
  63. static struct sf_lut desay_5200_pc_sf = {
  64. .rows = 1,
  65. .cols = 1,
  66. /* row_entries are cycles here */
  67. .row_entries = {0},
  68. .percent = {100},
  69. .sf = {
  70. {100}
  71. },
  72. };
  73. struct pm8921_bms_battery_data desay_5200_data = {
  74. .fcc = 5200,
  75. .fcc_temp_lut = &desay_5200_fcc_temp,
  76. .fcc_sf_lut = &desay_5200_fcc_sf,
  77. .pc_temp_ocv_lut = &desay_5200_pc_temp_ocv,
  78. .pc_sf_lut = &desay_5200_pc_sf,
  79. .default_rbatt_mohm = 156,
  80. };