On Sat, 25 Aug 2007, Yan Burman wrote:I don't mind doing it this way, it's just that from what I saw all current applications use the sys interface, so I figured that people
Aha, /sys. Could we simply power off the device when its input deviceNo, we can't since the sys interface provides the position info and some applications (hdaps apps for example) use this interface.
is not opened?
Power it off when not used for some time. Power on when opened. -EBUSY
while powering on and before it stablizes, if you don't want to get anything
userland stuck in D state. This much work might not make sense if your
accelerometer doesn't waste resources when enabled.
Heck, try to get rid of that position sysfs crap if you can! It was a bad
design idea for hdaps to come up with, there is no reason to let it leak to
other drivers.
Input devices are the way to go for this, a joystick-emulation input device
(for games and toys), plus a input device that outputs accelerometer data in
micro (or mili?) gravities (generic stuff that works with all accelerometers
should use this one) and a raw accelerometer data input device (for higly
specific signal processing apps) when possible.
HDAPS (the one that matters, which ships in tp_smapi) lacks the g-normalizedThis is not the impression that I got - I got quite a few responses from people that were using my driver with the hdaps applications that use sys.
device, though, but it would be a proper generic accelerometer interface.
The in-tree hdaps driver is basically ignored. So some other accelerometer
driver gets the dibs on how to implement those interfaces in a properI agree that the sys interface is probably not the best choice, but the accelerometer data should provide not only position, but also generate an event when it detects
generic way. Want to be the one? Please? We in hdaps-devel can certainly
help with ideas and fix out-of-tree hdaps to also implement the interface.