aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2010-07-16 07:11:33 -0400
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:49:09 -0400
commitb52e04216fcd86968c01ad0cfdb249375f19134d (patch)
tree270686f72430c698251613834416c0ce838f5d33 /drivers/acpi/ec.c
parent9827886dce77c47c378ce3154689cea2c45c731d (diff)
ACPI: Register EC io ports in /proc/ioports
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 Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index a79e1b193e85..265a99c1eb14 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -864,10 +864,18 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context)
864 * the second address region returned is the status/command 864 * the second address region returned is the status/command
865 * port. 865 * port.
866 */ 866 */
867 if (ec->data_addr == 0) 867 if (ec->data_addr == 0) {
868 ec->data_addr = resource->data.io.minimum; 868 ec->data_addr = resource->data.io.minimum;
869 else if (ec->command_addr == 0) 869 WARN(!request_region(ec->data_addr, 1, "EC data"),
870 "Could not request EC data io port %lu",
871 ec->data_addr);
872 }
873 else if (ec->command_addr == 0) {
870 ec->command_addr = resource->data.io.minimum; 874 ec->command_addr = resource->data.io.minimum;
875 WARN(!request_region(ec->command_addr, 1, "EC command"),
876 "Could not request EC command io port %lu",
877 ec->command_addr);
878 }
871 else 879 else
872 return AE_CTRL_TERMINATE; 880 return AE_CTRL_TERMINATE;
873 881