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]
Date:   Wed, 20 Jun 2018 09:14:42 +0100
From:   Charles Keepax <ckeepax@...nsource.cirrus.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Mark Brown <broonie@...nel.org>, <hias@...us.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        <patches@...nsource.cirrus.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] regulator: arizona-ldo1: Use correct device to get
 enable GPIO

On Tue, Jun 19, 2018 at 11:46:36PM +0300, Andy Shevchenko wrote:
> On Tue, Jun 19, 2018 at 6:10 PM, Charles Keepax
> <ckeepax@...nsource.cirrus.com> wrote:
> > Currently the enable GPIO is being looked up on the regulator
> > device itself but that does not have its own DT node, this causes
> > the lookup to fail and the regulator not to get its GPIO. The DT
> > node is shared across the whole MFD and as such the lookup needs
> > to happen on that parent device.
> 
> > Moving the lookup to the parent
> > device also means devres can no longer be used as the life time
> > would attach to the wrong device.
> 
> This part I didn't get.
> Why we can't use devm_...(parent_dev, ...) instead?
> 

Because it is possible to unbind the regulator driver itself,
which would leave the GPIO as acquired, since the MFD is never
unbound. Then when you rebind the regulator the GPIO would
already be held by the previous instantiation of the regulator
driver.

Thanks,
Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ