Re: Sensors and the input layer (was Re: [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Barkalow
Date: Tuesday, August 31, 2010 - 11:18 am

On Mon, 30 Aug 2010, Linus Torvalds wrote:


At least some of the time, an accelerometer is more like part of a 
joystick. You can have phones with accelerometers at both ends, where the 
input events produced depend on the combination of the readings, with each 
of the individual accelerometers being a device that is also available by 
itself. You can have phones which can be used in various orientations, 
where the logical "left" direction depends on the orientation. With a 
joystick, the device that the driver is for has the assignment of motions 
to inputs; for an accelerometer in a phone, the assignment is outside the 
scope of the chip, and it would make sense to have a second driver that 
takes non-chip-specific accelerometer output (per-accelerometer, per-axis) 
and maps it to input events based on how the user holds the box the chip 
is in.

It's like having a whole bunch of button devices; you want them to be 
exposed as a keyboard, and the sensor hardware reports press and release, 
but something else is needed to know which hardware button is which key. 
Similarly, you want to know about how the user is moving the device, and 
you may need to process various sorts of raw data to produce anything 
meaningful to applications.

	-Daniel
*This .sig left intentionally blank*
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver, Jonathan Cameron, (Fri May 21, 4:57 am)
Re: [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver, Dmitry Torokhov, (Sun Aug 29, 11:24 am)
Re: [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver, Dmitry Torokhov, (Sun Aug 29, 11:49 am)
Re: Sensors and the input layer (was Re: [RFC] [PATCH V2 1 ..., Jonathan Cameron, (Mon Aug 30, 10:41 am)
Re: Sensors and the input layer (was Re: [RFC] [PATCH V2 1 ..., Mohamed Ikbel Boulabiar, (Tue Aug 31, 10:24 am)
Re: Sensors and the input layer (was Re: [RFC] [PATCH V2 1 ..., Jonathan Cameron, (Tue Aug 31, 11:03 am)
Re: Sensors and the input layer (was Re: [RFC] [PATCH V2 1 ..., Jonathan Cameron, (Tue Aug 31, 11:14 am)
Re: Sensors and the input layer (was Re: [RFC] [PATCH V2 1 ..., Daniel Barkalow, (Tue Aug 31, 11:18 am)
Re: Sensors and the input layer (was Re: [RFC] [PATCH V2 1 ..., Jonathan Cameron, (Tue Aug 31, 11:20 am)