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]
Message-ID: <20181021162210.jq3bzgxnw4xucbvm@earth.universe>
Date:   Sun, 21 Oct 2018 18:22:10 +0200
From:   Sebastian Reichel <sre@...nel.org>
To:     Baolin Wang <baolin.wang@...aro.org>
Cc:     robh+dt@...nel.org, mark.rutland@....com, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        yuanjiang.yu@...soc.com, broonie@...nel.org, ctatlor97@...il.com,
        linus.walleij@...aro.org
Subject: Re: [PATCH v5 2/6] power: supply: core: Add one field to present the
 battery internal resistance

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@...aro.org>
> Reviewed-by: Linus Walleij <linus.walleij@...aro.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
> 

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