January 22, 20233 yr 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 !?!
January 23, 20233 yr Solution 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.
January 23, 20233 yr Author 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!
January 23, 20233 yr well, I've been messing with Linux kernel and especially sunxi drivers for several years
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.