mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
erosq: Initial PM support for "hw4" variant
(They renamed the battery from 'battery' to 'axp_battery') Change-Id: Ic42c31e1d5c01eafc3fe01b144d9f22d88933e04
This commit is contained in:
parent
41abd8e32f
commit
edbcf0b0f4
3 changed files with 56 additions and 6 deletions
|
|
@ -33,9 +33,13 @@
|
|||
#include "usb.h"
|
||||
#endif
|
||||
|
||||
#ifdef BATTERY_DEV_NAME
|
||||
#define BATTERY_STATUS_PATH "/sys/class/power_supply/" BATTERY_DEV_NAME "/status"
|
||||
#endif
|
||||
|
||||
#define POWER_STATUS_PATH "/sys/class/power_supply/" POWER_DEV_NAME "/online"
|
||||
|
||||
#ifdef BATTERY_DEV_NAME
|
||||
/* We get called multiple times per tick, let's cut that back! */
|
||||
static long last_tick = 0;
|
||||
static bool last_power = false;
|
||||
|
|
@ -51,6 +55,7 @@ bool charging_state(void)
|
|||
}
|
||||
return last_power;
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned int power_input_status(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue