I have 3 PCF8574A IO expanders connected to my i2c-1 line for BeagleBone 
Black. After I enable i2c-1 line overlay I see them at addresses 0x38, 
0x39, 0x3A

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- 38 39 3a -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

Now I can do 
echo pcf8574 0x38 > /sys/class/i2c-adapter/i2c-1/new_device and the device 
shows up under /sys/bus/i2c/device/1-0038/. I wrote a quick c function that 
connects to the i2c-1 at one of the addresses and set the pin as 
INPUT/OUTPUTS and read/write values. So all is great but I was told that 
there are drivers for pcf8574 that can be used to map it to /sys/class/gpio 
which makes using it easier. Where are these drivers and how do I use them? 
I found thm here 
(https://elixir.bootlin.com/linux/v2.6.25/source/drivers/i2c/chips/pcf8574.c). 
How do I get them onto my board and do I need to map anything for IO 
expander to GPIO?

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9ffff212-f846-4ecb-8f72-fdab07339ac8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to