Tibi Posted January 22, 2023 Posted January 22, 2023 Hello, I'm turning my head around this problem, I have read numerous forum posts and docs but I didn't found an answer: Following https://linux-sunxi.org/GPIO, the same pin number calculation applies for sysfs and gpiod. But, for example, for PL2 it will be 11*32+2=354, or for opi3 lts there are only 255 line numbers for gpiochip1 (as per `gpioinfo gpiochip1`) :-S Pleeease tell me what am I missing !?! 0 Quote
Solution jernej Posted January 23, 2023 Solution Posted January 23, 2023 That wiki article is missing explanation how to calculate pin number in case of multiple pin controllers. PL2 is on second controller, where first port is "L". So pin number calculation is actually 0 * 32 + 2 = 2. 0 Quote
Tibi Posted January 23, 2023 Author Posted January 23, 2023 Thank you! I wouldn't find this by myself in a 1k years !!! (how did you?) In fact.. to add assault... gpiochip1 is the first chip and gpiochip0 is the second... So PL2 is line 2 on gpiochip0 eat this! 0 Quote
jernej Posted January 23, 2023 Posted January 23, 2023 well, I've been messing with Linux kernel and especially sunxi drivers for several years 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.