erosq: Initial PM support for "hw4" variant

(They renamed the battery from 'battery' to 'axp_battery')

Change-Id: Ic42c31e1d5c01eafc3fe01b144d9f22d88933e04
This commit is contained in:
Solomon Peachy 2024-10-10 10:12:29 -04:00
parent 41abd8e32f
commit edbcf0b0f4
3 changed files with 56 additions and 6 deletions

View file

@ -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)
{