mbox series

[v3,0/7] HID: lenovo: Mute LED handling fixes and improvements

Message ID 20210221112005.102116-1-hdegoede@redhat.com
Headers show
Series HID: lenovo: Mute LED handling fixes and improvements | expand

Message

Hans de Goede Feb. 21, 2021, 11:19 a.m. UTC
Hi All,

Here is v3 of my series with mute LED handling fixes and improvements
for the hid-lenovo driver.

v3 addresses the review-remarks from Marek Behún, thank you for all the
reviews Marek.

See the individual patches for detailed per patch changelogs.

Regards,

Hans


Hans de Goede (7):
  HID: lenovo: Use brightness_set_blocking callback for setting LEDs
    brightness
  HID: lenovo: Fix lenovo_led_set_tp10ubkbd() error handling
  HID: lenovo: Check hid_get_drvdata() returns non NULL in
    lenovo_event()
  HID: lenovo: Remove lenovo_led_brightness_get()
  HID: lenovo: Set LEDs max_brightness value
  HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE
  HID: lenovo: Set default_triggers for the mute and micmute LEDs

 drivers/hid/hid-lenovo.c | 69 ++++++++++++++++++++++------------------
 1 file changed, 38 insertions(+), 31 deletions(-)

Comments

Pavel Machek Feb. 23, 2021, 9:03 a.m. UTC | #1
On Sun 2021-02-21 12:20:02, Hans de Goede wrote:
> The led_classdev already contains a cached value of the last set
> brightness, the brightness_get callback is only meant for LED drivers
> which can read back the actual / current brightness from the hardware.
> 
> Since lenovo_led_brightness_get() just returns the last set value
> it does not add any functionality, so we can just remove it.
> 
> Reviewed-by: Marek Behún <kabel@kernel.org>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Pavel Machek <pavel@ucw.cz>
Pavel Machek Feb. 23, 2021, 9:04 a.m. UTC | #2
On Sun 2021-02-21 12:20:05, Hans de Goede wrote:
> The mute and mic-mute LEDs should be automatically turned on/off based
> on the audio-card's mixer settings.
> 
> Add the standardized default-trigger names for this, so that the alsa
> code can turn the LEDs on/off as appropriate (on supported audio cards).
> 
> This brings the mute/mic-mute LED support inline with the thinkpad_acpi
> support for the same LEDs in keyboards directly connected to the
> laptop's embedded-controller.
> 
> Reviewed-by: Marek Behún <kabel@kernel.org>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Pavel Machek <pavel@ucw.cz>