aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/thinkpad_acpi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:44:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:44:06 -0400
commitc145307a110c14d09d5d92ff3c49dc0940e44b80 (patch)
treecba923818dea8857022de06ffd94ec6b2967aa1f /drivers/platform/x86/thinkpad_acpi.c
parent5e83f6fbdb020b70c0e413312801424d13c58d68 (diff)
parent1a14703d6b20010401ca273ac1f07bff7992aa2c (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (88 commits) ips driver: make it less chatty intel_scu_ipc: fix size field for intel_scu_ipc_command intel_scu_ipc: return -EIO for error condition in busy_loop intel_scu_ipc: fix data packing of PMIC command on Moorestown Clean up command packing on MRST. zero the stack buffer before giving random garbage to the SCU Fix stack buffer size for IPC writev messages intel_scu_ipc: Use the new cpu identification function intel_scu_ipc: tidy up unused bits Remove indirect read write api support. intel_scu_ipc: Support Medfield processors intel_scu_ipc: detect CPU type automatically x86 plat: limit x86 platform driver menu to X86 acpi ec_sys: Be more cautious about ec write access acpi ec: Fix possible double io port registration hp-wmi: acpi_drivers.h is already included through acpi.h two lines below hp-wmi: Fix mixing up of and/or directive dell-laptop: make dell_laptop_i8042_filter() static asus-laptop: fix asus_input_init error path msi-wmi: make needlessly global symbols static ...
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
-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);