Re: [PATCH] Add Cobalt button interface driver support

From: Dmitry Torokhov
Date: Fri Feb 16 2007 - 10:15:39 EST

On 2/16/07, Yoichi Yuasa <yoichi_yuasa@xxxxxxxxxxxxxx> 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);


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?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at