Hi Paul, On Mon, Apr 11, 2011 at 06:21:02PM +0200, paul.chavent@xxxxxxxx wrote: > Hi. > > I have a board with an adxl34x (an accelerometer) on a two wire bus. > Its interrupt line aren't routed. > > So i would like to use the driver in polling mode. > > I submit this patch as a beta version of my work. > > I tried to reuse the input_polling structure but I'm facing some > problems. > > The driver has a "rate" attribute that i would like to control when i > setup the "interval" attribute of the input_pollling. > > And vice versa, when i setup the "interval" attribute i would like to > setup the "rate". > > So my questions : - Is it possible to reimplement a workqueue for > this driver only ? As it seems to have been done yet in other drivers, > i wonder if it's acceptable, or if we should avoid this practice. - > I think it would be complicated to have hooks in input and > input_polling for calling each other. I wonder if i haven't any design > problem. > > I would need an advice in order to cleaning this patch please. > Yes, just use the system workqueue (now even dedicated workqueue is not really needed) and leave input_polldev alone - it makes sense to use for devices that are purely polled ones. The devices that may or may not be interrupt driven I think we should just hook workqueue handling in the driver. Note that I normally oppose supporting polling mode for devices that may be interrupt driven, since this normally increases power consumption. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html