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:	Mon, 18 Jun 2012 15:04:44 +0530
From:	"ABRAHAM, KISHON VIJAY" <kishon@...com>
To:	Kevin Hilman <khilman@...com>
Cc:	Arnd Bergmann <arnd@...db.de>,
	"Cousson, Benoit" <b-cousson@...com>,
	Paul Walmsley <paul@...an.com>, tony@...mide.com,
	linux@....linux.org.uk, gregkh@...uxfoundation.org,
	linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, balbi@...com
Subject: Re: [RFC PATCH 0/5] omap: add ocp2scp as a misc driver

Hi Kevin,

On Tue, Jun 12, 2012 at 10:37 PM, Kevin Hilman <khilman@...com> wrote:
> "ABRAHAM, KISHON VIJAY" <kishon@...com> writes:
>
>> Hi Kevin, Benoit, Paul,
>>
>> On Fri, Jun 1, 2012 at 2:16 AM, Arnd Bergmann <arnd@...db.de> wrote:
>>> On Thursday 31 May 2012, ABRAHAM, KISHON VIJAY wrote:
>>>> > I would mark the multiplexed device compatible with "simple-bus", which
>>>> > results in the child devices automatically getting added.
>>>>
>>>> hmm.. ocp2scp has a sysconfig register and it also has a module mode
>>>> by which it can be enabled/disabled. I was making use of pm_runtime
>>>> API's to control these registers (Apart from creating child devices,
>>>> the driver also has a call to pm_runtime_enable).
>>>
>>> I see.
>>>
>>>> I'm not sure if with
>>>> "simple-bus" we'll be able to do those. I have to check on that.
>>>
>>> How about making it compatible with both "simple-bus" and something
>>> that handles the pm_runtime requirements?
>>>
>>> I don't understand enough of what needs to be done for pm_runtime
>>> across a lot of devices, but I'd hope that it should be possible
>>> to do that in a generic way based on the device definition.
>>
>> Is there already exists a generic way for handling pm_runtime
>> requirements (as simple as doing a pm_runtime_enable on a device).
>
> As you've discovered, the runtime PM core handles the parent/child
> relationships already.
>
>> So the actual problem is we have ocp2scp as parent and usb2phy and
>> usb3phy as the child device. ocp2scp has the sysconfig register and it
>> can be controlled using module mode bit (both of this can be
>> controlled by pm_runtime). Whenever usb controller(dwc3/musb) wants to
>> enable a phy, it calls an exported API in usb2/usb3 phy to enable it.
>> These API's have pm_runtime_get_sync on usb2/usb3 device which in-turn
>> calls pm_runtime_get_sync of ocp2scp because of parent->child
>> relationship (For this both usb2/usb3 phy and ocp2scp devices should
>> have called pm_runtime_enable). All I'm trying is to find a place to
>> have pm_runtime_enable for ocp2scp.
>
> Maybe I'm not following, but why can't it be in the driver?

Arnd feels it is pointless to have a driver that only does creation of
child (and pm_runtime_enable of the device). He feels it would be
better to have a generic way to do a runtime_enable of a device with
dt. (Just like how there is a generic way to create child devices by
giving .compatible as "simple-bus").

Thanks
Kishon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ