From: Dan Murphy <dmurphy@ti.com>
To: Sebastian Reichel <sre@kernel.org>
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 09:04:08 -0500 [thread overview]
Message-ID: <bc31b9d8-d114-e776-84fd-e05a014b74eb@ti.com> (raw)
In-Reply-To: <20200727223646.vjnkyrmipwin3pj6@earth.universe>
Sebastian
On 7/27/20 5:36 PM, Sebastian Reichel wrote:
> 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?
Yes.
Dan
> -- Sebastian
next prev parent reply other threads:[~2020-07-28 14:04 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
2020-07-28 14:04 ` Dan Murphy [this message]
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=bc31b9d8-d114-e776-84fd-e05a014b74eb@ti.com \
--to=dmurphy@ti.com \
--cc=afd@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pali@kernel.org \
--cc=robh@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