> What you could do is expose GPIO to a driver via an arch agnostic > interface.
That's exactly what I'm doing: board.h exposes (or exports) GPIO parameters and the arch agnostic interface populates corresponding struct gpiodev_s, accessible via struct gpioops_s functions, just like many other NuttX systems do > The board.h file can then indicate which pin of the GPIO to use without any > arch specific information That's hardwiring the driver and it's what I'm trying to avoid > The arch specific GPIO interface implemention > worried about how to read/write etc for pin1, whatever pin1 actually is on > the chip/board what you have. Doing this let's you write almost no board > specific code. This is very much how device trees look like in Linux. > Yes, the arch specific GPIO interface called via gpioops_s functions So we're always been in agreement