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  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, 25 Jan 2017 08:56:42 -0800
From:   Furquan Shaikh <furquan@...omium.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Mark Brown <broonie@...nel.org>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Liam Girdwood <lgirdwood@...il.com>,
        Tony Lindgren <tony@...mide.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Len Brown <lenb@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Hanjun Guo <hanjun.guo@...aro.org>,
        Will Deacon <will.deacon@....com>,
        Rob Herring <robh@...nel.org>,
        Sathyanarayana Nujella <sathyanarayana.nujella@...el.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Adam Thomson <Adam.Thomson.Opensource@...semi.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Alexandre Courbot <gnurou@...il.com>,
        linux-gpio@...r.kernel.org,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
        Mark Rutland <mark.rutland@....com>,
        Aaron Durbin <adurbin@...omium.org>, dlaurie@...omium.org
Subject: Re: [PATCH 0/7] Implement generic regulator constraints parsing for
 ACPI and OF

On Wed, Jan 25, 2017 at 4:55 AM, Rafael J. Wysocki <rafael@...nel.org> wrote:
>
> On Wed, Jan 25, 2017 at 1:49 PM, Mark Brown <broonie@...nel.org> wrote:
> > On Tue, Jan 24, 2017 at 04:06:34PM -0800, Furquan Shaikh wrote:
> >
> >> Since regulator properties remain the same across OF and ACPI
> >> regulators, this series of patches provides common routine for
> >> obtaining regulation constraints from device tree and ACPI nodes. In
> >
> > As Lorenzo explained this is really not a good idea, ACPI has a power
> > management model which is just being ignored here.  If you're producing
> > systems using ACPI you really need to use ACPI in a joined up fashion
> > rather than just blindly importing all DT bindings into ACPI.  While
> > there are many areas where ACPI just doesn't do anything and as a result
> > it does make sense to reuse existing DT bindings there are also plenty
> > of areas where work has been done on the ACPI side.  Regulators and
> > power management are definitely one of those areas.
>
> This is exactly right. :-)
>
> Thanks,
> Rafael

I understand that ACPI provides its own bindings to allow firmware to
control power management and thus regulators have been a part of the
firmware control. However, there are use cases where the kernel driver
wishes to control the regulator to manage power to the device
irrespective of the way regulator is passed in (ACPI/OF).

That is the reason why the recent change to add ACPI support to fixed
regulators was done
(https://github.com/torvalds/linux/blob/master/drivers/regulator/fixed.c#L100).
It needs regulators for USB driver. Similarly, other drivers like ELAN
touchscreen that plan to control power to the device in a generic way
irrespective of OF/ACPI need to control regulators in kernel itself.
The above change for adding ACPI support to fixed regulators is
currently parsing only limited parameters and also does not work the
same way for ACPI and OF, though it ends to introduce the regulators
in a way similar to OF.

We need to support existing drivers and use cases for power management
in both OF and ACPI environments (keeping in mind that suspend to idle
bypasses parts of firmware) without needing to change all the drivers.
How can we achieve this?

Powered by blists - more mailing lists