Re: [PATCH] PNPACPI: Enable Power Support
From: Adam M Belay
Date: Mon Dec 08 2008 - 22:34:01 EST
Quoting Bjorn Helgaas <bjorn.helgaas@xxxxxx>:
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/