diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-03-10 18:10:00 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-03-10 18:29:29 -0500 |
commit | 555299af9f0ee71c1ad86a6c6846748861be458b (patch) | |
tree | 2237e2991231cf529420f52c10a91912ed94bf06 /firmware/export/config | |
parent | b3b8310e4e07902a8280a120948f0c32c85e67de (diff) | |
download | rockbox-555299af9f0ee71c1ad86a6c6846748861be458b.tar.gz rockbox-555299af9f0ee71c1ad86a6c6846748861be458b.zip |
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
Diffstat (limited to 'firmware/export/config')
-rw-r--r-- | firmware/export/config/fiiom3klinux.h | 4 | ||||
-rw-r--r-- | firmware/export/config/hibylinux.h | 4 | ||||
-rw-r--r-- | firmware/export/config/ibassodx50.h | 4 | ||||
-rw-r--r-- | firmware/export/config/ibassodx90.h | 4 |
4 files changed, 16 insertions, 0 deletions
diff --git a/firmware/export/config/fiiom3klinux.h b/firmware/export/config/fiiom3klinux.h index 51d2a222e6..0ce58be46f 100644 --- a/firmware/export/config/fiiom3klinux.h +++ b/firmware/export/config/fiiom3klinux.h | |||
@@ -128,3 +128,7 @@ | |||
128 | #define BOOTFILE_EXT "m3k" | 128 | #define BOOTFILE_EXT "m3k" |
129 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 129 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
130 | #define BOOTDIR "/.rockbox" | 130 | #define BOOTDIR "/.rockbox" |
131 | |||
132 | /* More stuff */ | ||
133 | #define BATTERY_DEV_NAME "battery" | ||
134 | #define POWER_DEV_NAME "ac" | ||
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 @@ | |||
84 | #define MULTIDRIVE_DIR "/mnt/usb" | 84 | #define MULTIDRIVE_DIR "/mnt/usb" |
85 | #define MULTIDRIVE_DEV "/sys/block/sda" | 85 | #define MULTIDRIVE_DEV "/sys/block/sda" |
86 | #define ROOTDRIVE_DEV "/sys/block/mmcblk0" | 86 | #define ROOTDRIVE_DEV "/sys/block/mmcblk0" |
87 | |||
88 | /* More common stuff */ | ||
89 | #define BATTERY_DEV_NAME "battery" | ||
90 | #define POWER_DEV_NAME "usb" | ||
diff --git a/firmware/export/config/ibassodx50.h b/firmware/export/config/ibassodx50.h index 0a7c04a739..6bebf5a278 100644 --- a/firmware/export/config/ibassodx50.h +++ b/firmware/export/config/ibassodx50.h | |||
@@ -143,3 +143,7 @@ | |||
143 | /* No special storage */ | 143 | /* No special storage */ |
144 | #define CONFIG_STORAGE STORAGE_HOSTFS | 144 | #define CONFIG_STORAGE STORAGE_HOSTFS |
145 | #define HAVE_STORAGE_FLUSH | 145 | #define HAVE_STORAGE_FLUSH |
146 | |||
147 | /* More common stuff */ | ||
148 | #define BATTERY_DEV_NAME "battery" | ||
149 | #define POWER_DEV_NAME "usb" | ||
diff --git a/firmware/export/config/ibassodx90.h b/firmware/export/config/ibassodx90.h index 7071f50959..0b33665eb4 100644 --- a/firmware/export/config/ibassodx90.h +++ b/firmware/export/config/ibassodx90.h | |||
@@ -140,3 +140,7 @@ | |||
140 | /* No special storage */ | 140 | /* No special storage */ |
141 | #define CONFIG_STORAGE STORAGE_HOSTFS | 141 | #define CONFIG_STORAGE STORAGE_HOSTFS |
142 | #define HAVE_STORAGE_FLUSH | 142 | #define HAVE_STORAGE_FLUSH |
143 | |||
144 | /* More common stuff */ | ||
145 | #define BATTERY_DEV_NAME "battery" | ||
146 | #define POWER_DEV_NAME "usb" | ||