* Question regarding linux acpi
@ 2010-08-04 15:51 Raj Kumar
2010-08-04 17:02 ` Matthew Garrett
0 siblings, 1 reply; 6+ messages in thread
From: Raj Kumar @ 2010-08-04 15:51 UTC (permalink / raw)
To: linux-acpi
Hi,
I am working on device drivers development. Like normal suspend/resumes, drivers has to implement that.
The question is what drivers have to implement for getting notifications from ACPI driver for low power modes?
Regards
Raj
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Question regarding linux acpi
2010-08-04 15:51 Question regarding linux acpi Raj Kumar
@ 2010-08-04 17:02 ` Matthew Garrett
[not found] ` <BLU102-W81BE50E68610AAA92C33AEBAF0@phx.gbl>
[not found] ` <BLU102-W14E1E8D6FA2F2A23C56E84EBAF0@phx.gbl>
0 siblings, 2 replies; 6+ messages in thread
From: Matthew Garrett @ 2010-08-04 17:02 UTC (permalink / raw)
To: Raj Kumar; +Cc: linux-acpi
On Wed, Aug 04, 2010 at 09:21:02PM +0530, Raj Kumar wrote:
>
>
> Hi,
>
> I am working on device drivers development. Like normal suspend/resumes, drivers has to implement that.
> The question is what drivers have to implement for getting notifications from ACPI driver for low power modes?
Nothing. The only interaction between most device drivers and ACPI will
be handled by the bus-level code.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Question regarding linux acpi
[not found] ` <BLU102-W81BE50E68610AAA92C33AEBAF0@phx.gbl>
@ 2010-08-04 20:22 ` Matthew Garrett
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Garrett @ 2010-08-04 20:22 UTC (permalink / raw)
To: Raj Kumar; +Cc: linux-acpi
On Thu, Aug 05, 2010 at 01:44:21AM +0530, Raj Kumar wrote:
> Does it mean that only bus driver code will handle all low power mode
> requests?
The bus code is responsible for calling the device-specific methods, but
the device-specific drivers will typically know nothing about ACPI.
They'll only know that the bus code asked them to enter a low-power mode
or that they got a wakeup event.
> peripherals are idle but not all peripherals belonging to bus then in that
> case
>
> does the bus handle the low power modes of peripherals?
Yes. All determination is done per-device. Check
Documentation/power/runtime_pm.txt.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Question regarding linux acpi
[not found] ` <BLU102-W14E1E8D6FA2F2A23C56E84EBAF0@phx.gbl>
@ 2010-08-04 23:34 ` Matthew Garrett
2010-08-05 10:51 ` Raj Kumar
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2010-08-04 23:34 UTC (permalink / raw)
To: Raj Kumar; +Cc: linux-acpi
On Thu, Aug 05, 2010 at 04:13:42AM +0530, Raj Kumar wrote:
> I have implemented run time power management in my drivers. Do you mean to
> say
> In case of ACPI also, again run time power management will get to device
> in low
> power mode or full working mode.
Unless you're coding for an ACPIPNP device, you don't need to care about
ACPI at all in your driver. The code in 2.6.35 and higher will handle
that for you.
> The another thing is suppose BIOS is ACPI based, ok as you told that bus
> will handle
> all the things do you mean ACPI driver will notify the bus about various
> device states?
The core ACPI code will inform the PCI code (for instance) that a wakeup
event has been generated, or the PCI code (for instance) will call the
appropraite ACPI functions while putting the device in a low power
state.
> If yes then what the standard interface between bus driver and device
> driver?
It's documented in the runtime pm document I pointed you at.
> Do you mean if there is ACPI, still ACPI is hooked with standard linux
> static power management
> core and run time power management core?
Yes.
> I mean to say ACPI notify the bus via linux power management core (static
> and run time)?
Yes.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Question regarding linux acpi
2010-08-04 23:34 ` Matthew Garrett
@ 2010-08-05 10:51 ` Raj Kumar
2010-08-05 11:55 ` Matthew Garrett
0 siblings, 1 reply; 6+ messages in thread
From: Raj Kumar @ 2010-08-05 10:51 UTC (permalink / raw)
To: mjg59; +Cc: linux-acpi
Hi Matthew,
First very thanks for quick responses. But now i have one more
question regarding the ACPI.
As you mentioned " The core ACPI code will inform the PCI code (for instance) that a wakeup
event has been generated, or the PCI code (for instance) will call the
appropraite ACPI functions while putting the device in a low power
state"
{RAJ}: Does it mean then PCI bus driver code and ACPI driver will directly communicate
with each other without any linux power management core?
Please see if my understanding is correct:
{RAJ}: If system suspend/resumes and runtime_suspend/runtime_resume happens, as linux power management core(static/runtime)
calls the bus driver code so when ACPI will be there, the bus driver will directly call the ACPI driver APIs.
But still device driver's suspend and resume(static and runtime) calls will be called by bus driver as normal behaviour
and if ACPI is there, then bus driver will inform the device driver and then inform the device power status to ACPI driver?
correct?
{RAJ}: Will the ACPI driver code also call the linux power management functions directly?
Regards
Raj.
----------------------------------------
> Date: Thu, 5 Aug 2010 00:34:18 +0100
> From: mjg59@srcf.ucam.org
> To: rajkumar278@hotmail.com
> CC: linux-acpi@vger.kernel.org
> Subject: Re: Question regarding linux acpi
>
> On Thu, Aug 05, 2010 at 04:13:42AM +0530, Raj Kumar wrote:
>
>> I have implemented run time power management in my drivers. Do you mean to
>> say
>> In case of ACPI also, again run time power management will get to device
>> in low
>> power mode or full working mode.
>
> Unless you're coding for an ACPIPNP device, you don't need to care about
> ACPI at all in your driver. The code in 2.6.35 and higher will handle
> that for you.
>
>> The another thing is suppose BIOS is ACPI based, ok as you told that bus
>> will handle
>> all the things do you mean ACPI driver will notify the bus about various
>> device states?
>
> The core ACPI code will inform the PCI code (for instance) that a wakeup
> event has been generated, or the PCI code (for instance) will call the
> appropraite ACPI functions while putting the device in a low power
> state.
>
>> If yes then what the standard interface between bus driver and device
>> driver?
>
> It's documented in the runtime pm document I pointed you at.
>
>> Do you mean if there is ACPI, still ACPI is hooked with standard linux
>> static power management
>> core and run time power management core?
>
> Yes.
>
>> I mean to say ACPI notify the bus via linux power management core (static
>> and run time)?
>
> Yes.
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Question regarding linux acpi
2010-08-05 10:51 ` Raj Kumar
@ 2010-08-05 11:55 ` Matthew Garrett
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Garrett @ 2010-08-05 11:55 UTC (permalink / raw)
To: Raj Kumar; +Cc: linux-acpi
On Thu, Aug 05, 2010 at 04:21:36PM +0530, Raj Kumar wrote:
> {RAJ}: Does it mean then PCI bus driver code and ACPI driver will directly communicate
> with each other without any linux power management core?
Yes, but the bus driver will then call the power management core.
> {RAJ}: If system suspend/resumes and runtime_suspend/runtime_resume happens, as linux power management core(static/runtime)
> calls the bus driver code so when ACPI will be there, the bus driver will directly call the ACPI driver APIs.
When ACPI is available, yes.
> But still device driver's suspend and resume(static and runtime) calls will be called by bus driver as normal behaviour
> and if ACPI is there, then bus driver will inform the device driver and then inform the device power status to ACPI driver?
The device driver may call back into the bus driver, and that may in
turn trigger an ACPI call. PCI is the best example of this - check out
the pci_platform_pm_ops structure in pci-acpi.c for example.
> {RAJ}: Will the ACPI driver code also call the linux power management functions directly?
For runtime power management? No.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-05 11:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-04 15:51 Question regarding linux acpi Raj Kumar
2010-08-04 17:02 ` Matthew Garrett
[not found] ` <BLU102-W81BE50E68610AAA92C33AEBAF0@phx.gbl>
2010-08-04 20:22 ` Matthew Garrett
[not found] ` <BLU102-W14E1E8D6FA2F2A23C56E84EBAF0@phx.gbl>
2010-08-04 23:34 ` Matthew Garrett
2010-08-05 10:51 ` Raj Kumar
2010-08-05 11:55 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).