From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: Sebastian Reichel <sre@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: [PATCH 12/14] power: supply: bq25890: show VSYS as output voltage
Date: Thu, 02 Apr 2020 16:58:35 +0200 [thread overview]
Message-ID: <fdd9ec41a66113264c3b233658a72e00159f65d5.1585838679.git.mirq-linux@rere.qmqm.pl> (raw)
In-Reply-To: <cover.1585838678.git.mirq-linux@rere.qmqm.pl>
VSYS is the voltage that is provided to the rest of the system. Show
measurement OUTPUT_VOLTAGE and supplement it with VSYSMIN setting.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/power/supply/bq25890_charger.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c
index d23274d13263..6c277f2dbae2 100644
--- a/drivers/power/supply/bq25890_charger.c
+++ b/drivers/power/supply/bq25890_charger.c
@@ -524,7 +524,7 @@ static int bq25890_power_supply_get_property(struct power_supply *psy,
val->intval = 2600000 + ret * 100000;
break;
- case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+ case POWER_SUPPLY_PROP_OUTPUT_VOLTAGE_NOW:
ret = bq25890_field_read(bq, F_SYSV); /* read measured value */
if (ret < 0)
return ret;
@@ -533,6 +533,10 @@ static int bq25890_power_supply_get_property(struct power_supply *psy,
val->intval = 2304000 + ret * 20000;
break;
+ case POWER_SUPPLY_PROP_OUTPUT_VOLTAGE_MIN:
+ val->intval = bq25890_find_val(bq->init_data.sysvmin, TBL_SYSVMIN);
+ break;
+
case POWER_SUPPLY_PROP_CURRENT_NOW:
ret = bq25890_field_read(bq, F_ICHGR); /* read measured value */
if (ret < 0)
@@ -724,7 +728,8 @@ static const enum power_supply_property bq25890_power_supply_props[] = {
POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT,
POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,
POWER_SUPPLY_PROP_INPUT_VOLTAGE_NOW,
- POWER_SUPPLY_PROP_VOLTAGE_NOW,
+ POWER_SUPPLY_PROP_OUTPUT_VOLTAGE_NOW,
+ POWER_SUPPLY_PROP_OUTPUT_VOLTAGE_MIN,
POWER_SUPPLY_PROP_CURRENT_NOW,
};
--
2.20.1
next prev parent reply other threads:[~2020-04-02 14:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 14:58 [PATCH 00/14] power: supply: bq25890: fix and extend Michał Mirosław
2020-04-02 14:58 ` [PATCH 02/14] power: supply: bq25890: simplify chip name property getter Michał Mirosław
2020-04-02 14:58 ` [PATCH 01/14] power: supply: bq25890: remove redundant I2C bus check Michał Mirosław
2020-04-02 14:58 ` [PATCH 03/14] power: supply: bq25890: make property table const Michał Mirosław
2020-04-03 19:52 ` kbuild test robot
2020-04-04 3:41 ` kbuild test robot
2020-04-02 14:58 ` [PATCH 04/14] power: supply: bq25890: protect view of the chip's state Michał Mirosław
2020-04-02 14:58 ` [PATCH 05/14] power: supply: bq25890: fix ADC mode configuration Michał Mirosław
2020-04-03 20:29 ` kbuild test robot
2020-04-03 22:14 ` kbuild test robot
2020-04-04 5:14 ` kbuild test robot
2020-04-02 14:58 ` [PATCH 06/14] power: supply: bq25890: update state on property read Michał Mirosław
2020-04-02 14:58 ` [PATCH 07/14] power: supply: bq25890: implement CHARGE_TYPE property Michał Mirosław
2020-04-02 14:58 ` [PATCH 09/14] power: supply: bq25890: implement INPUT_CURRENT_LIMIT property Michał Mirosław
2020-04-02 14:58 ` [PATCH 08/14] power: supply: bq25890: implement PRECHARGE_CURRENT property Michał Mirosław
2020-04-02 14:58 ` [PATCH 11/14] power: supply: bq25890: show measured VBUS Michał Mirosław
2020-04-03 21:06 ` kbuild test robot
2020-04-03 23:04 ` kbuild test robot
2020-04-02 14:58 ` [PATCH 10/14] power: supply: bq25890: use proper CURRENT_NOW property for I_BAT Michał Mirosław
2020-04-02 14:58 ` Michał Mirosław [this message]
2020-04-03 21:41 ` [PATCH 12/14] power: supply: bq25890: show VSYS as output voltage kbuild test robot
2020-04-02 14:58 ` [PATCH 13/14] power: supply: bq25890: show VBAT as VOLTAGE_NOW Michał Mirosław
2020-04-02 14:58 ` [PATCH 14/14] power: supply: bq25890: support IBAT compensation Michał Mirosław
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fdd9ec41a66113264c3b233658a72e00159f65d5.1585838679.git.mirq-linux@rere.qmqm.pl \
--to=mirq-linux@rere.qmqm.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).