From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CE7AC2BA16 for ; Sun, 5 Apr 2020 03:35:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0DC23206D4 for ; Sun, 5 Apr 2020 03:35:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NiCZn1UM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DC23206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IRsRopCAf219Exgi0FdFU5EBwzZfJKMk21MmN2nDwXQ=; b=NiCZn1UMhtFGB9s44NAB87qoE AKv+t6hMpLrgpjlarxcxKbT2lIghmPXbPmPmZFnbzykNuv3wNp+z4QNpqhqWMbbz3R+RW2Y8f4NkR 5KjOM2WiYhWCIOhcXZAoZ5zeW81QJzajGtHrIvE5Xk0fgZTq8mnQPyrbSODuMz9YLmHH6tK2pyo50 x5hz3ywE/m1o1/dYIPof4cnqISosxpDo3O7qsmVTeb76CJ74ycQy6XKxEcuhuUI1LBDVc7LPQdPWA 6AyrAwcA5bmE+IklqgXvrPQUg80htDqr3fZCHX8pTZZSgnugCOVgB1wl4Tr10/aa+QPjhSZaHV+sr ohYn1/++Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jKw47-0008OB-Vw; Sun, 05 Apr 2020 03:35:19 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jKw3s-0005nG-E8; Sun, 05 Apr 2020 03:35:06 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id D38D6296779 Received: by earth.universe (Postfix, from userid 1000) id 3DCBD3C082A; Sun, 5 Apr 2020 05:35:00 +0200 (CEST) Date: Sun, 5 Apr 2020 05:35:00 +0200 From: Sebastian Reichel To: Matti Vaittinen Subject: Re: [PATCH v8 08/10] power: supply: add battery parameters Message-ID: <20200405033500.yvelxz6cqnjwnxu7@earth.universe> References: <48f250bf6928929f60764c4334c60611b46233c4.1585902279.git.matti.vaittinen@fi.rohmeurope.com> MIME-Version: 1.0 In-Reply-To: <48f250bf6928929f60764c4334c60611b46233c4.1585902279.git.matti.vaittinen@fi.rohmeurope.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200404_203504_744383_CD86F148 X-CRM114-Status: GOOD ( 15.17 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Andrei Stefanescu , Heiko Stuebner , "Rafael J. Wysocki" , Tony Lindgren , Linus Walleij , Brendan Higgins , Bjorn Andersson , Andreas Kemnade , "Angelo G. Del Regno" , Hsin-Hsiung Wang , linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, Axel Lin , Gregory CLEMENT , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Markus Reichl , Bartosz Golaszewski , Chen-Yu Tsai , Andy Gross , markus.laine@fi.rohmeurope.com, Adam Thomson , devicetree@vger.kernel.org, Charles Keepax , mazziesaccount@gmail.com, linux-arm-msm@vger.kernel.org, Richard Fitzgerald , Mark Brown , linux-mediatek@lists.infradead.org, Matthias Brugger , Thomas Gleixner , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Support Opensource , Baolin Wang , Sangbeom Kim , Greg Kroah-Hartman , linux-pm@vger.kernel.org, Randy Dunlap , Liam Girdwood , linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com, Vinod Koul , Rob Herring , patches@opensource.cirrus.com Content-Type: multipart/mixed; boundary="===============4359644377773328030==" Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org --===============4359644377773328030== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="x27j2hhu3anypmeo" Content-Disposition: inline --x27j2hhu3anypmeo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Apr 03, 2020 at 11:47:43AM +0300, Matti Vaittinen wrote: > Add parsing of new device-tree battery bindings. >=20 > - trickle-charge-current-microamp > - precharge-upper-limit-microvolt > - re-charge-voltage-microvolt > - over-voltage-threshold-microvolt >=20 > Signed-off-by: Matti Vaittinen Reviewed-by: Sebastian Reichel -- Sebastian > --- > No changes since v7 >=20 > drivers/power/supply/power_supply_core.c | 8 ++++++++ > include/linux/power_supply.h | 4 ++++ > 2 files changed, 12 insertions(+) >=20 > diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/sup= ply/power_supply_core.c > index 1a9a9fae73d3..02b37fe6061c 100644 > --- a/drivers/power/supply/power_supply_core.c > +++ b/drivers/power/supply/power_supply_core.c > @@ -620,10 +620,18 @@ int power_supply_get_battery_info(struct power_supp= ly *psy, > &info->voltage_min_design_uv); > of_property_read_u32(battery_np, "voltage-max-design-microvolt", > &info->voltage_max_design_uv); > + of_property_read_u32(battery_np, "trickle-charge-current-microamp", > + &info->tricklecharge_current_ua); > of_property_read_u32(battery_np, "precharge-current-microamp", > &info->precharge_current_ua); > + of_property_read_u32(battery_np, "precharge-upper-limit-microvolt", > + &info->precharge_voltage_max_uv); > of_property_read_u32(battery_np, "charge-term-current-microamp", > &info->charge_term_current_ua); > + of_property_read_u32(battery_np, "re-charge-voltage-microvolt", > + &info->charge_restart_voltage_uv); > + of_property_read_u32(battery_np, "over-voltage-threshold-microvolt", > + &info->overvoltage_limit_uv); > of_property_read_u32(battery_np, "constant-charge-current-max-microamp", > &info->constant_charge_current_max_ua); > of_property_read_u32(battery_np, "constant-charge-voltage-max-microvolt= ", > diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h > index dcd5a71e6c67..d01322d1ab52 100644 > --- a/include/linux/power_supply.h > +++ b/include/linux/power_supply.h > @@ -346,8 +346,12 @@ struct power_supply_battery_info { > int charge_full_design_uah; /* microAmp-hours */ > int voltage_min_design_uv; /* microVolts */ > int voltage_max_design_uv; /* microVolts */ > + int tricklecharge_current_ua; /* microAmps */ > int precharge_current_ua; /* microAmps */ > + int precharge_voltage_max_uv; /* microVolts */ > int charge_term_current_ua; /* microAmps */ > + int charge_restart_voltage_uv; /* microVolts */ > + int overvoltage_limit_uv; /* microVolts */ > int constant_charge_current_max_ua; /* microAmps */ > int constant_charge_voltage_max_uv; /* microVolts */ > int factory_internal_resistance_uohm; /* microOhms */ > --=20 > 2.21.0 >=20 >=20 > --=20 > Matti Vaittinen, Linux device drivers > ROHM Semiconductors, Finland SWDC > Kiviharjunlenkki 1E > 90220 OULU > FINLAND >=20 > ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ > Simon says - in Latin please. > ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ > Thanks to Simon Glass for the translation =3D]=20 --x27j2hhu3anypmeo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl6JUeQACgkQ2O7X88g7 +pozLQ/9FcNPH4dWOcFLkQR+sY4xM+aSzKZaUtHTt+Uu8MaY/yN2uh3/wz0TDb3g JNu5xacZovuVUN790BK7+kRdKTr3NDIH3Y9RB/mnek6/ai2AZlwECSRXkQIoXNg3 AVckq/d/uYl/mqnwikoMYKFJ3E9M5m9jkL9B/7YCg2FYuqcr6iKno8aZ8vtAxfkI aDeDn/HqaRVnDnUFZQzRmOERaiQq9yuskySsnp6oeExjSXXPTuDVH2O/I7QalFEK FPr7FadlP8V2av66/crvsNG8VwBsEAJz3euTU3HUwkwcg0vT9Nu3bezt8shi3vZf NFcMS6OjvQXxObZbdwzJsQZMQDcfP4hmUHLXzIbRoMeVHgpQ7zWUlGXkV/O0vp5y KbO3Bfdc9XT5wHzLu0zwtSWryrmHBdbEoHhTAAigZXgx7n392IORu8XUf9XpSASG 3f5V7GHNv6mYPcG5m0aBkmFpsx2RAvSJsCRDdo+j+eNrrpuug/0hrt3tcpRk0Oyr HTim68SO2EebYK3m4xwP0SFrC4dYyNB1zO+WCo8uqNS0cvqnhRbBXP2nqyhiOaZe MPZCW+w4am/QAxGJteoqDbQLNBz4Bcf3BjRhlFlrwLKO8xTRKoZhb001q1kygUbw E+eTMtdjIgZ4/porBHZSmixs5v8qC4HKd3UR3U2JHaiZE5X0Xow= =WPUf -----END PGP SIGNATURE----- --x27j2hhu3anypmeo-- --===============4359644377773328030== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek --===============4359644377773328030==--