Closed EAGrahamJr closed 1 year ago
Can you share the output of these commands please:
gpiodetect
uname -a
For reference I get:
gpiochip0 [pinctrl-bcm2711] (58 lines)
gpiochip1 [raspberrypi-exp-gpio] (8 lines)
Then gpioinfo 1
outputs:
gpiochip1 - 8 lines:
line 0: "BT_ON" unused output active-high
line 1: "WL_ON" unused output active-high
line 2: "PWR_LED_OFF" "led1" output active-low [used]
line 3: "GLOBAL_RESET" unused output active-high
line 4: "VDD_SD_IO_SEL" "vdd-sd-io" output active-high [used]
line 5: "CAM_GPIO" "cam1_regulator" output active-high [used]
line 6: "SD_PWR_ON" "sd_vcc_reg" output active-high [used]
line 7: "SD_OC_N" unused input active-high
It would appear you have gpiochip1 configured as gpiochip2. The code gracefully handles this so I will downgrade the warning to a debug message.
Now that's odd - Pi3 gives this hence the warning (not sure where brcmvirt-gpio
is coming from):
gpiochip0 [pinctrl-bcm2835] (54 lines)
gpiochip1 [brcmvirt-gpio] (2 lines)
gpiochip2 [raspberrypi-exp-gpio] (8 lines)
Leave it with me.
Concur with the above output for gpiodetect
$ uname -a
Linux marvin 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux
gpioinfo 1
Opened Chip: gpiochip1 [brcmvirt-gpio] - (2 lines)
line 0: "" "led0" output active-high [used]
line 1: "" unused input active-high
FYI this is actually an interesting error. I had naively assumed gpiochip numbers would be consistent at least across 2B/3B/4B models. I’m in the process of adding functionality to map by gpiochip label, eg “pinctrl-bcm2835”, “raspberrypi-exp-gpio”.
Verified.
This is (obviously) handled without issue (nice one!), but I have been seeing these warnings:
Raspberry Pi 3 Model B Rev 1.2
Since I only have one Pi to test with, I'm not sure this is an actual issue that needs adjustment.