Multiple overlays
Closed this issue · 1 comments
I'm not sure I'm understanding the readme, but I guessed if I wanted to use all pins, I'd do the following:
config-pin overlay cape-universal
config-pin overlay cape-univ-emmc
config-pin overlay cape-univ-hdmi
This works fine for me, but once I try to configure the pins I get this error for a number of them:
WARNING: GPIO pin not exported, cannot set direction or value!
It seems the GPIO sysfs files (/sys/class/gpio/gpio*/direction
) aren't there for the last two overlays (emmc, hdmi), but they are for the first loaded overlay. This also goes when I switch the order in which I load the overlays. It seems only the first one loads correctly, all overlays after that cannot be used correctly.
If I check the slots
file it seems the overlays are loaded correctly. You can also see that I've disabled the default capes in uEnv.txt
:
$ cat /sys/devices/bone_capemgr.9/slots
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-- Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
7: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-univ-emmc
8: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-univ-hdmi
9: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-universal
I've used the following config-pin file to test what was happening: https://gist.github.com/bobvanderlinden/7fa5012acf00eac1bd0e
I've tried all this with the latest machinekit image on a BeagleBone Black.
Is this the correct way to use config-pin? Could you give some more information that would let me use any pin as gpio?
It seems like the pin export helper doesn't like being called more than once. A workaround is to have a combined version of the cape as you implemented in #30.