From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756733AbdJRMvM (ORCPT ); Wed, 18 Oct 2017 08:51:12 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]:12231 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754576AbdJRMvI (ORCPT ); Wed, 18 Oct 2017 08:51:08 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw87WiudN2EDyY X-RZG-CLASS-ID: mo00 Subject: Re: libbattery was Re: [RFC PATCH 5/5] power: generic-adc-battery: Add capacity handling Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1CB45714-597B-4906-9C37-C989356D3E1C"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Pgp-Agent: GPGMail From: "H. Nikolaus Schaller" In-Reply-To: <20171018122804.GA14376@amd> Date: Wed, 18 Oct 2017 14:48:04 +0200 Cc: Sebastian Reichel , pali.rohar@gmail.com, sre@kernel.org, kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, patrikbachan@gmail.com, serge@hallyn.com, abcloriens@gmail.com, clayton@craftyguy.net, martijn@brixit.nl, sakari.ailus@linux.intel.com, Marek Belisko , robh+dt@kernel.org, linux-pm@vger.kernel.org, Marek Belisko Message-Id: <61BFA8AF-657A-4AD7-A7AC-3E5DC3B7E83D@goldelico.com> References: <1501620926-22669-1-git-send-email-marek.belisko@open-nandra.com> <1501620926-22669-6-git-send-email-marek.belisko@open-nandra.com> <20170829101147.debhadzyfrxhkrvt@earth> <20170908113231.GJ18365@amd> <20171018122804.GA14376@amd> To: Pavel Machek X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_1CB45714-597B-4906-9C37-C989356D3E1C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > Am 18.10.2017 um 14:28 schrieb Pavel Machek : >=20 > Hi! >=20 >>> Without patch description: See Last Question in >>>=20 >>> Documentation/power/power_supply_class.txt >>=20 >> ...should be done in libbattery, yet to be written. :-). >>=20 >> Do you have specific guidance what you'd like to see in libbattery? IMHO there was no answer from maintainers. Or I have not received it. >=20 > So I started something, it is at. >=20 > https://github.com/pavelmachek/libbattery >=20 > My battery on n900 is currently uncalibrated (and charging), still it > gets some kind of estimation: >=20 > Battery -1 % > Seconds -1 > State 1 > Voltage 3.88 V > Battery 63 % >=20 > Of course, there's a lot more work to be done. Nice start but not a solution to our problem. Our problem is that people simply expect that for example = https://packages.debian.org/wheezy/xfce/xfce4-battery-plugin displays the battery percentage. With using generic-adc-battery driver and Marek's patch in kernel, this = can easily be provided. With exactly 0 bits of change in user space. Please note that you can't = always tell users "upgrade to the latest user space". So I have three questions: a) why do you use float/double instead of fixed point for such simple = and imprecise calculations? b) what does it provide as additional information over some lines of = code in generic-adc-battery driver? c) how do yo make sure that this libbattery is included in all the = battery monitors that are already in use and is backported for example to the old plugin I mentioned above? BR and thanks, Nikolaus --Apple-Mail=_1CB45714-597B-4906-9C37-C989356D3E1C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJZ502FAAoJEIl79TGLgAm6jnUQAKOKbQeeuqZTcg+uq9LZhivH hp1HIn6ZSk/2e7BGErKXqxceEx8bzbnVS4U+DQxIjINqiVKAFiRRWlAFmndnYWlJ qcCeGE71GgzObJTJq047UGbB1Kbf5K1QgfevpIJV2ht9fjHMhVDZsjBqWjcCkJP5 klRKsfLI3sXcRXhsLvDl7skI0GsThRazCfh0wBj6jvRqK2SIFdqyKt3HAgzxpwAz 1BlQElo80dFheiNZi4d8Eik9uj7XEdPJfg69tbT461QJglMMcemqpT8xcKoLUdnP 013mejIHhuOh+wJuXCC/uKxgTMZRg3KqS36tHDWJJANEb6kVMoGcODyLkdUj3c8s re2deK+RjU3bZLB9IbLtU+2hgTBWzWB9g253ATo+kwdCc0xfUE1VKHKm7YRM5lJG fFu9ez5etp7kNapnEDjCeN6d7VLka/S/2GuwB5iQdjIswOr9U2jramhQqrPNaerz VFLZMVrdt6ydTnKwICqHh22ebV8xYso0zeqSkgqbxeQeyFTaf24RzNOjHXoLH7Tl fWmMmnWOAM6/yogL7TmbDK57b1UvFZXbmoKWYbDoG1NDveAn0TrRA+ZXgMddp6/q A63xD3XHzu2vYsJn8Ienq/oqIEKWYWdWWco+4UimzTxZZAMLJJs9CJdtFj4wg0aq k0RgShwMfQhF3VH4A/oH =RqPb -----END PGP SIGNATURE----- --Apple-Mail=_1CB45714-597B-4906-9C37-C989356D3E1C-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Nikolaus Schaller" Subject: Re: libbattery was Re: [RFC PATCH 5/5] power: generic-adc-battery: Add capacity handling Date: Wed, 18 Oct 2017 14:48:04 +0200 Message-ID: <61BFA8AF-657A-4AD7-A7AC-3E5DC3B7E83D@goldelico.com> References: <1501620926-22669-1-git-send-email-marek.belisko@open-nandra.com> <1501620926-22669-6-git-send-email-marek.belisko@open-nandra.com> <20170829101147.debhadzyfrxhkrvt@earth> <20170908113231.GJ18365@amd> <20171018122804.GA14376@amd> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/mixed; boundary="===============7034608160724446857==" Return-path: In-Reply-To: <20171018122804.GA14376@amd> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Pavel Machek Cc: ivo.g.dimitrov.75@gmail.com, Marek Belisko , khilman@kernel.org, tony@atomide.com, Marek Belisko , linux-pm@vger.kernel.org, aaro.koskinen@iki.fi, kernel list , sre@kernel.org, martijn@brixit.nl, robh+dt@kernel.org, abcloriens@gmail.com, sakari.ailus@linux.intel.com, pali.rohar@gmail.com, Sebastian Reichel , clayton@craftyguy.net, linux-omap@vger.kernel.org, patrikbachan@gmail.com, linux-arm-kernel , serge@hallyn.com List-Id: linux-pm@vger.kernel.org --===============7034608160724446857== Content-Type: multipart/signed; boundary="Apple-Mail=_1CB45714-597B-4906-9C37-C989356D3E1C"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Apple-Mail=_1CB45714-597B-4906-9C37-C989356D3E1C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > Am 18.10.2017 um 14:28 schrieb Pavel Machek : >=20 > Hi! >=20 >>> Without patch description: See Last Question in >>>=20 >>> Documentation/power/power_supply_class.txt >>=20 >> ...should be done in libbattery, yet to be written. :-). >>=20 >> Do you have specific guidance what you'd like to see in libbattery? IMHO there was no answer from maintainers. Or I have not received it. >=20 > So I started something, it is at. >=20 > https://github.com/pavelmachek/libbattery >=20 > My battery on n900 is currently uncalibrated (and charging), still it > gets some kind of estimation: >=20 > Battery -1 % > Seconds -1 > State 1 > Voltage 3.88 V > Battery 63 % >=20 > Of course, there's a lot more work to be done. Nice start but not a solution to our problem. Our problem is that people simply expect that for example = https://packages.debian.org/wheezy/xfce/xfce4-battery-plugin displays the battery percentage. With using generic-adc-battery driver and Marek's patch in kernel, this = can easily be provided. With exactly 0 bits of change in user space. Please note that you can't = always tell users "upgrade to the latest user space". So I have three questions: a) why do you use float/double instead of fixed point for such simple = and imprecise calculations? b) what does it provide as additional information over some lines of = code in generic-adc-battery driver? c) how do yo make sure that this libbattery is included in all the = battery monitors that are already in use and is backported for example to the old plugin I mentioned above? BR and thanks, Nikolaus --Apple-Mail=_1CB45714-597B-4906-9C37-C989356D3E1C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJZ502FAAoJEIl79TGLgAm6jnUQAKOKbQeeuqZTcg+uq9LZhivH hp1HIn6ZSk/2e7BGErKXqxceEx8bzbnVS4U+DQxIjINqiVKAFiRRWlAFmndnYWlJ qcCeGE71GgzObJTJq047UGbB1Kbf5K1QgfevpIJV2ht9fjHMhVDZsjBqWjcCkJP5 klRKsfLI3sXcRXhsLvDl7skI0GsThRazCfh0wBj6jvRqK2SIFdqyKt3HAgzxpwAz 1BlQElo80dFheiNZi4d8Eik9uj7XEdPJfg69tbT461QJglMMcemqpT8xcKoLUdnP 013mejIHhuOh+wJuXCC/uKxgTMZRg3KqS36tHDWJJANEb6kVMoGcODyLkdUj3c8s re2deK+RjU3bZLB9IbLtU+2hgTBWzWB9g253ATo+kwdCc0xfUE1VKHKm7YRM5lJG fFu9ez5etp7kNapnEDjCeN6d7VLka/S/2GuwB5iQdjIswOr9U2jramhQqrPNaerz VFLZMVrdt6ydTnKwICqHh22ebV8xYso0zeqSkgqbxeQeyFTaf24RzNOjHXoLH7Tl fWmMmnWOAM6/yogL7TmbDK57b1UvFZXbmoKWYbDoG1NDveAn0TrRA+ZXgMddp6/q A63xD3XHzu2vYsJn8Ienq/oqIEKWYWdWWco+4UimzTxZZAMLJJs9CJdtFj4wg0aq k0RgShwMfQhF3VH4A/oH =RqPb -----END PGP SIGNATURE----- --Apple-Mail=_1CB45714-597B-4906-9C37-C989356D3E1C-- --===============7034608160724446857== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7034608160724446857==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: hns@goldelico.com (H. Nikolaus Schaller) Date: Wed, 18 Oct 2017 14:48:04 +0200 Subject: libbattery was Re: [RFC PATCH 5/5] power: generic-adc-battery: Add capacity handling In-Reply-To: <20171018122804.GA14376@amd> References: <1501620926-22669-1-git-send-email-marek.belisko@open-nandra.com> <1501620926-22669-6-git-send-email-marek.belisko@open-nandra.com> <20170829101147.debhadzyfrxhkrvt@earth> <20170908113231.GJ18365@amd> <20171018122804.GA14376@amd> Message-ID: <61BFA8AF-657A-4AD7-A7AC-3E5DC3B7E83D@goldelico.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org > Am 18.10.2017 um 14:28 schrieb Pavel Machek : > > Hi! > >>> Without patch description: See Last Question in >>> >>> Documentation/power/power_supply_class.txt >> >> ...should be done in libbattery, yet to be written. :-). >> >> Do you have specific guidance what you'd like to see in libbattery? IMHO there was no answer from maintainers. Or I have not received it. > > So I started something, it is at. > > https://github.com/pavelmachek/libbattery > > My battery on n900 is currently uncalibrated (and charging), still it > gets some kind of estimation: > > Battery -1 % > Seconds -1 > State 1 > Voltage 3.88 V > Battery 63 % > > Of course, there's a lot more work to be done. Nice start but not a solution to our problem. Our problem is that people simply expect that for example https://packages.debian.org/wheezy/xfce/xfce4-battery-plugin displays the battery percentage. With using generic-adc-battery driver and Marek's patch in kernel, this can easily be provided. With exactly 0 bits of change in user space. Please note that you can't always tell users "upgrade to the latest user space". So I have three questions: a) why do you use float/double instead of fixed point for such simple and imprecise calculations? b) what does it provide as additional information over some lines of code in generic-adc-battery driver? c) how do yo make sure that this libbattery is included in all the battery monitors that are already in use and is backported for example to the old plugin I mentioned above? BR and thanks, Nikolaus -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: Message signed with OpenPGP using GPGMail URL: