From 555299af9f0ee71c1ad86a6c6846748861be458b Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 10 Mar 2021 18:10:00 -0500 Subject: hosted: Consolidate the code that polls the battery charging status affects all hiby targets, fiiom3k, and ibasso dx50/dx90 As well as deduplicating a small pile of code, this also implements hysteresis so we're not doing a sysfs read/lookup multiple times back-to-back every time the power management tick fires. Change-Id: I2f7672acbb36341becf67e07960c24c681270d09 --- firmware/export/config/hibylinux.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/export/config/hibylinux.h') diff --git a/firmware/export/config/hibylinux.h b/firmware/export/config/hibylinux.h index e73faa7608..f1e52917ba 100644 --- a/firmware/export/config/hibylinux.h +++ b/firmware/export/config/hibylinux.h @@ -84,3 +84,7 @@ #define MULTIDRIVE_DIR "/mnt/usb" #define MULTIDRIVE_DEV "/sys/block/sda" #define ROOTDRIVE_DEV "/sys/block/mmcblk0" + +/* More common stuff */ +#define BATTERY_DEV_NAME "battery" +#define POWER_DEV_NAME "usb" -- cgit v1.2.3