This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

userspace spidev dissappear after I swap the SPI MOSI / MISO

I've follow the instructions from [1] and [2] (I used [1]) to add spidev1.0 to userspace. I've been working with those spi port without an issue until when I try to swap the MOSI/MISO setting:

I tried to swap the MOSI / MISO pin on the Beaglebone - by kernel default the MOSI is set to pin 18 (spi0_d1) and MISO is set to pin 21 (spi0_d0). I modify the McSPI Channel configuration register in the spi-omap2-mcspi.c file in /KERNEL/driver/spi (p.4195 AM335 Tech Ref Manual): 
 
l &= ~(OMAP2_MCSPI_CHCONF_DPE0);
l |= (OMAP2_MCSPI_CHCONF_IS|OMAP2_MCSPI_CHCONF_DPE1);
 
This should set data line 0 (spi0_d0) to output (MOSI) and datal line 1 (spi0_d1) to input (MISO).
 
Once I did that and recompile the kernel, my two userspace driver no longer exist in the /dev directory

I'm wondering if I'm missing something - other than spi-omap2-mcspi.c, is there something else I need to modify in order to get userspace spidev with flipped MOSI / MISO?
 
I'm using Robert Nelsons' Linux Kernel.

Many thanks!
  • Thanks, got it to work - somehow, it seems that some of the .o file are not recompiled if I didn't delete them - so I deleted the spi-omap2-mcspi.o and board-am335xevm.o, recompile the kernel, got it work work again.