[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081208222548.hfac8otubupwkc84@webmail.mit.edu>
Date: Mon, 08 Dec 2008 22:25:48 -0500
From: Adam M Belay <abelay@....EDU>
To: Bjorn Helgaas <bjorn.helgaas@...com>
Cc: Witold Szczeponik <Witold.Szczeponik@....net>,
Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, rjw@...k.pl
Subject: Re: [PATCH] PNPACPI: Enable Power Support
Quoting Bjorn Helgaas <bjorn.helgaas@...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
--
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