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

Re-converging control flow on NVIDIA GPUs - What went wrong, and how we fixed it

25/04/2024

While I managed to land support for two extensions, implementing control flow re-convergence in NVK did not go as planned. This is the story…

Automatic regression handling and reporting for the Linux Kernel

14/03/2024

In continuation with our series about Kernel Integration we'll go into more detail about how regression detection, processing, and tracking…

Almost a fully open-source boot chain for Rockchip's RK3588!

21/02/2024

Now included in our Debian images & available via our GitLab, you can build a complete, working BL31 (Boot Loader stage 3.1), and replace…

What's the latest with WirePlumber?

19/02/2024

Back in 2022, after a series of issues were found in its design, I made the call to rework some of WirePlumber's fundamentals in order to…

DRM-CI: A GitLab-CI pipeline for Linux kernel testing

08/02/2024

Continuing our Kernel Integration series, we're excited to introduce DRM-CI, a groundbreaking solution that enables developers to test their…

Persian Rug, Part 4 - The limitations of proxies

23/01/2024

This is the fourth and final part in a series on persian-rug, a Rust crate for interconnected objects. We've touched on the two big limitations:…

Open Since 2005 logo

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

Collabora Ltd © 2005-2024. All rights reserved. Privacy Notice. Sitemap.