mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
Merge branch 'for-6.16/apple' into for-linus
- Kconfig dependency fixes (Geert Uytterhoeven) - time scaling fix for appletb_tb_idle_timeout and appletb_tb_dim_timeout parameters (Thorsten Blum)
This commit is contained in:
commit
ad78d7e364
|
|
@ -151,6 +151,7 @@ config HID_APPLEIR
|
|||
config HID_APPLETB_BL
|
||||
tristate "Apple Touch Bar Backlight"
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
depends on X86 || COMPILE_TEST
|
||||
help
|
||||
Say Y here if you want support for the backlight of Touch Bars on x86
|
||||
MacBook Pros.
|
||||
|
|
@ -163,6 +164,7 @@ config HID_APPLETB_KBD
|
|||
depends on USB_HID
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
depends on INPUT
|
||||
depends on X86 || COMPILE_TEST
|
||||
select INPUT_SPARSEKMAP
|
||||
select HID_APPLETB_BL
|
||||
help
|
||||
|
|
|
|||
|
|
@ -172,7 +172,8 @@ static void appletb_inactivity_timer(struct timer_list *t)
|
|||
if (!kbd->has_dimmed) {
|
||||
backlight_device_set_brightness(kbd->backlight_dev, 1);
|
||||
kbd->has_dimmed = true;
|
||||
mod_timer(&kbd->inactivity_timer, jiffies + msecs_to_jiffies(appletb_tb_idle_timeout * 1000));
|
||||
mod_timer(&kbd->inactivity_timer,
|
||||
jiffies + secs_to_jiffies(appletb_tb_idle_timeout));
|
||||
} else if (!kbd->has_turned_off) {
|
||||
backlight_device_set_brightness(kbd->backlight_dev, 0);
|
||||
kbd->has_turned_off = true;
|
||||
|
|
@ -188,7 +189,8 @@ static void reset_inactivity_timer(struct appletb_kbd *kbd)
|
|||
kbd->has_dimmed = false;
|
||||
kbd->has_turned_off = false;
|
||||
}
|
||||
mod_timer(&kbd->inactivity_timer, jiffies + msecs_to_jiffies(appletb_tb_dim_timeout * 1000));
|
||||
mod_timer(&kbd->inactivity_timer,
|
||||
jiffies + secs_to_jiffies(appletb_tb_dim_timeout));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -407,7 +409,8 @@ static int appletb_kbd_probe(struct hid_device *hdev, const struct hid_device_id
|
|||
} else {
|
||||
backlight_device_set_brightness(kbd->backlight_dev, 2);
|
||||
timer_setup(&kbd->inactivity_timer, appletb_inactivity_timer, 0);
|
||||
mod_timer(&kbd->inactivity_timer, jiffies + msecs_to_jiffies(appletb_tb_dim_timeout * 1000));
|
||||
mod_timer(&kbd->inactivity_timer,
|
||||
jiffies + secs_to_jiffies(appletb_tb_dim_timeout));
|
||||
}
|
||||
|
||||
kbd->inp_handler.event = appletb_kbd_inp_event;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user