All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thinkpad-acpi: Enable microphone mute LED
@ 2011-05-24 19:41 Andy Lutomirski
  2011-05-27 16:28 ` Matthew Garrett
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Lutomirski @ 2011-05-24 19:41 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86
  Cc: Andy Lutomirski

I don't know exactly which models have this LED or how to identify
them in the quirk table, so I just enabled it for all unquirked
Lenovo models.

Signed-off-by: Andy Lutomirski <luto@mit.edu>
---
 drivers/platform/x86/thinkpad_acpi.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 2797a97..40723a6 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5074,8 +5074,10 @@ static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
 	"tpacpi::unknown_led2",
 	"tpacpi::unknown_led3",
 	"tpacpi::thinkvantage",
+	"tpacpi::unknown_led4",
+	"tpacpi::micmute",
 };
-#define TPACPI_SAFE_LEDS	0x1081U
+#define TPACPI_SAFE_LEDS	0x5081U
 
 static inline bool tpacpi_is_led_restricted(const unsigned int led)
 {
@@ -5297,7 +5299,7 @@ static const struct tpacpi_quirk led_useful_qtable[] __initconst = {
 	{ /* Lenovo */
 	  .vendor = PCI_VENDOR_ID_LENOVO,
 	  .bios = TPACPI_MATCH_ANY, .ec = TPACPI_MATCH_ANY,
-	  .quirks = 0x1fffU,
+	  .quirks = 0x5fffU,
 	},
 	{ /* IBM ThinkPads with no EC version string */
 	  .vendor = PCI_VENDOR_ID_IBM,
-- 
1.7.5.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Re: [PATCH] thinkpad-acpi: Enable microphone mute LED
@ 2011-08-04 21:53 Manoj Iyer
  0 siblings, 0 replies; 8+ messages in thread
From: Manoj Iyer @ 2011-08-04 21:53 UTC (permalink / raw)
  To: platform-driver-x86-approval, linux-kernel; +Cc: luto


Can we please have an ACK on the following patch by Andy Lutomirski 
submitted to this list on May 24, with this patch

echo "1" > 
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness

echo "0" > 
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness

turns on and off the mic mute LED. I tested this on a Lenovo X220-Tablet.


Signed-off-by: Andy Lutomirski <luto <at> mit.edu>
---
  drivers/platform/x86/thinkpad_acpi.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c 
b/drivers/platform/x86/thinkpad_acpi.c
index 2797a97..40723a6 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5074,8 +5074,10 @@ static const char * const 
tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
  	"tpacpi::unknown_led2",
  	"tpacpi::unknown_led3",
  	"tpacpi::thinkvantage",
+	"tpacpi::unknown_led4",
+	"tpacpi::micmute",
  };
-#define TPACPI_SAFE_LEDS	0x1081U
+#define TPACPI_SAFE_LEDS	0x5081U

  static inline bool tpacpi_is_led_restricted(const unsigned int led)
  {
@@ -5297,7 +5299,7 @@ static const struct tpacpi_quirk led_useful_qtable[] 
__initconst = {
  	{ /* Lenovo */
  	  .vendor = PCI_VENDOR_ID_LENOVO,
  	  .bios = TPACPI_MATCH_ANY, .ec = TPACPI_MATCH_ANY,
-	  .quirks = 0x1fffU,
+	  .quirks = 0x5fffU,
  	},
  	{ /* IBM ThinkPads with no EC version string */
  	  .vendor = PCI_VENDOR_ID_IBM,
--

--
====================
Manoj Iyer
Ubuntu/Canonical
Hardware Enablement
====================

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-04 22:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 19:41 [PATCH] thinkpad-acpi: Enable microphone mute LED Andy Lutomirski
2011-05-27 16:28 ` Matthew Garrett
2011-05-27 16:39   ` Andrew Lutomirski
2011-05-27 16:48     ` Matthew Garrett
2011-05-27 18:22       ` Andrew Lutomirski
2011-05-27 18:26         ` Matthew Garrett
2011-06-03 15:50         ` [alsa-devel] " Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2011-08-04 21:53 Manoj Iyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.