Thread (11 messages) 11 messages, 5 authors, 2011-03-16

Re: [PATCH] Add a driver to support InvenSense mpu3050 gyroscope chip.

From: Alan Cox <hidden>
Date: 2011-03-15 12:59:05

I'd be more happy if it was just an input device. If non-wired interrupt
is a common case then we should probably add polled input device mode,
I can't really answer how common it is or would be - its a generic chip
that is used on all sorts of equipment
but we certainly should not register completely non-functional input
device as the driver does now.
Agreed
We also have a way of retrieving current (or rather most recent)
coordinates via EVIOCGABS so I am not sure why we want the sysfs way of
retrieving coordinates as well.
The sysfs way comes about because the devices are very very power
oriented, waking up and polling regularly burns power, hence also the
power control side. Opening an input device would power it up for the
duration it was open and the polling would cause a lot of wakeups burning
power.

Doing open/EVIOCGABS/close to avoid that aspect of the input layer
won't ensure you get current data that I can see - because an IRQ may not
have occurred between the open and the EVIOCGABS so any data may be very
stale or non-existent.

The polled case looks trivial to sort but for an IRQ driver driver it
looks like you would need a new "get co-ordinates right now" optional
method tht EVIOCGABS would use if available ?
Regarding power mode - I really believe that this should be done on the
driver core level instead of implementing "manual off" in every single
driver out there.
Definitely - not sure what plans Rafael has there ?

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