linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Dan Murphy <dmurphy@ti.com>
Cc: afd@ti.com, pali@kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org
Subject: Re: [PATCH v3 2/4] power: supply: bq27xxx_battery: Add the BQ27561 Battery monitor
Date: Tue, 28 Jul 2020 00:36:46 +0200	[thread overview]
Message-ID: <20200727223646.vjnkyrmipwin3pj6@earth.universe> (raw)
In-Reply-To: <20200721163206.25438-2-dmurphy@ti.com>

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]

Hi,

On Tue, Jul 21, 2020 at 11:32:04AM -0500, Dan Murphy wrote:
> Add the Texas Instruments BQ27561 battery monitor.  The register address
> map is laid out the same as compared to other devices within the file.
> The battery status register has differing bits to determine if the
> battery is full, discharging or dead.
> 
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> ---

Looks mostly good to me, but

[...]

> @@ -1710,6 +1769,13 @@ static int bq27xxx_battery_capacity_level(struct bq27xxx_device_info *di,
>  			level = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL;
>  		else
>  			level = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL;
> +	} else if (di->opts & BQ27561_O_BITS) {
> +		if (di->cache.flags & BQ27561_FLAG_FC)
> +			level = POWER_SUPPLY_CAPACITY_LEVEL_FULL;
> +		else if (di->cache.flags & BQ27561_FLAG_DIS_CH)
> +			level = POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL;

Shouldn't this be checking for FLAG_FDC instead of FLAG_DIS_CH?

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-07-27 22:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 16:32 [PATCH v3 1/4] dt-bindings: power: Add BQ27561 compatible Dan Murphy
2020-07-21 16:32 ` [PATCH v3 2/4] power: supply: bq27xxx_battery: Add the BQ27561 Battery monitor Dan Murphy
2020-07-27 22:36   ` Sebastian Reichel [this message]
2020-07-28 14:04     ` Dan Murphy
2020-07-21 16:32 ` [PATCH v3 3/4] dt-bindings: power: Add BQ28z610 compatible Dan Murphy
2020-07-21 16:32 ` [PATCH v3 4/4] power: supply: bq27xxx_battery: Add the BQ28z610 Battery monitor Dan Murphy

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=20200727223646.vjnkyrmipwin3pj6@earth.universe \
    --to=sre@kernel.org \
    --cc=afd@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=robh@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).