summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2013-06-03 20:09:17 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2013-06-03 20:09:17 +0200
commit21bd1f8d7780aca59daa24ba63c52d1d6a91f872 (patch)
treeb135bea3b41eb0a7eb1791cee69887876d48778d
downloadw530-kernel-patches-21bd1f8d7780aca59daa24ba63c52d1d6a91f872.tar.xz
w530-kernel-patches-21bd1f8d7780aca59daa24ba63c52d1d6a91f872.zip
Initial commit.
-rw-r--r--bind-micmute-led-to-capslock-led.patch37
-rw-r--r--ivy-bridge-power.patch21
2 files changed, 58 insertions, 0 deletions
diff --git a/bind-micmute-led-to-capslock-led.patch b/bind-micmute-led-to-capslock-led.patch
new file mode 100644
index 0000000..36aca2c
--- /dev/null
+++ b/bind-micmute-led-to-capslock-led.patch
@@ -0,0 +1,37 @@
+diff -ru linux-3.7/drivers/input/keyboard/atkbd.c linux-3.7-mod/drivers/input/keyboard/atkbd.c
+--- linux-3.7/drivers/input/keyboard/atkbd.c 2012-12-11 04:30:57.000000000 +0100
++++ linux-3.7-mod/drivers/input/keyboard/atkbd.c 2013-02-10 18:29:48.582114753 +0100
+@@ -548,6 +548,24 @@
+ return ps2_command(&atkbd->ps2dev, &param, ATKBD_CMD_SETREP);
+ }
+
++/* Using the filesystem like this is almost 100% the wrong way to do things. */
++static void set_mic_mute_led(int on)
++{
++ struct file *filp;
++ loff_t offset;
++
++ filp = filp_open("/sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness", O_RDWR, 0);
++ if (IS_ERR(filp))
++ return;
++ offset = 0;
++ if (on)
++ vfs_write(filp, "255\n", 4, &offset);
++ else
++ vfs_write(filp, "0\n", 2, &offset);
++ generic_file_fsync(filp, 0, offset, 0);
++ filp_close(filp, NULL);
++}
++
+ static int atkbd_set_leds(struct atkbd *atkbd)
+ {
+ struct input_dev *dev = atkbd->dev;
+@@ -558,6 +576,8 @@
+ | (test_bit(LED_CAPSL, dev->led) ? 4 : 0);
+ if (ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS))
+ return -1;
++
++ set_mic_mute_led(test_bit(LED_CAPSL, dev->led));
+
+ if (atkbd->extra) {
+ param[0] = 0;
diff --git a/ivy-bridge-power.patch b/ivy-bridge-power.patch
new file mode 100644
index 0000000..63f1287
--- /dev/null
+++ b/ivy-bridge-power.patch
@@ -0,0 +1,21 @@
+From eb10f71a176396e4a8e2f8edc01b359d8c8e0dc9 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Thu, 16 May 2013 17:19:49 +0000
+Subject: Enable intel_pstate for the Ivy Bridge processor
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+---
+diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
+index cc3a8e6..2300269 100644
+--- a/drivers/cpufreq/intel_pstate.c
++++ b/drivers/cpufreq/intel_pstate.c
+@@ -600,6 +600,7 @@ static void intel_pstate_timer_func(unsigned long __data)
+ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
+ ICPU(0x2a, default_policy),
+ ICPU(0x2d, default_policy),
++ ICPU(0x3a, default_policy),
+ {}
+ };
+ MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
+--
+cgit v0.9.2