projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
711bcc0
)
platform/x86: lenovo-yogabook: Set default keyboard backligh brightness on probe()
author
Hans de Goede
<hdegoede@redhat.com>
Sun, 30 Apr 2023 16:57:52 +0000
(18:57 +0200)
committer
Hans de Goede
<hdegoede@redhat.com>
Tue, 9 May 2023 10:29:50 +0000
(12:29 +0200)
Set default keyboard backlight brightness on probe(), this fixes
the backlight being off after a rmmod + modprobe.
Fixes: c0549b72d99d ("platform/x86: lenovo-yogabook-wmi: Add driver for Lenovo Yoga Book")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link:
https://lore.kernel.org/r/20230430165807.472798-5-hdegoede@redhat.com
drivers/platform/x86/lenovo-yogabook-wmi.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/lenovo-yogabook-wmi.c
b/drivers/platform/x86/lenovo-yogabook-wmi.c
index 5948ffa74acd5b6a97fa6ba6c3241a5ce33d7623..d57fcc83885199a7fa6c690d725769f5bba4f2f2 100644
(file)
--- a/
drivers/platform/x86/lenovo-yogabook-wmi.c
+++ b/
drivers/platform/x86/lenovo-yogabook-wmi.c
@@
-295,6
+295,9
@@
static int yogabook_wmi_probe(struct wmi_device *wdev, const void *context)
}
data->backside_hall_irq = r;
+ /* Set default brightness before enabling the IRQ */
+ yogabook_wmi_set_kbd_backlight(data->wdev, YB_KBD_BL_DEFAULT);
+
r = request_irq(data->backside_hall_irq, yogabook_backside_hall_irq,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
"backside_hall_sw", data);