From: Thomas Renninger <trenn@suse.de>
To: lenb@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
platform-driver-x86@vger.kernel.org, astarikovskiy@suse.de,
Thomas Renninger <trenn@suse.de>,
Bjorn Helgaas <bjorn.helgaas@hp.com>
Subject: [PATCH 3/6] ACPI: Register EC io ports in /proc/ioports
Date: Thu, 1 Jul 2010 17:02:47 +0200 [thread overview]
Message-ID: <1277996570-2686-4-git-send-email-trenn@suse.de> (raw)
In-Reply-To: <1277996570-2686-1-git-send-email-trenn@suse.de>
Formerly these have been exposed through /proc/..
Better register them where all IO ports should get registered
and scream loud if someone else claims to use them.
EC data and command port typically should show up like this
then:
...
0060-0060 : keyboard
0062-0062 : EC data
0064-0064 : keyboard
0066-0066 : EC command
0070-0071 : rtc0
...
Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: Alexey Starikovskiy <astarikovskiy@suse.de>
CC: Len Brown <lenb@kernel.org>
CC: linux-kernel@vger.kernel.org
CC: linux-acpi@vger.kernel.org
CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: platform-driver-x86@vger.kernel.org
Index: linux-2.6.34-master/drivers/acpi/ec.c
===================================================================
---
drivers/acpi/ec.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 4b6759f..f95fa9f 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -927,10 +927,18 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context)
* the second address region returned is the status/command
* port.
*/
- if (ec->data_addr == 0)
+ if (ec->data_addr == 0) {
ec->data_addr = resource->data.io.minimum;
- else if (ec->command_addr == 0)
+ WARN(!request_region(ec->data_addr, 1, "EC data"),
+ "Could not request EC data io port %lu",
+ ec->data_addr);
+ }
+ else if (ec->command_addr == 0) {
ec->command_addr = resource->data.io.minimum;
+ WARN(!request_region(ec->command_addr, 1, "EC command"),
+ "Could not request EC command io port %lu",
+ ec->command_addr);
+ }
else
return AE_CTRL_TERMINATE;
--
1.6.3
next prev parent reply other threads:[~2010-07-01 15:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 15:02 Provide /sys/../ec with read/write access and some cleanups Thomas Renninger
2010-07-01 15:02 ` [PATCH 1/6] ACPI: Provide /sys/devices/system/ec/ Thomas Renninger
2010-07-09 19:18 ` Greg KH
2010-07-09 19:18 ` Greg KH
2010-07-01 15:02 ` [PATCH 2/6] ACPI: Provide /sys/devices/system/ec/*/io for binary access to the EC Thomas Renninger
2010-07-01 15:02 ` Thomas Renninger [this message]
2010-07-01 15:02 ` [PATCH 4/6] ACPI: Remove /proc/acpi/embedded_controller/ Thomas Renninger
[not found] ` <1277996570-2686-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2010-07-01 15:02 ` [PATCH 5/6] X86 platform drivers: Remove EC dump from thinkpad_acpi Thomas Renninger
2010-07-01 16:27 ` Henrique de Moraes Holschuh
2010-07-01 19:31 ` Thomas Renninger
2010-07-01 23:26 ` Henrique de Moraes Holschuh
2010-07-02 9:14 ` Thomas Renninger
2010-07-02 15:58 ` Henrique de Moraes Holschuh
2010-07-01 15:02 ` [PATCH 6/6] X86 platform driver: Fix section mismatch in wmi.c Thomas Renninger
2010-07-01 16:22 ` Provide /sys/../ec with read/write access and some cleanups Henrique de Moraes Holschuh
2010-07-01 19:44 ` Thomas Renninger
2010-07-01 23:27 ` Henrique de Moraes Holschuh
2010-07-01 20:47 ` Maxim Levitsky
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=1277996570-2686-4-git-send-email-trenn@suse.de \
--to=trenn@suse.de \
--cc=astarikovskiy@suse.de \
--cc=bjorn.helgaas@hp.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).