PCF8574(4)
π PCF8574(4) β like, the Kernel Interfaces Manual page, bestie π
okay so picture this: it's a manual page for pcf8574, and it lives in section 4 of the Kernel Interfaces Manual. that's the whole vibe. now let me tell you what this lil guy actually does β¨
πΈ NAME πΈ
pcf8574 β the driver for the PCF8574 8-bit I2C IO expander. yes she's an IO expander and yes she's iconic π
π¦ SYNOPSIS π¦
so if you wanna compile this driver into the kernel (main character energy, permanently in the build), you drop these lines into your kernel configuration file:
device pcf8574
device gpio
device iicbus
OR β and this is the lowkey easier route β you can load the driver as a module at boot time instead, by putting this line in loader.conf(5):
pcf8574_load="YES"
pick your fighter π«Ά
β¨ DESCRIPTION β¨
the pcf8574 driver gives you gpiobus(4) control over 8 GPIO pins. eight!! a whole little octet of them π
here's the tea though, and it's important: the pins are quasi-bidirectional. only low output can be actively driven. a high output is literally just equivalent to input. so don't come for her expecting push-pull realness, okay? she's doing her best π
on an FDT(4) based system, these properties must be set β no cap:
compatibleβ must be set to"nxp,pcf8574". exactly that. character for character. πregβ the I2C address ofpcf8574.
and the DTS part for a pcf8574 device usually looks like this, slay:
/ {
...
pcf8574@27 {
compatible = "nxp,pcf8574";
reg = <0x27>;
};
};
look at that lil 0x27 address living its best life π
π SEE ALSO π
fdt(4), gpiobus(4), iicbus(4) β go read those too, iykyk π
π HISTORY π
the pcf8574 driver and this manual page were written by Andriy Gapon <avg@FreeBSD.org>. we stan a legend π«‘π
π BUGS π
okay so here's the one thing to know: the pcf8574 driver does not support the input change interrupt that the hardware provides. the hardware has it, the driver just... doesn't do it π not me pointing that out but like, someone had to
and that's the whole page bestie!! source/version is Debian and it's dated November 6, 2021 β mwah, go expand some IO π β¨π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- π the page's license: BSD-2-Clause
- Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms