Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1469073ima; Sun, 21 Oct 2018 12:28:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV612SEtKO0pUewrAQ7hp6wzY9eUfdoijb9QhNkf5B1xFFpoC523PsnzSFTkJkyBmASJn+HVA X-Received: by 2002:a17:902:8a89:: with SMTP id p9-v6mr42758894plo.183.1540150088156; Sun, 21 Oct 2018 12:28:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540150088; cv=none; d=google.com; s=arc-20160816; b=rQ5NamXkYpXPq2ecaui18B9JRbFupCYnYUJuDN4LGC8ymLYoJSEyGT4G1ouKXBY/Z8 Z0hcug5FM5frmIS4ooq5F1OwwlxnacO1MHOX53oYCvwwqqwsgooFGFPk5G0Iv6hxxB41 saRk7+zaTq+Bh6ZBHPn+kyWro+g0pHCyK35FtKgXzF4NVVjVMs5U0GDLxgHLrEtSf/eH wDH+PmsY4oRxw2mUXjV5BHIH4O5Kx6Nf9IkN5qmRcazxHMuQtZ6Iy1vMdYYu7B0njWvV xEP3cvlLmFz+e1odHBgJYfjwPRuONxZ7QHKnzXlqGeaEnbkfGgPqsFaujJw/m6LnG+vi Carw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N3SX+LMYFV/EPM7C7uAP5Nxow9i4ZMt1WULEIfmQVv8=; b=XKuOq12hu0iyQJhKb0Cco9vmXWQ8NsnnJYlpSXiLzSMFboDOvXWg2K3QnpTDTX3ANn TiYt3SmPRLVyOyy722mvwhJP0ABiHFCGco7IoZ2YpKuiDNnvqDL/iLmD4oql4m+O5yDI ii7KnR4s7amww2kFowF9ItGcW2I9Irg7IJV9W5SwNiZRFeIhPGFl327q8U5nFxruaT10 U9WOfP1KKqpsoBlGrP/jvU+EK1/Wwe25wYeME6sVjybu0pT5zYnW7Qd+v2Fn8o/3ZQVy XuY6Uz2YVSRsj0axWqoP7OF82um9h0Zd+JJF9WDnDVKlliV/qiYLbpF0eizrgWOF837r 8XyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RupHv7gw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4-v6si32444107pfa.274.2018.10.21.12.27.47; Sun, 21 Oct 2018 12:28:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RupHv7gw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728225AbeJVDmb (ORCPT + 99 others); Sun, 21 Oct 2018 23:42:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:33476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728069AbeJVDmb (ORCPT ); Sun, 21 Oct 2018 23:42:31 -0400 Received: from earth.universe (unknown [62.214.5.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D9F092089E; Sun, 21 Oct 2018 19:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540150030; bh=7wsgEIPkHlIv/PgD+L5011mFTOj7cQKQh95mWCO+uqY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RupHv7gwgOD7tw2dOgt7r/EsHXJruAadBu+FKBmsMr6579jXZqcWAD5fnyS/IODAG lDSA1ctJrcivu5snGaWquEenfx+I/KDj7vdkdFInfWKidKi1rnpXBTpfv41HW8yLRs fuIUrnXUoNw7bE5lhztnDfzVpqw3pnwtAy3VROys= Received: by earth.universe (Postfix, from userid 1000) id 828F03C098D; Sun, 21 Oct 2018 18:22:10 +0200 (CEST) Date: Sun, 21 Oct 2018 18:22:10 +0200 From: Sebastian Reichel To: Baolin Wang Cc: robh+dt@kernel.org, mark.rutland@arm.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, yuanjiang.yu@unisoc.com, broonie@kernel.org, ctatlor97@gmail.com, linus.walleij@linaro.org Subject: Re: [PATCH v5 2/6] power: supply: core: Add one field to present the battery internal resistance Message-ID: <20181021162210.jq3bzgxnw4xucbvm@earth.universe> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zadvt6bl3wgb755k" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zadvt6bl3wgb755k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 batte= ry > factory internal resistance. >=20 > Signed-off-by: Baolin Wang > Reviewed-by: Linus Walleij > --- Looks good to me. -- Sebastian > Changes from v4: > - None. >=20 > 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(+) >=20 > diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/sup= ply/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 =3D -EINVAL; > info->constant_charge_current_max_ua =3D -EINVAL; > info->constant_charge_voltage_max_uv =3D -EINVAL; > + info->factory_internal_resistance_uohm =3D -EINVAL; > =20 > 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-ohm= s", > + &info->factory_internal_resistance_uohm); > =20 > 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 */ > }; > =20 > extern struct atomic_notifier_head power_supply_notifier; > --=20 > 1.7.9.5 >=20 --zadvt6bl3wgb755k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlvMp7IACgkQ2O7X88g7 +poqng/9Ft61j2F8QNqbZ3meLD0Sw0omW44rldkmL4u2AnZwLAIBBDV5xu2uENOI tdsqC/AB0+eb0Er6d/MwmPr7jnWFq0UqU/Vr+fL+Ia2F45z5cTWEkrewu+xNJR5l rOtKl57zX4He5A/Ach2ugyJQEACKJ+WIEpxyfEXb4yWLPwIJQIrlZo69G/RB/WmB Wq+kYvGH8uYMiQH7kY0c9yl2xTFM4Ar8aD2kGJR2xQV9P5ft7pX2oQD7OuWTKgA6 i2tTAjrOPUz4eIkV9lLSJrNDtQZwphJLjS/VFOU0ACp+JXq9j1Rzv/VCe2XmPtK2 SyzjxA2FKEel9vGVw4tX4ElXriu8QkpIcn8DLz78lxCzHFiilubhCX96L8WC15A4 jAIUmnflDnnTCpK/sOo8WJRw4fj8fEjWQN/LLQmhJJqSgfmmlAyWvbHWKtIS9ZCL 6wBUALl6Rr9nT3SP70pxOzIH2wX53tPRckYUfGqjg8b8vhsb+JOCxRSx9eQ/JsrE pdWWK4u7oFBgYp6yeC/gp0ONOaLfuvXuNNx1Vk+SfAUuwikyIPLLvDx3PbOFENL+ J2A1d5X0bLjla+dKVNiXg9w1oqY7zpAop/Q6K8wPMnweiCufkRRcINaZ3EWP/TpW 7MOWjFSE6N4VE8GPX5bOjaEnE+MnCv4TIvHRryJ2WvepIMoBbMA= =GikG -----END PGP SIGNATURE----- --zadvt6bl3wgb755k--