]> Git Repo - linux.git/commitdiff
ACPI: Register EC io ports in /proc/ioports
authorThomas Renninger <[email protected]>
Fri, 16 Jul 2010 11:11:33 +0000 (13:11 +0200)
committerMatthew Garrett <[email protected]>
Tue, 3 Aug 2010 13:49:09 +0000 (09:49 -0400)
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 <[email protected]>
CC: Alexey Starikovskiy <[email protected]>
CC: Len Brown <[email protected]>
CC: [email protected]
CC: [email protected]
CC: Bjorn Helgaas <[email protected]>
CC: [email protected]
Signed-off-by: Matthew Garrett <[email protected]>
drivers/acpi/ec.c

index a79e1b193e8586552618722c033f744bc7a2b7fd..265a99c1eb14fb937ba5e54d77e2725989974d0e 100644 (file)
@@ -864,10 +864,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;
 
This page took 0.056578 seconds and 4 git commands to generate.