Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct offset for gpiochip0 on flat
Until kernel version 6.6 the first gpio chip's offset started at 0 due to a downstream patch of RPi. This patch was removed with 6.6 and the kernel now follows the mainline behavior whereas the offset starts as 512 ([1]). Unfortunately we rely on indexed gpio access in revpi_flat.c for the relay and button, as there is no platform device we can query. Thus keep the current implementation at least for now and add a version macro, which takes care of the offset calculation. [1] raspberrypi/linux#6037 (comment) Signed-off-by: Nicolai Buchwitz <n.buchwitz@kunbus.com>
- Loading branch information