spibus now correctly handles mode and clock ivar settings via ioctl, in addition to the CS polarity bit SPIBUS_CS_HIGH.
The current implementation of bcm2835_spi.c masks the SPIBUS_CS_HIGH bit and does not use it. The code modifications below make use of it by setting the SPI_CS_CSPOL bit in the device's CS control register.
Additionally, the mode (SPIBUS_IVAR_MODE) and clock (SPIBUS_IVAR_CLOCK) values are correctly set for the driver on a per-transaction basis.
Since the definition of the 'clock' value is the MAXIMUM clock speed, the driver modifications will lower the SPI device's clock speed to match the setting of 'clock' in the ivars, if the currently assigned bus speed is higher than that for 'clock' in the ivars. it also respects a 'clock' value of '0' (i.e. 'use default').
This may be the only driver making use of 'clock' and so it's worth reviewing how it's implemented here, to make sure it's "the right way".