From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: Witold.Szczeponik@gmx.net, bjorn.helgaas@hp.com, lenb@kernel.org,
rjw@sisk.pl
Subject: + pnpacpi-enable-power-management.patch added to -mm tree
Date: Fri, 28 Nov 2008 22:10:22 -0800 [thread overview]
Message-ID: <200811290610.mAT6AM3k012043@imap1.linux-foundation.org> (raw)
The patch titled
pnpacpi: enable Power Management
has been added to the -mm tree. Its filename is
pnpacpi-enable-power-management.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: pnpacpi: enable Power Management
From: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Set the power of PnP ACPI devices to D0 when they are activated and to D3
when they are disabled. The latter is in correspondence with the ACPI 3.0
specification, whereas the former is added in order to be able to power up
a device after it has been previously disabled (or when booting up a
system). (As a consequence, the patch makes the PnP ACPI code more ACPI
compliant.)
The patch fixes the problem with some IBM ThinkPads (at least the 600E and
the 600X) where the serial ports have a dedicated power source that needs
to be brought up before the serial port can be used. Without this patch,
the serial port is enabled but has no power.
No regressions were observed on hardware that does not require this patch.
Signed-off-by: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/pnp/pnpacpi/core.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff -puN drivers/pnp/pnpacpi/core.c~pnpacpi-enable-power-management drivers/pnp/pnpacpi/core.c
--- a/drivers/pnp/pnpacpi/core.c~pnpacpi-enable-power-management
+++ a/drivers/pnp/pnpacpi/core.c
@@ -98,18 +98,24 @@ static int pnpacpi_set_resources(struct
status = acpi_set_current_resources(handle, &buffer);
if (ACPI_FAILURE(status))
ret = -EINVAL;
+ else if (acpi_bus_power_manageable(handle))
+ ret = acpi_bus_set_power(handle, ACPI_STATE_D0);
kfree(buffer.pointer);
return ret;
}
static int pnpacpi_disable_resources(struct pnp_dev *dev)
{
+ acpi_handle handle = dev->data;
+ int ret = 0;
acpi_status status;
- /* acpi_unregister_gsi(pnp_irq(dev, 0)); */
- status = acpi_evaluate_object((acpi_handle) dev->data,
- "_DIS", NULL, NULL);
- return ACPI_FAILURE(status) ? -ENODEV : 0;
+ if (acpi_bus_power_manageable(handle))
+ ret = acpi_bus_set_power(handle, ACPI_STATE_D3);
+ status = acpi_evaluate_object(handle, "_DIS", NULL, NULL);
+ if (ACPI_FAILURE(status))
+ ret = -ENODEV;
+ return ret;
}
#ifdef CONFIG_ACPI_SLEEP
_
Patches currently in -mm which might be from Witold.Szczeponik@gmx.net are
pnpacpi-enable-power-management.patch
reply other threads:[~2008-11-29 6:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811290610.mAT6AM3k012043@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Witold.Szczeponik@gmx.net \
--cc=bjorn.helgaas@hp.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.