All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thinkpad_acpi: Support micmute LED
@ 2015-07-13 22:46 Jason A. Donenfeld
  2015-07-14 10:35 ` Henrique de Moraes Holschuh
  0 siblings, 1 reply; 2+ messages in thread
From: Jason A. Donenfeld @ 2015-07-13 22:46 UTC (permalink / raw)
  To: ibm-acpi, ibm-acpi-devel, linux-kernel; +Cc: Jason A. Donenfeld

The micmute LED is currently unused. This patch allows it to be hooked
up to various LED triggers.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 33e488c..ca4c435 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5281,8 +5281,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)
 {
@@ -5505,7 +5507,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,
-- 
2.4.5


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

* Re: [PATCH] thinkpad_acpi: Support micmute LED
  2015-07-13 22:46 [PATCH] thinkpad_acpi: Support micmute LED Jason A. Donenfeld
@ 2015-07-14 10:35 ` Henrique de Moraes Holschuh
  0 siblings, 0 replies; 2+ messages in thread
From: Henrique de Moraes Holschuh @ 2015-07-14 10:35 UTC (permalink / raw)
  To: Jason A. Donenfeld, ibm-acpi-devel, linux-kernel

NACK.

This LED needs to be hooked internally (kernel-side) to the ALSA mixer
entry responsible for MIC muting.  It should NOT be exposed to userspace
directly.

The LED state should only be modified when the MIC mute gate state
changes.  This means a private trigger, directly in ALSA, like the
speaker mute led.

And it most definately is not supposed to be added to TPACPI_SAFE_LEDS
*ever*.

On Mon, Jul 13, 2015, at 19:46, Jason A. Donenfeld wrote:
> The micmute LED is currently unused. This patch allows it to be hooked
> up to various LED triggers.
> 
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c
> b/drivers/platform/x86/thinkpad_acpi.c
> index 33e488c..ca4c435 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -5281,8 +5281,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
>  t
>  static inline bool tpacpi_is_led_restricted(const unsigned int led)
>  {
> @@ -5505,7 +5507,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,

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

end of thread, other threads:[~2015-07-14 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 22:46 [PATCH] thinkpad_acpi: Support micmute LED Jason A. Donenfeld
2015-07-14 10:35 ` Henrique de Moraes Holschuh

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.