public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: blink driver power saving
@ 2007-07-02 11:43 Indan Zupancic
  2007-07-02 11:51 ` Andi Kleen
  0 siblings, 1 reply; 39+ messages in thread
From: Indan Zupancic @ 2007-07-02 11:43 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Linus Torvalds, Stephen Hemminger, Andrew Morton, linux-kernel,
	 Dmitry Torokhov 

On Mon, July 2, 2007 01:59, Andi Kleen wrote:
> Well only those that could be already hung from user space
> with setleds (that was also confirmed).  Actually I thought
> they didn't hang completely, but just stopped reacting to
> the keyboard (which is actually pretty bad for every user
> to be able to trigger)

Pavel's lost key events, mine stopped reacting altogether.

> I guess the better way to handle those would be to find out the
> minimum frequency of blinking that is still ok and rate limit it to that in
> the keyboard driver.

Dmitry already has a patch for that. He limited it to one event each 50 ms.

> Anyways, Stephen's patch just doesn't make sense:
> he clearly didn't understand the code at all. Before you
> apply it and cripple it better drop the driver completely.

CC'ing Dmitry, as I think he doesn't like the blink driver much either. ;-)

Greetings,

Indan



^ permalink raw reply	[flat|nested] 39+ messages in thread
[parent not found: <8CaWr-2o4-19@gated-at.bofh.it>]
* blink driver power saving
@ 2007-07-01 16:50 Stephen Hemminger
  2007-07-01 18:07 ` Linus Torvalds
  2007-07-01 21:26 ` Andi Kleen
  0 siblings, 2 replies; 39+ messages in thread
From: Stephen Hemminger @ 2007-07-01 16:50 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Andi Kleen; +Cc: linux-kernel

The blink driver wakes up every jiffies which wastes power unnecessarily.
Using a notifier gives same effect. Also add ability to unload module.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

--- a/drivers/misc/blink.c	2007-06-29 22:56:20.000000000 -0400
+++ b/drivers/misc/blink.c	2007-07-01 12:44:37.000000000 -0400
@@ -16,12 +16,30 @@ static void do_blink(unsigned long data)
 	add_timer(&blink_timer);
 }
 
-static int blink_init(void)
+static int blink_panic_event(struct notifier_block *blk,
+			     unsigned long event, void *arg)
 {
-	printk(KERN_INFO "Enabling keyboard blinking\n");
 	do_blink(0);
 	return 0;
 }
 
+static struct notifier_block blink_notify = {
+	.notifier_call = blink_panic_event,
+};
+
+static __init int blink_init(void)
+{
+	printk(KERN_INFO "Enabling keyboard blinking\n");
+	atomic_notifier_chain_register(&panic_notifier_list, &blink_notify);
+	return 0;
+}
+
+static __exit void blink_remove(void)
+{
+	del_timer_sync(&blink_timer);
+	atomic_notifier_chain_unregister(&panic_notifier_list, &blink_notify);
+}
+
 module_init(blink_init);
+module_exit(blink_remove);
 

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2007-07-13  0:43 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-02 11:43 blink driver power saving Indan Zupancic
2007-07-02 11:51 ` Andi Kleen
2007-07-02 12:29   ` Indan Zupancic
2007-07-02 12:31   ` Dmitry Torokhov
2007-07-02 12:39     ` Andi Kleen
2007-07-02 12:56       ` Bernhard Walle
2007-07-02 13:42       ` Dmitry Torokhov
2007-07-02 13:43         ` Dmitry Torokhov
2007-07-02 20:19           ` Bernhard Walle
2007-07-04 21:47           ` Pavel Machek
2007-07-05  5:25             ` Dmitry Torokhov
2007-07-02 23:08       ` Pavel Machek
2007-07-03  5:42         ` Dmitry Torokhov
2007-07-04 21:40           ` Pavel Machek
2007-07-04 21:57           ` Pavel Machek
2007-07-04 22:11           ` Pavel Machek
2007-07-05  5:38             ` Dmitry Torokhov
2007-07-12  9:10               ` Pavel Machek
2007-07-13  0:42                 ` Jiri Kosina
2007-07-04 22:32           ` Pavel Machek
2007-07-04 22:46             ` Linus Torvalds
2007-07-04 22:59               ` Pavel Machek
     [not found]                 ` <alpine.LFD.0.98.0707041610530.9434@woody.linux-foundation.org>
2007-07-04 23:20                   ` Pavel Machek
2007-07-03  7:12         ` Bernhard Walle
2007-07-04 19:37           ` Pavel Machek
2007-07-05 20:30             ` Bill Davidsen
     [not found] <8CaWr-2o4-19@gated-at.bofh.it>
     [not found] ` <8Cfjl-PJ-33@gated-at.bofh.it>
     [not found]   ` <8CfW1-1TX-23@gated-at.bofh.it>
     [not found]     ` <8ChEo-4yy-1@gated-at.bofh.it>
2007-07-02 13:11       ` Bodo Eggert
  -- strict thread matches above, loose matches on Subject: below --
2007-07-01 16:50 Stephen Hemminger
2007-07-01 18:07 ` Linus Torvalds
2007-07-01 21:29   ` Andi Kleen
2007-07-01 22:14     ` Linus Torvalds
2007-07-01 23:59       ` Andi Kleen
2007-07-02 15:51         ` Linus Torvalds
2007-07-02 16:59           ` Alan Cox
2007-07-02 17:50         ` Stephen Hemminger
2007-07-02 19:03           ` Dmitry Torokhov
2007-07-02 19:08           ` Andi Kleen
2007-07-02 23:18             ` Pavel Machek
2007-07-01 21:26 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox