summaryrefslogtreecommitdiff
path: root/include/battery_fuel_gauge.h
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-051-117/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Fuel Gauge: Add interface for optional sleep supportDiana Z2021-07-141-0/+15
| | | | | | | | | | | | | | | Some fuel gauges may support a "sleep" mode which will enable lower power consumption in some states. Set up a structure for this along with an API which boards may use to call it. BRANCH=None BUG=b:186774653 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I155702bfb50a7353c7728445d60ecf853e39e4c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2967037 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* battery_fuel_gauge: Make the default battery type customizableWai-Hong Tam2020-12-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the default battery type is a constant. There is a need that a board can support both 2S and 3S batteries, according to its SKU ID. For example, a SKU which uses 2S battery will use a 2-to-1 switching capacitor to regulate the output voltage. A SKU which uses 3S battery will use a 3-to-1 switching capacitor. If the battery is not attached, the default battery is selected to configure the charger. A wrong battery configuration may be selected. For example, the charger may output a 2S voltage but the switching capacitor uses the 3-to-1 ratio. This change enables the board to customize the default battery type. It helps fixing the above issue. BRANCH=Trogdor BUG=b:175625362 TEST=Build the Lazor image and use it on the board with 3S battery but the battery is not attached. Signed-off-by: Wai-Hong Tam <waihong@google.com> Change-Id: I76bf50c7226c4ec9f633d4b7f6025dc9ab464b49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597801 Reviewed-by: Diana Z <dzigterman@chromium.org>
* battery_fuel_gauge: Add check for CFET statusAseda Aboagye2020-08-261-0/+8
| | | | | | | | | | | | | | | | | | | This commit adds a function that allows the system to check the if the charge FET (CFET) is disabled or not. BUG=b:160918663 BRANCH=None TEST=Build and flash waddledee; cutoff battery, revive system, verify that "found batt in disconnect" statements are still found. TEST=Add other code, verify that CFET status is able to be retrieved. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I899070e50a38499708a367bba6b5f502b0232672 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2368071 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* Battery: add support battery-cutoff SMBus block write functionmatt_wang2019-02-261-0/+23
| | | | | | | | | | | | | | | | | | | Implements battery-cutoff SMBus write block function BUG=b:122944526 BRANCH=None TEST=Verify battery cuff on fleex via SMBus block write. Change-Id: Ib52146cd3042c4a6d2dbafadd430591936230891 Signed-off-by: matt_wang <matt_wang@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/1470462 Commit-Ready: Justin TerAvest <teravest@chromium.org> Tested-by: Justin TerAvest <teravest@chromium.org> Tested-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com>
* battery: Optionally prevent boot at low SOC with cell imbalance.Jonathan Brandmeyer2018-08-081-0/+19
| | | | | | | | | | | | | | | | | | | | Measure the cell imbalance with method dispatch to a per-battery method, such that families with a plurality of configurable batteries can support them all. By default, cell imbalance is taken to be 'zero' in case we don't support that battery's management IC. Provide a driver for reading cell voltages for the TI BQ4050 family. This IC is quite popular, but by no means universal. BUG=b:111214767 BRANCH=none TEST=Boot on Careena with a custom debug print statement, showing that we can measure the typical battery voltages during and after the boot at the battery status polling interval. Change-Id: I235389b252ac9c373aa9706dbd1066f7c0bbce71 Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1162663 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* battery: Move fuel gauge code to commonEdward Hill2018-06-011-0/+45
Move fuel gauge code to common to avoid duplication in octopus and grunt baseboards. BUG=b:79704826,b:74018100 BRANCH=none TEST=make -j buildall Change-Id: I58a615c9ed7906cb19b49c2baa36aaa619838cf1 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1072637 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org>