summaryrefslogtreecommitdiff
path: root/board/host/charger.c
Commit message (Collapse)AuthorAgeFilesLines
* Increase test coverage of charge_state_v2.cBill Richardson2014-04-111-5/+21
| | | | | | | | | | | | | | | This improves some of the smart battery mocks, and adds some more tests for the new change state machine. BUG=chrome-os-partner:20881 BRANCH=ToT TEST=make coverage Line coverage of this file jumps from 53% to 93%. Change-Id: I4a9b8818cefaffd3022cebe08a36d592b0611295 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/193690
* Add charger_get_params() function to query charger state.Bill Richardson2014-03-281-1/+1
| | | | | | | | | | | | | | | | | | | This returns all the parameters of the charger that must be monitored frequently. While some of the fields are charger-specific, all of the parameters are present in all supported chargers. Nothing uses this yet. BUG=chrome-os-partner:20881 BRANCH=ToT TEST=make buildall -j All targets build; all tests pass. Change-Id: Id3e00532469b193aeab3acf93e94afe3ffb8c6b6 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/191985 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* cleanup: Remove checkpatch warningsRandall Spangler2013-12-191-3/+3
| | | | | | | | | | | | | | | | This make minor syntactic changes and renames some camel-cased symbols to keep checkpatch from complaining. The goal is to reduce the temptation to use 'repo upload --no-verify'. This is a big furball of find/replace, but no functional changes. BUG=chromium:322144 BRANCH=none TEST=build all boards; pass unit tests Change-Id: I0269b7dd95836ef9a6e33f88c003ab0f24f842a0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/180495
* cleanup: Battery header files and filenamesRandall Spangler2013-10-071-4/+3
| | | | | | | | | | | | | | | | | | | | battery.h is the high-level interface. battery_smart.h is the low-level interface. Most things don't need the low-level interface, but were including smart_battery.h solely to get at battery.h. Fixed this. Also merged battery_pack.h into battery.h, since it was odd to split that data across multiple header files. Tidied the function comments in battery.h as well. No functional changes, just renaming files and adding comments. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all boards; pass unit tests Change-Id: I5ef372f0a5f8f5f36e09a3a1ce24008685c1fd0d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/171967 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* cleanup: move test mocks to board/host and remove unused mocksRandall Spangler2013-09-191-0/+137
Now that we have a better test framework in place, mock implementations go in either chip/host/ or board/host/, depending on whether they're mocking chip or common/board functionality. Move the remaining mocks there. Also, several mocks were neither compiled nor used, and haven't kept pace with other refactoring; delete those. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all board; pass all unit tests Change-Id: Ie2a81c3ccd4506679192d979aa87fe7ed6c1c5a0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/169873