Emulating Devices in Linux Using Greybus Subsystem - Vaishnav Mohandas Achath, Texas Instruments
Channel: The Linux Foundation
Date: 2023-10-04

Emulating Devices in Linux Using Greybus Subsystem - Vaishnav Mohandas Achath, Texas Instruments

Greybus is an application layer protocol in the Linux kernel developed as part of Google's Project Ara modular smartphone. Greybus has strong roots within Linux kernel subsystems and supports interacting with devices on buses like USB, I2C, and SPI. Greybus protocol exposes these bus transactions as a set of greybus requests and responses that are transport agnostic. This session discusses making use of the greybus framework to emulate devices on a Linux host and using the greybus device discovery mechanism to hot-plug/unplug these virtual devices thus helping in rapid prototyping, development, and testing. The session will include a live demo of emulating an I2C sensor device and a USB HID device on the Linux host using the greybus subsystem, interacting with corresponding device drivers, and subsystems, and familiarizing with necessary userspace tools. Linux kernel has 1000s of device drivers but automated testing for these device drivers is limited, the method discussed in this session makes it easy to perform automated testing and Continuous Integration (CI) for 1000s of device drivers in Linux kernel, this method also is helpful in prototyping and developing device drivers or userspace tools/frameworks when actual hardware is not yet available thus accelerating development.