lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Jul 2020 00:36:46 +0200
From:   Sebastian Reichel <sre@...nel.org>
To:     Dan Murphy <dmurphy@...com>
Cc:     afd@...com, pali@...nel.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        robh@...nel.org
Subject: Re: [PATCH v3 2/4] power: supply: bq27xxx_battery: Add the BQ27561
 Battery monitor

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@...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

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ