Skip to content
David Lechner edited this page Feb 16, 2014 · 2 revisions

Remote 8-bit I/O expander for I2C bus

Sensors That Use This IC

I2C Address

0x38..0x3F (configurable via input pins)

Usage

Register device:

echo pcf8574 0x38 > /sys/bus/i2c/devices/i2c-<port+2>/new_device

Finding device class node:

for chip in $(find /sys/class/gpio -name gpiochip*)
do
    if [[ "$(cat $chip/label)" == "pcf8547" ]]
    then
        # do whatever
    fi
done

Notes

  • GPIOs are active low. There is an attribute to set this if you manually export the GPIOs in sysfs.
  • kernel docs
Clone this wiki locally