From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933456AbbFJO6H (ORCPT ); Wed, 10 Jun 2015 10:58:07 -0400 Received: from filter1.ibarracuda.nl ([83.247.7.10]:55935 "EHLO filter1.ibarracuda.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933292AbbFJO57 (ORCPT ); Wed, 10 Jun 2015 10:57:59 -0400 X-ASG-Debug-ID: 1433948276-0759e71f7940c80002-xx1T2L X-Barracuda-Envelope-From: Frans.Klaver@xsens.com X-Barracuda-AUTH-User: xsenscom X-Barracuda-Apparent-Source-IP: 87.249.116.215 Date: Wed, 10 Jun 2015 16:57:42 +0200 From: Frans Klaver To: Sebastian Reichel CC: Dmitry Eremin-Solenikov , David Woodhouse , , Subject: Re: [PATCH v3] sbs-battery: add option to always register battery Message-ID: <20150610145741.GA23387@ci00147.xsens_som155.lan> X-ASG-Orig-Subj: Re: [PATCH v3] sbs-battery: add option to always register battery References: <1433938616-18503-1-git-send-email-frans.klaver@xsens.com> <20150610145205.GE11618@earth> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20150610145205.GE11618@earth> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [172.16.11.49] X-Barracuda-Connect: rev-215.116.249.87.virtu.nl[87.249.116.215] X-Barracuda-Start-Time: 1433948276 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: https://filter1.ibarracuda.nl:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.19729 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 10, 2015 at 04:52:05PM +0200, Sebastian Reichel wrote: > Hi Frans, > > On Wed, Jun 10, 2015 at 02:16:56PM +0200, Frans Klaver wrote: > > Commit a22b41a31e53 ("sbs-battery: Probe should try talking to the > > device") introduced a step in probing the SBS battery, that tries to > > talk to the device before actually registering it, saying: > > > > this driver doesn't actually try talking to the device at probe > > time, so if it's incorrectly configured in the device tree or > > platform data (or if the battery has been removed from the system), > > then probe will succeed and every access will sit there and time > > out. The end result is a possibly laggy system that thinks it has a > > battery but can never read status, which isn't very useful. > > > > Which is of course reasonable. However, it is also very well possible > > for a device to boot up on wall-power and be connected to a battery > > later on. This is a scenario that the driver supported before said patch > > was applied, and even easily achieved by booting up with the battery > > attached and removing it later on. sbs-battery's 'present' sysfs file > > can be used to determine if the device is available or not. > > > > So with automated device detection lacking for now, in some cases it is > > possible that one wants to register a battery, even if none are attached > > at the moment. To facilitate this, add a module parameter that can be > > used to configure forced loading module loading time. If set, the battery > > will always be registered without checking the sanity of the connection. > > Thanks, queued. Thanks. > Please make sure to send patches based upon the correct branches > though. Your branch did not yet contain 297d716. Ouch, sorry about that. Thanks, Frans