Thread (2 messages) flat view 2 messages, 2 authors, 2013-08-20

Re: [PATCH v7 1/1] input: ideapad_slidebar: new input driver

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2013-08-20 19:45:34
Also in: lkml

Hi Andrey,

On Fri, Aug 16, 2013 at 10:58:45AM +0400, Andrey Moiseev wrote:
v7: fixed things addressed by Dmitry Torokhov to v7 (quoted message goes below the patch)
This looks almost perfect, I have just one question:
+static bool slidebar_i8042_filter(unsigned char data, unsigned char str,
+				struct serio *port)
+{
+	static bool extended = false;
+
+	/* Scancodes: e03b on move, e0bb on release */
+	if (unlikely(data == 0xe0)) {
+		extended = true;
+		return false;
+	} else if (unlikely(extended && (data == 0x3b))) {
+		extended = false;
+		input_report_key(slidebar_input_dev, BTN_TOUCH, 1);
+		input_report_abs(slidebar_input_dev, ABS_X, slidebar_pos_get());
+		input_sync(slidebar_input_dev);
+		return false;
+	} else if (unlikely(extended && (data == 0xbb))) {
+		input_report_key(slidebar_input_dev, BTN_TOUCH, 0);
+		input_sync(slidebar_input_dev);
Don't you need to reset 'extended" here as well?

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help