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: <20191008161640.2fzqhrbc4ox6gjal@pengutronix.de>
Date:   Tue, 8 Oct 2019 18:16:40 +0200
From:   Marco Felsch <m.felsch@...gutronix.de>
To:     Mark Brown <broonie@...nel.org>
Cc:     Doug Anderson <dianders@...omium.org>,
        Chunyan Zhang <zhang.chunyan@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        ckeepax@...nsource.cirrus.com, LKML <linux-kernel@...r.kernel.org>,
        Sascha Hauer <kernel@...gutronix.de>
Subject: Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count
 usage

On 19-10-08 16:42, Mark Brown wrote:
> On Tue, Oct 08, 2019 at 04:56:05PM +0200, Marco Felsch wrote:
> > On 19-10-08 13:51, Mark Brown wrote:
> 
> > > No, we shouldn't do anything when the regulator probes - we'll only
> > > disable unused regulators when we get to the end of boot (currently we
> > > delay this by 30s to give userspace a chance to run, that's a hack but
> > > we're fresh out of better ideas).  During boot the regulator state will
> > > only be changed if some consumer appears and changes the state.
> 
> > Okay, so this won't disable the regualtor?
> 
> > 8<----------------------------------------------------------------
> > static int reg_fixed_voltage_probe(struct platform_device *pdev)
> > {
> > 	...
> > 
> > 	if (config->enabled_at_boot)
> > 		gflags = GPIOD_OUT_HIGH;
> > 	else
> > 		gflags = GPIOD_OUT_LOW;
> > 
> > 	...
> > }
> > 8<----------------------------------------------------------------
> 
> If this is a GPIO regulator then the Linux APIs mean you can't read the
> status back so it's one of the regulators for which this property was
> invented.  This is a real limitation of the Linux APIs, with most
> hardware you can actually read the status back so we shouldn't need
> this.

I know and I followed the discussion between you and Doug. But it
is a valid use-case to have a external gpio-enabled regualtor connected
to a panel. If I don't mark the regulator as 'regualtor-boot-on' and use
the fixed.c driver (IMHO this is correct), the regulator gets disabled
during probe. So I will have a panel off/ panel on sequence during boot.
To avoid this I set the 'regualtor-boot-on' property but then I can't
disable the panel during suspend..

Can you give me an advice how I can handle that otherwise?

Regards,
  Marco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ