lkml.org 
[lkml]   [2008]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PNPACPI: Enable Power Support
Quoting Bjorn Helgaas <bjorn.helgaas@hp.com>:
> Hi Adam,
>
> Do you have any proposals for how pnpacpi_set_resources() should
> handle failure? Witold started out with code to call acpi_bus_set_power()
> only if the device is power-manageable, and he then passed the
> return code up. I suggested letting acpi_bus_set_power() do
> the "is-power-manageable" check. But then the caller would have
> to distinguish the "device isn't power-manageable" error from
> others, which is kind of ugly.
>
> Bjorn

Hi Bjorn,

How about one of these options:

1.) Modify acpi_bus_set_power() to return success if the device is not power
manageable but the request is for D0. After all, any device that doesn't
support PM can be assumed to be in D0. (Or maybe more correctly the state
of its parent?)

2.) Call acpi_bus_get_power() and check if the state is not already D0 before
asking acpi_bus_set_power() for the transition. If it is any other
state, then
of the device is power manageable.

Thanks,
Adam



\
 
 \ /
  Last update: 2008-12-09 04:37    [W:1.438 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site