Skip to content

Commit d8fa4cc

Browse files
committed
Clear the bbarma charging maximum value and modified charge limit LED behavior
Signed-off-by: Josh Tsai <josh_tsai@compal.com>
1 parent 369d3c3 commit d8fa4cc

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

board/hx20/battery.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ static enum ec_status cmd_charging_limit_control(struct host_cmd_handler_args *a
348348

349349
if (p->modes & CHG_LIMIT_DISABLE) {
350350
charging_maximum_level = 0;
351+
system_set_bbram(SYSTEM_BBRAM_IDX_CHG_MAX, 0);
351352
}
352353

353354
if (p->modes & CHG_LIMIT_SET_LIMIT) {

board/hx20/led.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ static void set_active_port_color(int color)
229229
static void led_set_battery(void)
230230
{
231231
static int battery_ticks;
232-
uint32_t chflags = charge_get_flags();
233232

234233
battery_ticks++;
235234

@@ -263,14 +262,8 @@ static void led_set_battery(void)
263262
break;
264263
case PWR_STATE_ERROR:
265264
case PWR_STATE_CHARGE_NEAR_FULL:
266-
set_active_port_color(EC_LED_COLOR_WHITE);
267-
break;
268265
case PWR_STATE_IDLE:
269-
if (chflags & CHARGE_FLAG_FORCE_IDLE)
270-
set_active_port_color((battery_ticks & 0x4) ?
271-
EC_LED_COLOR_AMBER : -1);
272-
else
273-
set_active_port_color(EC_LED_COLOR_WHITE);
266+
set_active_port_color(EC_LED_COLOR_WHITE);
274267
break;
275268
default:
276269
break;

0 commit comments

Comments
 (0)