We're hiring!
*

Bridging IIO and Input in Linux

Eugen Hristev avatar

Eugen Hristev
August 21, 2023

Share this post:

Reading time:

In Linux, the Industrial Input/Output subsystem manages devices like Analog to Digital Converters, Light sensors, accelerometers, etc.

On the other hand, the Input subsystem handles keyboards, mice, touchscreens, and any device that has a human interface.

What happens when you have a device that is in a sense ADC, and also a touchscreen? Basically, an ADC (hence an IIO device) that can be connected to a touchscreen (hence an input device), measures the position or the point where you touch with analog-to-digital conversion. The end result, the position itself, is the kind of information that is meaningful for the kernel as user interaction and as user input.

You could think of an MFD, a multi-function device, but this is not really the case. An MFD does two distinct things, unrelated, under the same umbrella. This ADC touchscreen does just one thing, getting touch information through an ADC interface.

The GRTS (generic resistive touchscreen) driver does the bridging between an ADC touchscreen and the input subsystem. What happens is that the ADC device registers channels for the touch position (X/Y coordinates, touch pressure), which are being read by the GRTS as a consumer for the IIO, and then the GRTS registers a touchscreen in the kernel, and reports touch data further on touch events.

GRTS is not a driver for a piece of hardware, but rather a middleman in the kernel, acting as a bridge between two subsystems. In Linux, you should not have an IIO driver that acts as a touchscreen or the other way around. Imagine what would happen if a PMIC driver would start registering a video display driver. Things would easily turn into a mess!

I wrote the GRTS driver in 2018 and I am still listed as an active maintainer for it. It appears it has also been used on imx6 since its inception.

Comments (0)


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

What if C++ had decades to learn?

21/05/2025

In this second article of a three-part series, I look at how Matt Godbolt uses modern C++ features to try to protect against misusing an…

Unleashing gst-python-ml: Python-powered ML analytics for GStreamer pipelines

12/05/2025

Powerful video analytics pipelines are easy to make when you're well-equipped. Combining GStreamer and Machine Learning frameworks are the…

Matt Godbolt sold me on Rust (by showing me C++)

06/05/2025

Gustavo Noronha helps break down C++ and shows how that knowledge can open up new possibilities with Rust.

Customizing WirePlumber's configuration for embedded systems

29/04/2025

Configuring WirePlumber on embedded Linux systems can be somewhat confusing. We take a moment to demystify this process for a particular…

Evolving hardware, evolving demo: Collabora's Embedded World Board Farm

24/04/2025

Collabora's Board Farm demo, showcasing our recent hardware enablement and continuous integration efforts, has undergone serious development…

Implementing Bluetooth on embedded Linux: Open source BlueZ vs proprietary stacks

27/02/2025

If you are considering deploying BlueZ on your embedded Linux device, the benefits in terms of flexibility, community support, and long-term…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2025. All rights reserved. Privacy Notice. Sitemap.

OSZAR »