lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140924185933.GA2221@gmail.com>
Date:	Wed, 24 Sep 2014 20:59:34 +0200
From:	Frans Klaver <fransklaver@...il.com>
To:	Mark Rutland <mark.rutland@....com>
Cc:	olof@...om.net, anton.vorontsov@...aro.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <Pawel.Moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Randy Dunlap <rdunlap@...radead.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [RFC PATCH 1/2] sbs-battery: add forced instantiation from
 device tree

On Wed, Sep 24, 2014 at 04:34:32PM +0100, Mark Rutland wrote:
> On Wed, Sep 24, 2014 at 04:14:48PM +0100, Frans Klaver wrote:
> > On Wed, Sep 24, 2014 at 03:38:49PM +0100, Mark Rutland wrote:
> > > On Wed, Sep 24, 2014 at 03:22:22PM +0100, Frans Klaver wrote:
> > > You mention that there's a GPIO that can be used to detect the battery
> > > presence. Why can't the driver always probe and then on check for the
> > > presence of the battery dynamically using that GPIO? That should cover
> > > both cases.
> > 
> > I would say that this was the case before [1] was done. The GPIO is
> > optional and if not configured, the presence or absence of the battery
> > is detected by checking a status register much like probe() currently
> > does. It seems all cases were covered before that patch. If you worry
> > about speed, you should use the GPIO. I wonder if we might be able to
> > revert [1] without doing much harm.
> 
> But reverting that would re-introduce the lag on some systems, no? Given
> the wording of the original commit I would guess that the GPIO wasn't
> available. Perhaps Olof or Anton can enlighten us?

It probably would yes. The battery_detect gpio was last touched in 2011, the
probe check was added somewhere in 2012.

We could keep it as a compile option.

> In the cases where a GPIO is available, I think we should be able to be
> less pessimistic. Is a GPIO available in your case?

We don't have the battery_detect pin available. Incidentally, a bit of
lag reading out the battery is not a problem for us.

> Mark.
> 
> > 
> > Thanks,
> > Frans
> > 
> > [1] a22b41a31e53 "sbs-battery: Probe should try talking to the device"
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ