diff options
author | Michał Mirosław | 2020-05-04 21:47:46 +0200 |
---|---|---|
committer | Sebastian Reichel | 2020-05-10 23:43:50 +0200 |
commit | c942656ddb3a0c248e0c53a2ebd4a36adaa46cbc (patch) | |
tree | d0fff31ae9461aede24e4dcae4fc806b17a13eff /drivers/power | |
parent | b302a0ae7205a3ccda238cb057224b5115a6115c (diff) |
power: bq25890: implement PRECHARGE_CURRENT property
Report configured precharge current.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/bq25890_charger.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c index 6d8e0e2bfd8a..0c9c02088b52 100644 --- a/drivers/power/supply/bq25890_charger.c +++ b/drivers/power/supply/bq25890_charger.c @@ -486,6 +486,10 @@ static int bq25890_power_supply_get_property(struct power_supply *psy, val->intval = bq25890_find_val(bq->init_data.vreg, TBL_VREG); break; + case POWER_SUPPLY_PROP_PRECHARGE_CURRENT: + val->intval = bq25890_find_val(bq->init_data.iprechg, TBL_ITERM); + break; + case POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT: val->intval = bq25890_find_val(bq->init_data.iterm, TBL_ITERM); break; @@ -686,6 +690,7 @@ static const enum power_supply_property bq25890_power_supply_props[] = { POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX, POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE, POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX, + POWER_SUPPLY_PROP_PRECHARGE_CURRENT, POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT, POWER_SUPPLY_PROP_VOLTAGE_NOW, POWER_SUPPLY_PROP_CURRENT_NOW, |