Thread (11 messages) flat view 11 messages, 3 authors, 2007-09-18

Re: [PATCH] Add Cobalt button interface driver support

From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Date: 2007-02-16 15:15:15
Also in: lkml

On 2/16/07, Yoichi Yuasa [off-list ref] wrote:
+
+static int cobalt_buttons_open(struct inode *inode, struct file *file)
+{
+       buttons_timer.expires = jiffies + msecs_to_jiffies(BUTTONS_POLL_INTERVAL);
+       add_timer(&buttons_timer);
+
+       return nonseekable_open(inode, file);
+
+}
Hi,

I am sorry, I was not clear enough - when I was talking about adding
cobalt_buttons_open/close I was not asking you to add a misc device to
the driver. I was talking about setting up open() and close() methods
in input_dev structure. These methods are called by input core when
first (or last) user opens or closes one of input interfaces, such as
/dev/input/eventX, /dev/input/jsX, etc and so it is naturally to
start/stop polling device from these functions.

Does this make sense?

-- 
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