linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: extend EV_LED
@ 2007-02-11 10:02 Németh Márton
  2007-02-12 18:31 ` Dmitry Torokhov
  0 siblings, 1 reply; 17+ messages in thread
From: Németh Márton @ 2007-02-11 10:02 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel


Extend EV_LED handling code so that it can handle not
only two states (on/off) but also others. For example
a LED can blink using hardware acceleration. The code
changed so that it is similar to the code at EV_SND.

Signed-off-by: Márton Németh <nm127@freemail.hu>

---
diff -uprN linux-2.6.20.orig/drivers/input/input.c 
linux/drivers/input/input.c
--- linux-2.6.20.orig/drivers/input/input.c	2007-02-04 
19:44:54.000000000 +0100
+++ linux/drivers/input/input.c	2007-02-10 15:20:28.000000000 +0100
@@ -141,10 +141,11 @@ void input_event(struct input_dev *dev,

  		case EV_LED:

-			if (code > LED_MAX || !test_bit(code, dev->ledbit) || 
!!test_bit(code, dev->led) == value)
+			if (code > LED_MAX || !test_bit(code, dev->ledbit))
  				return;

-			change_bit(code, dev->led);
+			if (!!test_bit(code, dev->led) != !!value)
+				change_bit(code, dev->led);

  			if (dev->event)
  				dev->event(dev, type, code, value);

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

end of thread, other threads:[~2007-02-18 14:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-11 10:02 [PATCH] input: extend EV_LED Németh Márton
2007-02-12 18:31 ` Dmitry Torokhov
2007-02-14 19:06   ` Németh Márton
2007-02-14 19:49     ` Dmitry Torokhov
2007-02-14 23:51       ` Németh Márton
2007-02-15 17:40       ` Pavel Machek
2007-02-15 22:47         ` Németh Márton
2007-02-15 23:09           ` Richard Purdie
2007-02-15 23:24             ` Pavel Machek
2007-02-15 23:36               ` Richard Purdie
2007-02-16  3:12             ` Henrique de Moraes Holschuh
2007-02-18 11:05               ` Richard Purdie
2007-02-18 14:42                 ` Henrique de Moraes Holschuh
2007-02-18  7:45             ` Németh Márton
2007-02-18  8:07               ` Willy Tarreau
2007-02-18 11:12               ` Richard Purdie
2007-02-16 14:04           ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).