Driver — subsystem integration¶
Every RPBridge capability surfaces through the canonical Linux subsystem for its class. No private character devices for bus access.
GPIO¶
- Driver:
rpbridge-gpioaux child registers astruct gpio_chipwithnrlines taken from the capability map. - IRQs: nested
irq_chip, GPIO cdev v2 only (GPIO_V2_LINE_*ioctls). sysfs GPIO is not provided — deprecated since 4.8. - Tools:
libgpiod 2.x(gpioget,gpioset,gpiomon).
gpiodetect | grep rpbridge
gpioinfo $(gpiodetect | awk '/rpbridge/ {print $1}')
gpiomon -r -f $(gpiodetect | awk '/rpbridge/ {print $1}') 7
I²C¶
- Driver:
rpbridge-i2caux child registers ani2c_adapterwithI2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL. - Tools:
i2c-tools(i2cdetect,i2cget,i2cset,i2ctransfer), any kernel-side I²C client driver.
i2cdetect -y 7
i2cget -y 7 0x76 0xD0 # read BME280 id register
i2cset -y 7 0x76 0xF4 0x27 # set BME280 ctrl_meas
SPI¶
- Driver:
rpbridge-spiaux child registers anspi_controller. - Tools:
spidevvia/dev/spidevN.M,flashrom, any kernel-side SPI client driver.
PWM¶
- Driver:
rpbridge-pwmaux child registers apwm_chip. - Tools: sysfs PWM API under
/sys/class/pwm/pwmchipN,pwm-ctrl, or kernel consumer drivers likepwm-beeper.
echo 0 > /sys/class/pwm/pwmchip0/export
echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 500000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
IIO (ADC)¶
- Driver:
rpbridge-iioaux child registers aniio_devwith four channels mapped to GP26..GP29. - Tools:
iio_info,iio_readdev,libiio, Grafana's IIO plugin.
CAN¶
CAN is not carried by this module. The RPBridge firmware exposes
a gs_usb-compatible vendor interface on the same composite device;
mainline drivers/net/can/usb/gs_usb.ko binds it directly and
presents a standard SocketCAN network device.
UART¶
UART is also not carried by this module. Three CDC-ACM pairs on
the composite device present as /dev/ttyACMN; mainline usbser.ko
handles them. The RPBridge driver does, however, handle the UART
phy selection (RS232 / RS485 / TTL) via an RPBP control command —
call it through rpbridge-ctl set-phy.