title: Using spi-bitbang driver
body: <p>I am writing a kernel module to read and write to SPI device (CC1200).
  My linux device does not have native SPI, so I am trying to bit-bang the bus.</p>
  
  <p>I found that linux has built-in bitbang code (linux/spi/spi_bitbang.h), but I am confused how to set it up. It needs structs as spi_device and spi_master, each requiring struct device, which requires structs as kobject and many many more, most of them I have no idea what to do with them, and how they are needed for simple bit-banging.</p>
  
  <p>I have looked online for examples, but i found literally none. Not a single use of the included bitbang code, only some references that it is "easy"</p>
  
  <p>I will be very thankful for any help, maybe the bitbang lib is not even the good path. Maybe I can write my own (how to do it efficiently? I have 4 cores, but it is running lots of stuff in the background)</p>
  
  <p>Thanks</p>