diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-30 17:07:50 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-07 04:13:16 +0000 |
commit | 6f626a65226c68ec8ffd3de0445af614adc82afb (patch) | |
tree | 0feaa5f2d322f2578f05b7a770970f9921dd5d14 /driver | |
parent | f171bb5d3b0749d63e5fa49d0e16faa518fb0347 (diff) | |
download | chrome-ec-6f626a65226c68ec8ffd3de0445af614adc82afb.tar.gz |
Create a public header for isl9241
Add a separate public header for this chip so we can include it from
Zephyr. Update the charger file to use that header, so it builds on
Zephyr.
BUG=b:175434113
BRANCH=none
TEST=make BOARD=volteer -j30
With a zephyr-chrome CL, build volteer on zephyr
Change-Id: I562177e2259931730b7dae4d8e43edd5ea96deb7
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611893
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/charger/isl9241.h | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/driver/charger/isl9241.h b/driver/charger/isl9241.h index 0717a6237d..7beaf8ac33 100644 --- a/driver/charger/isl9241.h +++ b/driver/charger/isl9241.h @@ -8,7 +8,7 @@ #ifndef __CROS_EC_ISL9241_H #define __CROS_EC_ISL9241_H -#define ISL9241_ADDR_FLAGS 0x09 +#include "driver/charger/isl9241_public.h" #define CHARGER_NAME "ISL9241" #define CHARGE_V_MAX 18304 @@ -128,29 +128,4 @@ #define ISL9241_VIN_ADC_BIT_OFFSET 6 #define ISL9241_VIN_ADC_STEP_MV 96 -extern const struct charger_drv isl9241_drv; - -/** - * Set AC prochot threshold - * - * @param chgnum: Index into charger chips - * @param ma: AC prochot threshold current in mA, multiple of 128mA - * @return EC_SUCCESS or error - */ -int isl9241_set_ac_prochot(int chgnum, int ma); - -/** - * Set DC prochot threshold - * - * @param chgnum: Index into charger chips - * @param ma: DC prochot threshold current in mA, multiple of 256mA - * @return EC_SUCCESS or error - */ -int isl9241_set_dc_prochot(int chgnum, int ma); - -#define ISL9241_AC_PROCHOT_CURRENT_MIN 128 /* mA */ -#define ISL9241_AC_PROCHOT_CURRENT_MAX 6400 /* mA */ -#define ISL9241_DC_PROCHOT_CURRENT_MIN 256 /* mA */ -#define ISL9241_DC_PROCHOT_CURRENT_MAX 12800 /* mA */ - #endif /* __CROS_EC_ISL9241_H */ |