
Configure Pin Multiplexing With pinctrl in a Device Tree
Select a pin's function with pinctrl-names and pinctrl-0, define groups in the SoC's pin controller node and check the result in debugfs.
Everything you need to level up your coding skills.

Select a pin's function with pinctrl-names and pinctrl-0, define groups in the SoC's pin controller node and check the result in debugfs.

Add a TMP102 temperature sensor to an I2C bus in a device tree with compatible, reg and status, then check that Linux bound the driver and exposes a reading.

Use dtc to compile a .dts into a .dtb, turn a .dtb back into readable source and read the warnings it prints. The flags that matter, with exact commands.

A device tree is a data file that tells the Linux kernel what hardware a board has, because ARM chips cannot be probed. Learn what is in it and why it exists.

Read and write device registers from the shell with i2cget, i2cset, i2cdump and i2ctransfer from i2c-tools 4.3, using a TMP102 sensor as the worked example.

Enable /dev/i2c-N, list adapters with i2cdetect -l, scan a bus with i2cdetect -y and read the address grid, including reserved ranges and missing devices.

Blink an LED, read a button and wait for edge events from Python 3.12 with the libgpiod 2.1 gpiod module, using request_lines and LineSettings.

Drive an LED and read a button from the shell with gpioset and gpioget from libgpiod 2.1 on Linux 6.12, including toggling, timed pulses and bias.

List GPIO chips with gpiodetect and read every line's name, direction and consumer with gpioinfo from libgpiod 2.1 on Linux 6.12, then pick the line you want.

The /sys/class/gpio interface is deprecated in Linux 6.12 because of unstable numbering, leaked pins, races and missing features. Here is what replaced it.

Cross-compile C, Autotools, CMake, Meson, Go and Rust programs for an embedded Linux board with a toolchain and sysroot, and fix the errors you will hit.

How the Linux 6.12 device model binds drivers to devices, and how platform drivers use device tree, devres and runtime PM to expose hardware through subsystems.
We send one email when a new post is published. No spam.