Re: [PATCH] PNPACPI: Enable Power Support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux