ideapad.h 637 B

123456789101112131415161718192021
  1. /* IdeaPad/Yoga ACPI EC battery and AC (see ideapad.c).
  2. *
  3. * The Yoga 720-13IKB exposes BAT1/ACAD through the ACPI EC's PCH memory
  4. * window at 0xFF000800. The DSDT _BST/_BIF methods read the fields from that
  5. * window; this backend does the same without an ACPI interpreter.
  6. */
  7. #ifndef IDEAPAD_H
  8. #define IDEAPAD_H
  9. #include "power_src.h"
  10. /* Probe the EC memory window. Safe to call more than once. */
  11. int ideapad_present(void);
  12. /* Boot probe; logs the backend when found. */
  13. void ideapad_init(void);
  14. /* Fill out->battery[0] and the AC state from BAT1/ACAD. */
  15. void ideapad_power_read(struct power_info *out, int detail);
  16. #endif