linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] iio-input-bridge so that accelerometers which only have an iio driver can still present evdev input events
@ 2019-03-18 20:39 H. Nikolaus Schaller
  2019-03-18 20:39 ` [RFC 1/4] iio: input-bridge: optionally bridge iio acceleometers to create a /dev/input H. Nikolaus Schaller
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: H. Nikolaus Schaller @ 2019-03-18 20:39 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: letux-kernel, kernel, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, linux-kernel, linux-iio,
	H. Nikolaus Schaller

Some user spaces (e.g. some Android) use /dev/input/event* for handling the 3D
position of the device with respect to the center of gravity (earth). This can
be used for gaming input, rotation of screens etc.

This should be the standard because this interface is an abstraction of how
this data is acquired from sensor chips. Sensor chips may be connected through
different interfaces and in different positions. They may also have different
parameters. And, if a chip is replaced by a different one, the values reported
by the device position interface should remain the same.

But nowadays, new accelerometer chips usually just get iio drivers and rarely
an evdev input driver.

Therefore we need something like a protocol stack: input device vs. raw data.
It can be seen as a similar layering like TCP/IP vs. bare Ethernet. Or keyboard
input events vs. raw gpio or raw USB access.

This patch set bridges the gap between raw iio data and the input device abstraction
so that accelerometer measurements can also be presented as X/Y/Z accelerometer
channels (INPUT_PROP_ACCELEROMETER) through /dev/input/event*.


H. Nikolaus Schaller (4):
  iio: input-bridge: optionally bridge iio acceleometers to create a
    /dev/input
  iio: input-bridge: add iio-input-bridge to Makefile
  iio: input-bridge: add IIO_INPUT_BRIDGE kernel config option
  iio: input-bridge: make the iio-input-bridge driver called by iio-core

 drivers/iio/Kconfig                    |   7 +
 drivers/iio/Makefile                   |   1 +
 drivers/iio/industrialio-core.c        |  12 +
 drivers/iio/industrialio-inputbridge.c | 420 +++++++++++++++++++++++++
 drivers/iio/industrialio-inputbridge.h |  28 ++
 5 files changed, 468 insertions(+)
 create mode 100644 drivers/iio/industrialio-inputbridge.c
 create mode 100644 drivers/iio/industrialio-inputbridge.h

-- 
2.19.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-31 11:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 20:39 [RFC 0/4] iio-input-bridge so that accelerometers which only have an iio driver can still present evdev input events H. Nikolaus Schaller
2019-03-18 20:39 ` [RFC 1/4] iio: input-bridge: optionally bridge iio acceleometers to create a /dev/input H. Nikolaus Schaller
2019-03-18 20:39 ` [RFC 2/4] iio: input-bridge: add iio-input-bridge to Makefile H. Nikolaus Schaller
2019-03-18 20:39 ` [RFC 3/4] iio: input-bridge: add IIO_INPUT_BRIDGE kernel config option H. Nikolaus Schaller
2019-03-18 20:39 ` [RFC 4/4] iio: input-bridge: make the iio-input-bridge driver called by iio-core H. Nikolaus Schaller
2019-03-24 18:29 ` [RFC 0/4] iio-input-bridge so that accelerometers which only have an iio driver can still present evdev input events Jonathan Cameron
2019-03-28 17:42   ` H. Nikolaus Schaller
2019-03-31 10:09     ` H. Nikolaus Schaller
2019-03-31 11:05     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).