Other approaches

On ARM based systems, I think one would use Device Tree6 to connect the PXA2xx low-level driver to the spidev driver. This avoids any need to compile code.

The MinnowBoard Max has an Intel CPU though, so rather than Device Tree, the relevant technology is ACPI7

I didn’t explore either of these, because in practice I didn’t want a userspace API at all. Instead I compiled a kernel driver for the SPI LCD display I wanted to drive, and then exported a framebuffer API to userspace.