From a05bd377ab3f6bc29f8d8ca9d55db2b951641d64 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 6 Mar 2025 19:18:02 -0500 Subject: [PATCH] [FixRed] YPR1 the YPR1 apparently can do voltage or percent measure I'm pretty sure its missing logic for disksafe and shutdown, perhaps the device takes care of it for you? hopefully someone with the device notices the issue (perhaps due to a older battery needing capacity tweaked) Change-Id: I79d3927fa8b154ba231aa6894de7920a4e4dd4c7 --- .../target/hosted/samsungypr/ypr1/powermgmt-ypr1.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/firmware/target/hosted/samsungypr/ypr1/powermgmt-ypr1.c b/firmware/target/hosted/samsungypr/ypr1/powermgmt-ypr1.c index 0f9f342720..b01cecd20a 100644 --- a/firmware/target/hosted/samsungypr/ypr1/powermgmt-ypr1.c +++ b/firmware/target/hosted/samsungypr/ypr1/powermgmt-ypr1.c @@ -72,6 +72,20 @@ unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = { { 3450, 3502, 3550, 3587, 3623, 3669, 3742, 3836, 3926, 4026, 4200 } }; +#else /* FIX ME what level should disksafe be?*/ +unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = +{ +}; + +/* the OF shuts down at this voltage */ +unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = +{ +}; + +/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ +unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = +{ +}; #endif #if CONFIG_CHARGING