Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752889AbcKBIWL (ORCPT ); Wed, 2 Nov 2016 04:22:11 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:40453 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbcKBIWI (ORCPT ); Wed, 2 Nov 2016 04:22:08 -0400 Date: Wed, 2 Nov 2016 09:22:06 +0100 From: Pavel Machek To: Matt Ranostay Cc: Matt Ranostay , pali.rohar@gmail.com, Sebastian Reichel , kernel list , linux-arm-kernel , Linux OMAP List , Tony Lindgren , khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, Patrik Bachan , serge@hallyn.com, =?utf-8?B?TWlja3Vsw6HFoQ==?= Qwertz Subject: Re: [PATCH v2 2/2] power: bq27xxx_battery: add poll interval property query Message-ID: <20161102082206.GE21488@amd> References: <1475092512-30555-1-git-send-email-matt@ranostay.consulting> <1475092512-30555-3-git-send-email-matt@ranostay.consulting> <20161024201443.GB5989@amd> <20161031213846.GA21014@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gMR3gsNFwZpnI/Ts" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1982 Lines: 65 --gMR3gsNFwZpnI/Ts Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >> >> Better then previous one. > >> >> > >> >> But my version of bq27xxx_battery.c already contains this: > >> > > >> > This is for allowing udev rule to set the properties as well. > >> > otherwise a kinda crude RUN =3D " echo value > > >> > /sys/module/bq27xxx_battery/parameters/poll_interval" is required. > >> > >> Any thoughts on this? > > > > I'd say echo value > > > /sys/module/bq27xxx_battery/parameters/poll_interval .. is quite > > adequate solution...? > > > > Alternatively, convince us that something else is useful for everyone, > > and we can do the right thing (poll more often when battery is nearly > > empty), automatically... >=20 > Ok should have had the patchset set it per device, and not use the > global poll_interval. Of need to add some logic to see if uses the > global poll_interval or it's own setting. >=20 > There are times where you could have multiple batteries connected to > multiple fuel gauges, and want to up the polling interval on certain > ones that are discharging at different rates. >=20 > But of course I'll let you guys let me know if this seems useful at all. I agree per-device polling would be cleaner. But unless you have hardware with more than one bq27xxx, I'd avoid the work... Now... its also possible that poll_interval should change itself (within kernel) to do the right thing. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --gMR3gsNFwZpnI/Ts Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlgZoi0ACgkQMOfwapXb+vLSKQCgsxrli5H77QV7lr9M3wlYm5Va aQkAoLgZXf5Oe0K8ozBRq9uj5ab8vJDI =kryH -----END PGP SIGNATURE----- --gMR3gsNFwZpnI/Ts--