diydrones/ardupilot — pull request #1631 by trjw (2014-11-23 23:55:04+00:00)
Title: AP_HAL_Linux: Add support for in-kernel SPI CS handling

Add support for /dev/spidev. in-kernel SPI CS handling, and convert
existing SPI devices over.

* Add a new member _subdev to the LinuxSPIDeviceDriver class, and initialiser
in LinuxSPIDevice constructor. Use subdev 0 for GPIO-managed CS
* Extend the _cs_pin to signed 16 bits and define SPI_CS_KERNEL (-1) for
kernel-managed CS
* Move to per-device file descriptors (required for in-kernel CS)
* Extend spidev filenames to include bus and subdevice numbers, possibly
longer than 1 digit each
* Allow support for platforms enumerating /dev/spidevNNN from non-zero bases
* Convert existing users over to the new API

Signed-off-by: John Williams