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: <ecbc3c0d-4ce7-758d-7f7d-4b3f3003c1ac@linaro.org>
Date:   Mon, 19 Sep 2016 13:09:10 +0530
From:   Vaibhav Hiremath <vaibhav.hiremath@...aro.org>
To:     Ulf Hansson <ulf.hansson@...aro.org>,
        Peter Chen <hzpeterchen@...il.com>
Cc:     Rob Herring <robh+dt@...nel.org>, Peter Chen <peter.chen@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Mark Brown <broonie@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
        dwmw3@...radead.org, Mark Rutland <mark.rutland@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Krzysztof Kozłowski <k.kozlowski@...sung.com>,
        Linux USB List <linux-usb@...r.kernel.org>,
        oscar@...andei.net,
        Paweł Moll <pawel.moll@....com>,
        Arnd Bergmann <arnd@...db.de>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        Fabio Estevam <festevam@...il.com>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Stephen Boyd <stephen.boyd@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        troy.kisky@...ndarydevices.com, stillcompiling@...il.com,
        Philipp Zabel <p.zabel@...gutronix.de>,
        "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>,
        mka@...omium.org,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v6 0/8] power: add power sequence library



On Friday 09 September 2016 02:17 PM, Ulf Hansson wrote:
> [...]
>
>>>>> We had an agreement that keep mmc's pwrseq framework unchanging.
>>>>> Unless Ulf and rob both agree to change.
>>>> Why 2 separate approach for same problem ?
>>>> And I see this as possible duplication of code/functionality :)
>>> How the new kernel compatibles old dts? If we do not need to
>>> consider this problem, the mmc can try to use power sequence library
>>> too in future.
>>
>> I think we should attempt to get both MMC and USB power seq
>> come on one agreement, so that it can be reused.
> That would be nice. Although, to do that you would have to allow some
> DT bindings to be deprecated in the new generic power seq bindings, as
> otherwise you would break existing DTBs.
>
> I guess that is what Rob was objecting to!?

yeah, thats right.

So lets adopt similar implementation for USB as well instead of
library, but keeping MMC untouched as of now.

What I am trying to propose here is,

Lets have power-sequence framework (similar to V1 of this series),
with,

pwrseq: Core framework for power sequence.
pwrseq_generic/simple: for all generic control, like reset and clock
pwrseq_emmc: probably duplication of existing code - the idea
                           here is, all future code should be using this new
                           binding, so that we can deprecate the 
drivers/mmc/core/pwrseq
pwrseq_arche: The usecase which I am dealing with today, which is more
                          complex in nature.

Then the respective drivers can add their drivers (if needed) based on
complexity.

comments ??

>> MMC Power Seq :
>>   It is based on platform_device/platform_driver approach,
> We recently converted MMC to this. It's has a clear benefit as you can
> rely on the behaviour from the driver core and PM core. So, it simply
> avoids duplication of code.

Agreed.

>> USB Power seq :
>>   We are trying to propose library approach, with compatible string match.
>>
>> We should try to have one approach.
>>>
>>>>>>    - Lets also add suspend/resume callback to struct pwrseq
>>>>>>
>>>>> Why suspend/resume can't do at related driver's suspend/resume API?
>>>> Nope...
>>>> The pwrseq library would have taken ownership of resources, so
>>>> related driver cannot suspend the device. Again it is architecture
>>>> specific, but we should have provision to handle this.
>>>>
>>>> The system I am dealing with today, does need suspend/resume
>>>> callback. To be precise, suspend is close to off state for some devices
>>>> or
>>>> they could enter standby or different low power state, but to do that,
>>>> we need same resource as used for ON/OFF functionality.
>>>>
>>> Ok, I will have API for suspend/resume. You can implement it at your own
>>> library or generic one.
> As stated, using a platform device + driver would simplify this, as
> you wouldn't need an API but only a driver. I guess.

Exactly.

Thanks,
Vaibhav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ