Theodor-Adrian Stana
authored
The issue was due to a bug in gpio_in, which was doing an AND with
the value of GPIO_SPI_MISO, which was set to the pin offset, instead
of what it was set in the include/syscon.h file.
When I copied the gpio functions from include/syscon.h, I overlooked
the fact that the pins for the gpio functions there are set using
wbgen macros that actually perform the shifting, and I simply copied
the functions and redefined the GPIO_SPI_MISO macros as offsets.
The issue has been fixed by redefining the gpio_in function as an
AND with the value (1 << PIN_NR). This fixes everything.
Signed-off-by:
Theodor Stana <t.stana@cern.ch>