aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2010-07-16 07:11:35 -0400
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:49:06 -0400
commita420e46412ad9d33c7174cd4311b91728122e2c4 (patch)
tree36c01a0fc6f2a0a0a8daa23f6a8ca906021d35f3 /drivers/platform
parent49c6c5ff924cecc0b6260109a510b7ed4c970dc5 (diff)
X86 platform drivers: Remove EC dump from thinkpad_acpi
There is a general interface for that now (provided by other patches in this patch series): /sys/kernel/debug/ec/*/io 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: platform-driver-x86@vger.kernel.org CC: Henrique de Moraes Holschuh <hmh@hmh.eng.br> CC: ibm-acpi-devel@lists.sourceforge.net Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 4bdb13796e2..5d6119bed00 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5838,75 +5838,6 @@ static struct ibm_struct thermal_driver_data = {
5838}; 5838};
5839 5839
5840/************************************************************************* 5840/*************************************************************************
5841 * EC Dump subdriver
5842 */
5843
5844static u8 ecdump_regs[256];
5845
5846static int ecdump_read(struct seq_file *m)
5847{
5848 int i, j;
5849 u8 v;
5850
5851 seq_printf(m, "EC "
5852 " +00 +01 +02 +03 +04 +05 +06 +07"
5853 " +08 +09 +0a +0b +0c +0d +0e +0f\n");
5854 for (i = 0; i < 256; i += 16) {
5855 seq_printf(m, "EC 0x%02x:", i);
5856 for (j = 0; j < 16; j++) {
5857 if (!acpi_ec_read(i + j, &v))
5858 break;
5859 if (v != ecdump_regs[i + j])
5860 seq_printf(m, " *%02x", v);
5861 else
5862 seq_printf(m, " %02x", v);
5863 ecdump_regs[i + j] = v;
5864 }
5865 seq_putc(m, '\n');
5866 if (j != 16)
5867 break;
5868 }
5869
5870 /* These are way too dangerous to advertise openly... */
5871#if 0
5872 seq_printf(m, "commands:\t0x<offset> 0x<value>"
5873 " (<offset> is 00-ff, <value> is 00-ff)\n");
5874 seq_printf(m, "commands:\t0x<offset> <value> "
5875 " (<offset> is 00-ff, <value> is 0-255)\n");
5876#endif
5877 return 0;
5878}
5879
5880static int ecdump_write(char *buf)
5881{
5882 char *cmd;
5883 int i, v;
5884
5885 while ((cmd = next_cmd(&buf))) {
5886 if (sscanf(cmd, "0x%x 0x%x", &i, &v) == 2) {
5887 /* i and v set */
5888 } else if (sscanf(cmd, "0x%x %u", &i, &v) == 2) {
5889 /* i and v set */
5890 } else
5891 return -EINVAL;
5892 if (i >= 0 && i < 256 && v >= 0 && v < 256) {
5893 if (!acpi_ec_write(i, v))
5894 return -EIO;
5895 } else
5896 return -EINVAL;
5897 }
5898
5899 return 0;
5900}
5901
5902static struct ibm_struct ecdump_driver_data = {
5903 .name = "ecdump",
5904 .read = ecdump_read,
5905 .write = ecdump_write,
5906 .flags.experimental = 1,
5907};
5908
5909/*************************************************************************
5910 * Backlight/brightness subdriver 5841 * Backlight/brightness subdriver
5911 */ 5842 */
5912 5843
@@ -8883,9 +8814,6 @@ static struct ibm_init_struct ibms_init[] __initdata = {
8883 .data = &thermal_driver_data, 8814 .data = &thermal_driver_data,
8884 }, 8815 },
8885 { 8816 {
8886 .data = &ecdump_driver_data,
8887 },
8888 {
8889 .init = brightness_init, 8817 .init = brightness_init,
8890 .data = &brightness_driver_data, 8818 .data = &brightness_driver_data,
8891 }, 8819 },
@@ -8993,7 +8921,6 @@ TPACPI_PARAM(light);
8993TPACPI_PARAM(cmos); 8921TPACPI_PARAM(cmos);
8994TPACPI_PARAM(led); 8922TPACPI_PARAM(led);
8995TPACPI_PARAM(beep); 8923TPACPI_PARAM(beep);
8996TPACPI_PARAM(ecdump);
8997TPACPI_PARAM(brightness); 8924TPACPI_PARAM(brightness);
8998TPACPI_PARAM(volume); 8925TPACPI_PARAM(volume);
8999TPACPI_PARAM(fan); 8926TPACPI_PARAM(fan);