I think using offsets calculated at startup is sensible. The ultra cautious would start at 0 (2?) and count up until the first GPIO<n> name match, but even in the upstream dtbs there must be some label which is present in all boards.
Statistics: Posted by PhilE — Sun Mar 17, 2024 4:34 pm