The cleanest way is to use the kernel drivers for both the display and I2C expander.
The PCF8574 has a driver at https://github.com/raspberrypi/linux/bl ... -pcf857x.c
The display is likely to be an HD44780 based panel, which has a driver in https://github.com/raspberrypi/linux/tr ... auxdisplay.
There's an overlay for driving it at https://github.com/raspberrypi/linux/bl ... verlay.dts, but that is directly connected to GPIOs. I'll see if I get 5 minutes to make up the overlay (I vaguely recall doing it before).
https://blog.microjoe.org/2019/hd44780- ... river.html is someone doing exactly the same on a similar Linux SoC, and in fact https://yeah.nah.nz/embedded/linux-chardev-lcd/ is someone doing it on the Pi.
The PCF8574 has a driver at https://github.com/raspberrypi/linux/bl ... -pcf857x.c
The display is likely to be an HD44780 based panel, which has a driver in https://github.com/raspberrypi/linux/tr ... auxdisplay.
There's an overlay for driving it at https://github.com/raspberrypi/linux/bl ... verlay.dts, but that is directly connected to GPIOs. I'll see if I get 5 minutes to make up the overlay (I vaguely recall doing it before).
https://blog.microjoe.org/2019/hd44780- ... river.html is someone doing exactly the same on a similar Linux SoC, and in fact https://yeah.nah.nz/embedded/linux-chardev-lcd/ is someone doing it on the Pi.
Statistics: Posted by 6by9 — Wed Jul 31, 2024 10:55 am