Hello there, a rainy summer has some (though little) advantages. I was working on my home automation issues controlled by a cubietruck. For this, I wanted the board to control various rfm12b modules that I have around the house, as well as a plug following the home-easy protocol with RF on-off keying. The rfm12b module by hope electronics is controlled via the api bus. Unfortunately, only one SPI-Bus with only one chip select is broken out on the cubietruck. The trouble I went through to make this stuff work, I begin to understand why ;)
I used the http://dl.cubieboard.org/parteners/waveshare/Source_Code/a20-cubieboard-dvk/driver%20source/spi-sun7i.c as a base for the spi-driver. The module has some obvious bugs, such as not addressing the right dma channels for the spi2 bus, or not releasing an interrupt when unloading the module, so that a second attempt to load the module crashes the kernel, to name the most significant ones. For the RFM12b control, I used https://github.com/gkaindl/rfm12b-linux It was written for the RPi, originally. The results are at https://github.com/matzrh/rfm12b-linux/ Would be happy if someone else found it useful and/or contributes to it. The on-off keying realization was achieved through some hacking in the spi-sun7i code (beyond the bug fixing) and seriously abusing the interbyte-usec parameter in the spi_transfer struct, but it achieved what I needed. Someone may want to extract these pieces (they are pretty obvious) and push spi-sun7i without the bugs to the kernel, if not done (I am using patwoods kernel as a base). Some more remarks in the README.md in my github. Best Matthias -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.