aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2010-07-16 07:11:31 -0400
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:49:08 -0400
commit1195a098168fcacfef1cd80d05358e52fb366bf6 (patch)
tree8629388386fdb4fd6bc2b955f10a96b83a9790b3 /drivers/acpi/ec.c
parentcd89e08fa020f5a882f922e3c9e2628235ca6715 (diff)
ACPI: Provide /sys/kernel/debug/ec/...
This patch provides the same information through debugfs, which previously was provided through /proc/acpi/embedded_controller/*/info This is the gpe the EC is connected to and whether the global lock gets used. The io ports used are added to /proc/ioports in another patch. Beside the fact that /proc/acpi is deprecated for quite some time, this info is not needed for applications and thus can be moved to debugfs instead of a public interface like /sys. 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.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index ce1f07fd7241..a79e1b193e85 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -43,10 +43,13 @@
43#include <acpi/acpi_drivers.h> 43#include <acpi/acpi_drivers.h>
44#include <linux/dmi.h> 44#include <linux/dmi.h>
45 45
46#include "internal.h"
47
46#define ACPI_EC_CLASS "embedded_controller" 48#define ACPI_EC_CLASS "embedded_controller"
47#define ACPI_EC_DEVICE_NAME "Embedded Controller" 49#define ACPI_EC_DEVICE_NAME "Embedded Controller"
48#define ACPI_EC_FILE_INFO "info" 50#define ACPI_EC_FILE_INFO "info"
49 51
52#undef PREFIX
50#define PREFIX "ACPI: EC: " 53#define PREFIX "ACPI: EC: "
51 54
52/* EC status register */ 55/* EC status register */
@@ -104,19 +107,8 @@ struct transaction {
104 bool done; 107 bool done;
105}; 108};
106 109
107static struct acpi_ec { 110struct acpi_ec *boot_ec, *first_ec;
108 acpi_handle handle; 111EXPORT_SYMBOL(first_ec);
109 unsigned long gpe;
110 unsigned long command_addr;
111 unsigned long data_addr;
112 unsigned long global_lock;
113 unsigned long flags;
114 struct mutex lock;
115 wait_queue_head_t wait;
116 struct list_head list;
117 struct transaction *curr;
118 spinlock_t curr_lock;
119} *boot_ec, *first_ec;
120 112
121static int EC_FLAGS_MSI; /* Out-of-spec MSI controller */ 113static int EC_FLAGS_MSI; /* Out-of-spec MSI controller */
122static int EC_FLAGS_VALIDATE_ECDT; /* ASUStec ECDTs need to be validated */ 114static int EC_FLAGS_VALIDATE_ECDT; /* ASUStec ECDTs need to be validated */