From: sre@kernel.org (Sebastian Reichel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/7] power: act8945a_charger: Remove "battery_temperature"
Date: Wed, 17 Aug 2016 13:31:41 +0200 [thread overview]
Message-ID: <20160817113141.cshwjvpuwcj2hk5k@earth> (raw)
In-Reply-To: <1471337998-6467-2-git-send-email-wenyou.yang@atmel.com>
Hi,
On Tue, Aug 16, 2016 at 04:59:52PM +0800, Wenyou Yang wrote:
> [...]
>
> -static int act8945a_get_battery_health(struct act8945a_charger *charger,
> - struct regmap *regmap, int *val)
> +static int act8945a_get_battery_health(struct regmap *regmap, int *val)
> {
> int ret;
> unsigned int status;
> @@ -148,7 +146,7 @@ static int act8945a_get_battery_health(struct act8945a_charger *charger,
> if (ret < 0)
> return ret;
>
> - if (charger->battery_temperature && !(status & APCH_STATUS_TEMPDAT))
> + if (status & APCH_STATUS_TEMPDAT)
This incorrectly inverts the logic.
> *val = POWER_SUPPLY_HEALTH_OVERHEAT;
> else if (!(status & APCH_STATUS_INDAT))
> *val = POWER_SUPPLY_HEALTH_OVERVOLTAGE;
> @@ -188,8 +186,7 @@ static int act8945a_charger_get_property(struct power_supply *psy,
> val->intval = POWER_SUPPLY_TECHNOLOGY_LION;
> break;
> case POWER_SUPPLY_PROP_HEALTH:
> - ret = act8945a_get_battery_health(charger,
> - regmap, &val->intval);
> + ret = act8945a_get_battery_health(regmap, &val->intval);
> break;
> case POWER_SUPPLY_PROP_MODEL_NAME:
> val->strval = act8945a_charger_model;
> @@ -235,9 +232,6 @@ static int act8945a_charger_config(struct device *dev,
> return -EINVAL;
> }
>
> - charger->battery_temperature = of_property_read_bool(np,
> - "active-semi,check-battery-temperature");
> -
> chglev_pin = of_get_named_gpio_flags(np,
> "active-semi,chglev-gpios", 0, &flags);
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160817/948749d5/attachment.sig>
next prev parent reply other threads:[~2016-08-17 11:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 8:59 [PATCH v5 0/7] power: act8945a_charger: Improvements Wenyou Yang
2016-08-16 8:59 ` [PATCH v5 1/7] power: act8945a_charger: Remove "battery_temperature" Wenyou Yang
2016-08-17 11:31 ` Sebastian Reichel [this message]
2016-08-16 8:59 ` [PATCH v5 2/7] power: act8945a_charger: Improve Wenyou Yang
2016-08-16 8:59 ` [PATCH v5 3/7] power: act8945a_charger: Add status change update support Wenyou Yang
2016-08-17 11:41 ` Sebastian Reichel
2016-08-16 8:59 ` [PATCH v5 4/7] power: act8945a_charger: Fix the power supply type Wenyou Yang
2016-08-16 8:59 ` [PATCH v5 5/7] power: act8945a_charger: Add capacity level property Wenyou Yang
2016-08-17 11:47 ` Sebastian Reichel
2016-08-16 8:59 ` [PATCH v5 6/7] power: act8945a_charger: Add max current property Wenyou Yang
2016-08-17 11:51 ` Sebastian Reichel
2016-08-16 8:59 ` [PATCH v5 7/7] doc: bindings: act8945a-charger: Update properties Wenyou Yang
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=20160817113141.cshwjvpuwcj2hk5k@earth \
--to=sre@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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).