summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-01-09 18:55:28 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-01-09 20:12:41 +0000
commitc62c323ebc71da33bf653624e45becee096906c3 (patch)
treea328d9400b9b2ff4c637110cf5fb701d5eba5904 /firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c
parentb490f08b7c6f8b32b214e0fbf6dd3974066ec150 (diff)
downloadrockbox-c62c323ebc71da33bf653624e45becee096906c3.tar.gz
rockbox-c62c323ebc71da33bf653624e45becee096906c3.zip
axp-pmu: adc refactor
Remove the battery power ADC since it's not used right now, and seems to fluctuate too rapidly to be of much use. Change-Id: If115e4e3ce14d4c18ce899f5a889f7f99ab66489
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c')
-rw-r--r--firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c b/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c
index 75f8031dd9..59a2262f25 100644
--- a/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c
+++ b/firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c
@@ -78,6 +78,19 @@ void power_init(void)
78 cw2015_init(); 78 cw2015_init();
79#endif 79#endif
80 80
81 /* Set lowest sample rate */
82 axp_adc_set_rate(AXP_ADC_RATE_25HZ);
83
84 /* Enable required ADCs */
85 axp_adc_set_enabled(
86 (1 << ADC_BATTERY_VOLTAGE) |
87 (1 << ADC_CHARGE_CURRENT) |
88 (1 << ADC_DISCHARGE_CURRENT) |
89 (1 << ADC_VBUS_VOLTAGE) |
90 (1 << ADC_VBUS_CURRENT) |
91 (1 << ADC_INTERNAL_TEMP) |
92 (1 << ADC_APS_VOLTAGE));
93
81 /* Change supply voltage from the default of 1250 mV to 1200 mV, 94 /* Change supply voltage from the default of 1250 mV to 1200 mV,
82 * this matches the original firmware's settings. Didn't observe 95 * this matches the original firmware's settings. Didn't observe
83 * any obviously bad behavior at 1250 mV, but better to be safe. */ 96 * any obviously bad behavior at 1250 mV, but better to be safe. */