You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

60 lines
1.8 KiB

  1. /*
  2. * Copyright (C) 2013 The Android Open Source Project
  3. * Copyright (C) 2013 The CyanogenMod Project
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. #include <healthd.h>
  18. void
  19. healthd_board_init(struct healthd_config *config)
  20. {
  21. config->batteryCapacityPath = "/sys/class/power_supply/battery/capacity";
  22. config->batteryStatusPath = "/sys/class/power_supply/battery/status";
  23. config->batteryVoltagePath = "/sys/class/power_supply/battery/voltage_now";
  24. config->batteryCurrentNowPath = "/sys/class/power_supply/battery/batt_current_now";
  25. config->batteryPresentPath = "/sys/class/power_supply/battery/present";
  26. config->batteryHealthPath = "/sys/class/power_supply/battery/health";
  27. config->batteryTemperaturePath = "/sys/class/power_supply/battery/temp";
  28. config->batteryTechnologyPath = "/sys/class/power_supply/battery/technology";
  29. // others use defaults
  30. }
  31. int
  32. healthd_board_battery_update(struct android::BatteryProperties *props)
  33. {
  34. // return 0 to log periodic polled battery status to kernel log
  35. return 0;
  36. }
  37. void healthd_board_mode_charger_draw_battery(struct android::BatteryProperties*)
  38. {
  39. }
  40. void healthd_board_mode_charger_battery_update(struct android::BatteryProperties*)
  41. {
  42. }
  43. void healthd_board_mode_charger_set_backlight(bool)
  44. {
  45. }
  46. void healthd_board_mode_charger_init()
  47. {
  48. }