mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 08:31:52 +00:00
Some chargers can run in a "turbo" mode, which lets it draw from the battery
to provide extra power to the AP in short bursts. In order for this to work
properly, the EC has to watch the current closely to make sure specific
limits are observed. It also has to recognize specific adapters, since those
limits vary depending on the rated power that the adapter can provide.
This adds the basic functionality, plus a test for it.
BUG=chrome-os-partner:20739
BRANCH=falco,peppy
TEST=manual
make BOARD=${BOARD} runtests
On Falco, you can also use the "adapter" EC command to see what's going on.
Try replacing the adapters and running that command to be sure they're
correctly identified, too:
> adapter
Adapter 65W (590mv), turbo 1, AP_throttled 0
>
We currently support 45W, 65W, and 90W adapters. Unknown adapters are
treated as 65W, but don't enable turbo mode.
Change-Id: I7e5407db825ce7e596cb495fb8cb4d1dd1ff639c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63372
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
59 lines
1.5 KiB
Makefile
59 lines
1.5 KiB
Makefile
# -*- makefile -*-
|
|
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# on-board test binaries build
|
|
#
|
|
|
|
test-list-y=pingpong timer_calib timer_dos timer_jump mutex utils
|
|
#disable: powerdemo
|
|
|
|
# TODO(victoryang): Fix these tests:
|
|
# scancode typematic charging
|
|
|
|
test-list-$(BOARD_bds)+=
|
|
test-list-$(BOARD_daisy)+=kb_scan flash stress
|
|
test-list-$(BOARD_mccroskey)+=flash
|
|
test-list-$(BOARD_pit)+=kb_scan flash stress
|
|
test-list-$(BOARD_snow)+=kb_scan flash stress
|
|
test-list-$(BOARD_spring)+=kb_scan flash stress
|
|
|
|
# Disable x86 boards until they compiles
|
|
# TODO(victoryang): Fix them
|
|
test-list-$(BOARD_link)=
|
|
test-list-$(BOARD_slippy)=
|
|
test-list-$(BOARD_falco)=
|
|
test-list-$(BOARD_peppy)=
|
|
test-list-$(BOARD_wolf)=
|
|
test-list-$(BOARD_bolt)=
|
|
|
|
# Emulator tests
|
|
test-list-host=mutex pingpong utils kb_scan kb_mkbp lid_sw power_button hooks
|
|
test-list-host+=thermal flash queue kb_8042 extpwr_gpio console_edit system
|
|
test-list-host+=sbs_charging adapter
|
|
|
|
adapter-y=adapter.o
|
|
console_edit-y=console_edit.o
|
|
extpwr_gpio-y=extpwr_gpio.o
|
|
flash-y=flash.o
|
|
hooks-y=hooks.o
|
|
kb_8042-y=kb_8042.o
|
|
kb_8042-scale=3
|
|
kb_mkbp-y=kb_mkbp.o
|
|
kb_scan-y=kb_scan.o
|
|
lid_sw-y=lid_sw.o
|
|
mutex-y=mutex.o
|
|
pingpong-y=pingpong.o
|
|
power_button-y=power_button.o
|
|
powerdemo-y=powerdemo.o
|
|
queue-y=queue.o
|
|
sbs_charging-y=sbs_charging.o
|
|
stress-y=stress.o
|
|
system-y=system.o
|
|
thermal-y=thermal.o
|
|
thermal-scale=200
|
|
timer_calib-y=timer_calib.o
|
|
timer_dos-y=timer_dos.o
|
|
utils-y=utils.o
|