diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-04-30 18:57:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-19 16:21:35 +0200 |
commit | 3a080e1b11452eef4c1e80ab616f159b224be9b0 (patch) | |
tree | 3787b2a9e7eed32770eb55ace69a3730fa816793 | |
parent | fa177f7011c8765f4d7a4aa1336a5216b8b91b5e (diff) | |
download | linux-stable-3a080e1b11452eef4c1e80ab616f159b224be9b0.tar.gz linux-stable-3a080e1b11452eef4c1e80ab616f159b224be9b0.tar.bz2 linux-stable-3a080e1b11452eef4c1e80ab616f159b224be9b0.zip |
platform/x86: lenovo-yogabook: Set default keyboard backligh brightness on probe()
[ Upstream commit 9e6380d6573181c555ca1b5019b08d19a9ee581c ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/platform/x86/lenovo-yogabook-wmi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/platform/x86/lenovo-yogabook-wmi.c b/drivers/platform/x86/lenovo-yogabook-wmi.c index 5948ffa74acd..d57fcc838851 100644 --- 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); |