lkml.org 
[lkml]   [2010]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/6] ACPI: Register EC io ports in /proc/ioports
    Date
    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


    \
     
     \ /
      Last update: 2010-07-01 17:05    [W:0.020 / U:31.096 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site