mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
LED fixes for 4.12-rc6
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZRQjNAAoJEL1qUBy3i3wmgt4P+wfkMgfBnpiCtp7aoRtvRo8o Ar+SR0iwcG5T8jM/Q74H2K//lKdjXtsGVrtXHeUTmhzLluw+cfnycgPo0oK9iHtR CowneQJhj3FvPos63wzPnea0+Sg8ZBbegR6Bp+Au+IrH+svX4BO48BuSdwXHBzsa jFU6TgvR1YGltpsn4IKzTyY1uRlyMYV6CahadqqibpaWxw301Hm2RxzPPwV50h0T 2PXLYR28L/2G5f6bvI/qp+2m1haKE2c/4kSRXX0BetkE/zifAVCuOBxo505ztDZd KZ/SZ0uZ5xR8O0/I28udoNv37wXePoXeOs+ycpHcgG2NUDLbVmWLVVUWQVYPY6Hu 71q0piW9LulSZxhDivEIiJk7lhQ/khq6M1WeABxYHI6X4BNFNnHykgnesEULL17I B4+Hb4rALIFjh0KrJfCGL/Y4Pne0MGP/YFGPBFAYGBqC/yzZ32xs3lgcu9H0sSnV mWedN+CbfX74AjAl16KGC/m1fxGRTHWPSN6QCrjzcPGXDN0Zx1NtkTk6HwhjIiRB QeFxQB13ucQZaGiAG1N0pj2Qe1+Tjla03rJ4HL+IuNTxtaVX01/XaOahUWrZHWdg H6FkrinOKuUJRQ/tsQRSPxpaOlGkdGEqGyTR3/S/8yoxU695lKV9HmVLBOVyqHwz faKVeNd3MAA09o/RpN9N =GOju -----END PGP SIGNATURE----- Merge tag 'led_fixes_for_4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fixes from Jacek Anaszewski: "Two LED fixes: - fix signal source assignment for leds-bcm6328 - revert patch that intended to fix LED behavior on suspend but it had a side effect preventing suspend at all due to uevent being sent on trigger removal" * tag 'led_fixes_for_4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: Revert "leds: handle suspend/resume in heartbeat trigger" leds: bcm6328: fix signal source assignment for leds 4 to 7
This commit is contained in:
commit
374d801522
@ -242,7 +242,7 @@ static int bcm6328_hwled(struct device *dev, struct device_node *nc, u32 reg,
|
||||
|
||||
spin_lock_irqsave(lock, flags);
|
||||
val = bcm6328_led_read(addr);
|
||||
val |= (BIT(reg) << (((sel % 4) * 4) + 16));
|
||||
val |= (BIT(reg % 4) << (((sel % 4) * 4) + 16));
|
||||
bcm6328_led_write(addr, val);
|
||||
spin_unlock_irqrestore(lock, flags);
|
||||
}
|
||||
@ -269,7 +269,7 @@ static int bcm6328_hwled(struct device *dev, struct device_node *nc, u32 reg,
|
||||
|
||||
spin_lock_irqsave(lock, flags);
|
||||
val = bcm6328_led_read(addr);
|
||||
val |= (BIT(reg) << ((sel % 4) * 4));
|
||||
val |= (BIT(reg % 4) << ((sel % 4) * 4));
|
||||
bcm6328_led_write(addr, val);
|
||||
spin_unlock_irqrestore(lock, flags);
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <linux/sched/loadavg.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/suspend.h>
|
||||
#include "../leds.h"
|
||||
|
||||
static int panic_heartbeats;
|
||||
@ -163,30 +162,6 @@ static struct led_trigger heartbeat_led_trigger = {
|
||||
.deactivate = heartbeat_trig_deactivate,
|
||||
};
|
||||
|
||||
static int heartbeat_pm_notifier(struct notifier_block *nb,
|
||||
unsigned long pm_event, void *unused)
|
||||
{
|
||||
int rc;
|
||||
|
||||
switch (pm_event) {
|
||||
case PM_SUSPEND_PREPARE:
|
||||
case PM_HIBERNATION_PREPARE:
|
||||
case PM_RESTORE_PREPARE:
|
||||
led_trigger_unregister(&heartbeat_led_trigger);
|
||||
break;
|
||||
case PM_POST_SUSPEND:
|
||||
case PM_POST_HIBERNATION:
|
||||
case PM_POST_RESTORE:
|
||||
rc = led_trigger_register(&heartbeat_led_trigger);
|
||||
if (rc)
|
||||
pr_err("could not re-register heartbeat trigger\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static int heartbeat_reboot_notifier(struct notifier_block *nb,
|
||||
unsigned long code, void *unused)
|
||||
{
|
||||
@ -201,10 +176,6 @@ static int heartbeat_panic_notifier(struct notifier_block *nb,
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static struct notifier_block heartbeat_pm_nb = {
|
||||
.notifier_call = heartbeat_pm_notifier,
|
||||
};
|
||||
|
||||
static struct notifier_block heartbeat_reboot_nb = {
|
||||
.notifier_call = heartbeat_reboot_notifier,
|
||||
};
|
||||
@ -221,14 +192,12 @@ static int __init heartbeat_trig_init(void)
|
||||
atomic_notifier_chain_register(&panic_notifier_list,
|
||||
&heartbeat_panic_nb);
|
||||
register_reboot_notifier(&heartbeat_reboot_nb);
|
||||
register_pm_notifier(&heartbeat_pm_nb);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void __exit heartbeat_trig_exit(void)
|
||||
{
|
||||
unregister_pm_notifier(&heartbeat_pm_nb);
|
||||
unregister_reboot_notifier(&heartbeat_reboot_nb);
|
||||
atomic_notifier_chain_unregister(&panic_notifier_list,
|
||||
&heartbeat_panic_nb);
|
||||
|
Loading…
Reference in New Issue
Block a user