If the only thing you want is using SPI in usermode, then just use Linux SPI driver with proper device tree setting; google enable Beaglebone Black SPI.
But what you want is proper pinmuxing - not limited to SPI device - during runtime, then you have to write some kernel module so that it can write control register in privileged mode; to write on control register for pinmuxing, you have to be in privileged mode, refer technical reference manual or TRM on this.
Reading your message agin, It seems that you already have linux driver code then you don't have to mind privileged mode thing for you already in it. I'm afraid that I can provide any meaningful help on your driver code, however.
Sent from my iPad