All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Li Yang-R58472 <r58472@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Zhao Chenhui-B35336 <B35336@freescale.com>
Subject: Re: [PATCH v5 4/5] fsl_pmc: Add API to enable device as wakeup event source
Date: Tue, 5 Jun 2012 11:11:36 -0500	[thread overview]
Message-ID: <4FCE2FB8.9080307@freescale.com> (raw)
In-Reply-To: <94F013E7935FF44C83EBE7784D62AD3F09335D27@039-SN2MPN1-022.039d.mgd.msft.net>

On 06/04/2012 11:08 PM, Li Yang-R58472 wrote:
> 
> 
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Tuesday, June 05, 2012 7:03 AM
>> To: Zhao Chenhui-B35336
>> Cc: linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org;
>> galak@kernel.crashing.org; Li Yang-R58472
>> Subject: Re: [PATCH v5 4/5] fsl_pmc: Add API to enable device as wakeup
>> event source
>>
>> On 06/04/2012 06:36 AM, Zhao Chenhui wrote:
>>> On Fri, Jun 01, 2012 at 05:08:52PM -0500, Scott Wood wrote:
>>>> On 05/11/2012 06:53 AM, Zhao Chenhui wrote:
>>>>> +int mpc85xx_pmc_set_wake(struct platform_device *pdev, bool enable)
>>>>
>>>> Why does it have to be a platform_device?  Would a bare device_node
>> work
>>>> here?  If it's for stuff like device_may_wakeup() that could be in a
>>>> platform_device wrapper function.
>>>
>>> It does not have to be a platform_device. I think it can be a struct
>> device.
>>
>> Why does it even need that?  The low level mechanism for influencing
>> PMCDR should only need a device node, not a Linux device struct.
> 
> It does no harm to pass the device structure and makes more sense for object oriented interface design. 

It does do harm if you don't have a device structure to pass, if for
some reason you found the device by directly looking for it rather than
going through the device model.

>>>> Who is setting can_wakeup for these devices?
>>>
>>> The device driver is responsible to set can_wakeup.
>>
>> How would the device driver know how to set it?  Wouldn't this depend on
>> the particular SoC and low power mode?
> 
> It is based on the "fsl,magic-packet" and "fsl,wake-on-filer" device tree properties.

fsl,magic-packet was a mistake.  It is equivalent to checking the
compatible for etsec.  It does not convey any information about whether
the eTSEC is still active in a given low power mode.

How is fsl,wake-os-filer relevant to this decision?  When will it be set
but not fsl,magic-packet?

What about devices other than ethernet?  What about differences between
ordinary sleep and deep sleep?

-Scott

WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Li Yang-R58472 <r58472@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	Zhao Chenhui-B35336 <B35336@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"galak@kernel.crashing.org" <galak@kernel.crashing.org>
Subject: Re: [PATCH v5 4/5] fsl_pmc: Add API to enable device as wakeup event source
Date: Tue, 5 Jun 2012 11:11:36 -0500	[thread overview]
Message-ID: <4FCE2FB8.9080307@freescale.com> (raw)
In-Reply-To: <94F013E7935FF44C83EBE7784D62AD3F09335D27@039-SN2MPN1-022.039d.mgd.msft.net>

On 06/04/2012 11:08 PM, Li Yang-R58472 wrote:
> 
> 
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Tuesday, June 05, 2012 7:03 AM
>> To: Zhao Chenhui-B35336
>> Cc: linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org;
>> galak@kernel.crashing.org; Li Yang-R58472
>> Subject: Re: [PATCH v5 4/5] fsl_pmc: Add API to enable device as wakeup
>> event source
>>
>> On 06/04/2012 06:36 AM, Zhao Chenhui wrote:
>>> On Fri, Jun 01, 2012 at 05:08:52PM -0500, Scott Wood wrote:
>>>> On 05/11/2012 06:53 AM, Zhao Chenhui wrote:
>>>>> +int mpc85xx_pmc_set_wake(struct platform_device *pdev, bool enable)
>>>>
>>>> Why does it have to be a platform_device?  Would a bare device_node
>> work
>>>> here?  If it's for stuff like device_may_wakeup() that could be in a
>>>> platform_device wrapper function.
>>>
>>> It does not have to be a platform_device. I think it can be a struct
>> device.
>>
>> Why does it even need that?  The low level mechanism for influencing
>> PMCDR should only need a device node, not a Linux device struct.
> 
> It does no harm to pass the device structure and makes more sense for object oriented interface design. 

It does do harm if you don't have a device structure to pass, if for
some reason you found the device by directly looking for it rather than
going through the device model.

>>>> Who is setting can_wakeup for these devices?
>>>
>>> The device driver is responsible to set can_wakeup.
>>
>> How would the device driver know how to set it?  Wouldn't this depend on
>> the particular SoC and low power mode?
> 
> It is based on the "fsl,magic-packet" and "fsl,wake-on-filer" device tree properties.

fsl,magic-packet was a mistake.  It is equivalent to checking the
compatible for etsec.  It does not convey any information about whether
the eTSEC is still active in a given low power mode.

How is fsl,wake-os-filer relevant to this decision?  When will it be set
but not fsl,magic-packet?

What about devices other than ethernet?  What about differences between
ordinary sleep and deep sleep?

-Scott


  reply	other threads:[~2012-06-05 16:11 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 11:53 [PATCH v5 1/5] powerpc/85xx: implement hardware timebase sync Zhao Chenhui
2012-05-11 11:53 ` Zhao Chenhui
2012-05-11 11:53 ` [PATCH v5 2/5] powerpc/85xx: add HOTPLUG_CPU support Zhao Chenhui
2012-05-11 11:53   ` Zhao Chenhui
2012-06-01 21:27   ` Scott Wood
2012-06-01 21:27     ` Scott Wood
2012-06-04 11:04     ` Zhao Chenhui
2012-06-04 11:04       ` Zhao Chenhui
2012-06-04 16:32       ` Scott Wood
2012-06-04 16:32         ` Scott Wood
2012-06-05 11:18         ` Zhao Chenhui
2012-06-05 11:18           ` Zhao Chenhui
2012-06-05 16:15           ` Scott Wood
2012-06-05 16:15             ` Scott Wood
2012-06-06  9:59             ` Zhao Chenhui
2012-06-06  9:59               ` Zhao Chenhui
2012-06-06 18:19               ` Scott Wood
2012-06-06 18:19                 ` Scott Wood
2012-05-11 11:53 ` [PATCH v5 3/5] powerpc/85xx: add sleep and deep sleep support Zhao Chenhui
2012-05-11 11:53   ` Zhao Chenhui
2012-06-01 21:54   ` Scott Wood
2012-06-01 21:54     ` Scott Wood
2012-06-04 11:12     ` Zhao Chenhui
2012-06-04 11:12       ` Zhao Chenhui
2012-06-04 22:58       ` Scott Wood
2012-06-04 22:58         ` Scott Wood
2012-06-05 11:35         ` Zhao Chenhui
2012-06-05 11:35           ` Zhao Chenhui
2012-06-05 16:13           ` Scott Wood
2012-06-05 16:13             ` Scott Wood
2012-05-11 11:53 ` [PATCH v5 4/5] fsl_pmc: Add API to enable device as wakeup event source Zhao Chenhui
2012-05-11 11:53   ` Zhao Chenhui
2012-06-01 22:08   ` Scott Wood
2012-06-01 22:08     ` Scott Wood
2012-06-04 11:36     ` Zhao Chenhui
2012-06-04 11:36       ` Zhao Chenhui
2012-06-04 23:02       ` Scott Wood
2012-06-04 23:02         ` Scott Wood
2012-06-05  4:08         ` Li Yang-R58472
2012-06-05  4:08           ` Li Yang-R58472
2012-06-05 16:11           ` Scott Wood [this message]
2012-06-05 16:11             ` Scott Wood
2012-06-05 16:49             ` Li Yang-R58472
2012-06-05 16:49               ` Li Yang-R58472
2012-06-05 18:05               ` Scott Wood
2012-06-05 18:05                 ` Scott Wood
2012-06-06  4:06                 ` Li Yang
2012-06-06  4:06                   ` Li Yang
2012-06-06 18:29                   ` Scott Wood
2012-06-06 18:29                     ` Scott Wood
2012-06-07  4:10                     ` Li Yang
2012-06-07  4:10                       ` Li Yang
2012-05-11 11:53 ` [PATCH v5 5/5] powerpc/85xx: add support to JOG feature using cpufreq interface Zhao Chenhui
2012-05-11 11:53   ` Zhao Chenhui
2012-06-01 23:30   ` Scott Wood
2012-06-01 23:30     ` Scott Wood
2012-06-05 10:59     ` Zhao Chenhui
2012-06-05 10:59       ` Zhao Chenhui
2012-06-05 15:58       ` Scott Wood
2012-06-05 15:58         ` Scott Wood
2012-06-06 10:19         ` Zhao Chenhui
2012-06-06 10:19           ` Zhao Chenhui
2012-05-29  7:30 ` [PATCH v5 1/5] powerpc/85xx: implement hardware timebase sync Li Yang
2012-05-29  7:30   ` Li Yang
2012-05-29 12:20 ` [linuxppc-release] " Zhao Chenhui-B35336
2012-06-01 15:40 ` Scott Wood
2012-06-01 15:40   ` Scott Wood
2012-06-05  9:08   ` Zhao Chenhui
2012-06-05  9:08     ` Zhao Chenhui
2012-06-05 16:07     ` Scott Wood
2012-06-05 16:07       ` Scott Wood
2012-06-06  9:31       ` Zhao Chenhui
2012-06-06  9:31         ` Zhao Chenhui
2012-06-06 18:26         ` Scott Wood
2012-06-06 18:26           ` Scott Wood
2012-06-07  4:07           ` Zhao Chenhui
2012-06-07  4:07             ` Zhao Chenhui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FCE2FB8.9080307@freescale.com \
    --to=scottwood@freescale.com \
    --cc=B07421@freescale.com \
    --cc=B35336@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=r58472@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.