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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iR7p-ftUzvVwW96Y55A=vYG8_UbhjuA4vw0BFFZ8a9iw@mail.gmail.com>
Date:   Wed, 1 Feb 2017 00:10:17 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Peter Chen <peter.chen@....com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Mark Brown <broonie@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
        Heiko Stuebner <heiko@...ech.de>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>, p.zabel@...gutronix.de,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Pawel Moll <pawel.moll@....com>,
        Mark Rutland <mark.rutland@....com>,
        "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" 
        <linux-usb@...r.kernel.org>, Arnd Bergmann <arnd@...db.de>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        mail@...iej.szmigiero.name, troy.kisky@...ndarydevices.com,
        Fabio Estevam <festevam@...il.com>, oscar@...andei.net,
        Stephen Boyd <stephen.boyd@...aro.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Joshua Clayton <stillcompiling@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        mka@...omium.org, Vaibhav Hiremath <vaibhav.hiremath@...aro.org>,
        Gary Bisson <gary.bisson@...ndarydevices.com>,
        hverkuil@...all.nl, Krzysztof Kozlowski <krzk@...nel.org>
Subject: Re: [PATCH 2/8] power: add power sequence library

On Tue, Jan 3, 2017 at 7:33 AM, Peter Chen <peter.chen@....com> wrote:
> We have an well-known problem that the device needs to do some power
> sequence before it can be recognized by related host, the typical
> example like hard-wired mmc devices and usb devices.
>
> This power sequence is hard to be described at device tree and handled by
> related host driver, so we have created a common power sequence
> library to cover this requirement. The core code has supplied
> some common helpers for host driver, and individual power sequence
> libraries handle kinds of power sequence for devices. The pwrseq
> librares always need to allocate extra instance for compatible
> string match.
>
> pwrseq_generic is intended for general purpose of power sequence, which
> handles gpios and clocks currently, and can cover other controls in
> future. The host driver just needs to call of_pwrseq_on/of_pwrseq_off
> if only one power sequence is needed, else call of_pwrseq_on_list
> /of_pwrseq_off_list instead (eg, USB hub driver).
>
> For new power sequence library, it can add its compatible string
> to pwrseq_of_match_table, then the pwrseq core will match it with
> DT's, and choose this library at runtime.
>
> Signed-off-by: Peter Chen <peter.chen@....com>
> Tested-by: Maciej S. Szmigiero <mail@...iej.szmigiero.name>
> Tested-by Joshua Clayton <stillcompiling@...il.com>
> Reviewed-by: Matthias Kaehlcke <mka@...omium.org>
> Tested-by: Matthias Kaehlcke <mka@...omium.org>

Quite honestly, I have a really hard time with trying to follow this
code and the total lack of documentation makes it even harder.  In
particular, the generic power sequence code is not even commented at
all, so it really is hard to say how this is going to work, let alone
deciding whether or not to apply it.

Plus, of course, the USB core changes must be acked by the maintainer
thereof for me to be able to handle the series.

But at this point I basically need you to explain the design to me, please.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ