From: Sebastian Reichel <sre@kernel.org>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: robh+dt@kernel.org, mark.rutland@arm.com,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, yuanjiang.yu@unisoc.com,
broonie@kernel.org, ctatlor97@gmail.com,
linus.walleij@linaro.org
Subject: Re: [PATCH v5 2/6] power: supply: core: Add one field to present the battery internal resistance
Date: Sun, 21 Oct 2018 18:22:10 +0200 [thread overview]
Message-ID: <20181021162210.jq3bzgxnw4xucbvm@earth.universe> (raw)
In-Reply-To: <b70d55f008cfbbb79abf27018261d8a6f16e9673.1539915051.git.baolin.wang@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 2279 bytes --]
Hi,
On Fri, Oct 19, 2018 at 06:53:11PM +0800, Baolin Wang wrote:
> Add one field for 'struct power_supply_battery_info' to present the battery
> factory internal resistance.
>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> ---
Looks good to me.
-- Sebastian
> Changes from v4:
> - None.
>
> Changes from v3:
> - New patch in v3, which splits code into one separate patch.
> - Add Linusw reviewed tag.
> ---
> drivers/power/supply/power_supply_core.c | 3 +++
> include/linux/power_supply.h | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
> index e853618..307e0995 100644
> --- a/drivers/power/supply/power_supply_core.c
> +++ b/drivers/power/supply/power_supply_core.c
> @@ -579,6 +579,7 @@ int power_supply_get_battery_info(struct power_supply *psy,
> info->charge_term_current_ua = -EINVAL;
> info->constant_charge_current_max_ua = -EINVAL;
> info->constant_charge_voltage_max_uv = -EINVAL;
> + info->factory_internal_resistance_uohm = -EINVAL;
>
> if (!psy->of_node) {
> dev_warn(&psy->dev, "%s currently only supports devicetree\n",
> @@ -616,6 +617,8 @@ int power_supply_get_battery_info(struct power_supply *psy,
> &info->constant_charge_current_max_ua);
> of_property_read_u32(battery_np, "constant_charge_voltage_max_microvolt",
> &info->constant_charge_voltage_max_uv);
> + of_property_read_u32(battery_np, "factory-internal-resistance-micro-ohms",
> + &info->factory_internal_resistance_uohm);
>
> return 0;
> }
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index f807691..d089566 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -326,6 +326,7 @@ struct power_supply_battery_info {
> int charge_term_current_ua; /* microAmps */
> int constant_charge_current_max_ua; /* microAmps */
> int constant_charge_voltage_max_uv; /* microVolts */
> + int factory_internal_resistance_uohm; /* microOhms */
> };
>
> extern struct atomic_notifier_head power_supply_notifier;
> --
> 1.7.9.5
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-10-21 19:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 10:53 [PATCH v5 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance Baolin Wang
2018-10-19 10:53 ` [PATCH v5 2/6] power: supply: core: Add one field " Baolin Wang
2018-10-21 16:22 ` Sebastian Reichel [this message]
2018-10-19 10:53 ` [PATCH v5 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table Baolin Wang
2018-10-21 16:24 ` Sebastian Reichel
2018-10-19 10:53 ` [PATCH v5 4/6] power: supply: core: Add some helpers to use " Baolin Wang
2018-10-21 16:26 ` Sebastian Reichel
2018-10-19 10:53 ` [PATCH v5 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation Baolin Wang
2018-10-21 16:27 ` Sebastian Reichel
2018-10-19 10:53 ` [PATCH v5 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver Baolin Wang
2018-10-21 16:52 ` Sebastian Reichel
2018-10-22 5:54 ` Baolin Wang
2018-10-22 10:43 ` Sebastian Reichel
2018-10-22 10:49 ` Baolin Wang
2018-10-21 16:21 ` [PATCH v5 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance Sebastian Reichel
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=20181021162210.jq3bzgxnw4xucbvm@earth.universe \
--to=sre@kernel.org \
--cc=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=ctatlor97@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=yuanjiang.yu@unisoc.com \
/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).