Re: [PATCH] spi: spi-omap2-mcspi.c: Add dts for slave deviceconfiguration.

From: Mark Brown
Date: Wed Apr 17 2013 - 11:11:34 EST


On Tue, Mar 26, 2013 at 12:00:15AM +0100, Matthias Brugger wrote:

> +- The spi slave nodes can provide the following information which is used
> + by the spi controller.

> +- ti,spi-cs-per-word: Set chipselect to be toggled on every word send.

Why is this part of the DT binding for the SPI controller? Surely if
the devices attached to the SPI bus want to configure this they should
be setting things up appropriately in the transfers? There might be
devices that both want and do not want this on the same bus for example,
and this isn't something that should depend on controller support.

> +- ti,spi-turbo-mode: Set turbo mode for this device.

> + controller-data {
> + ti,spi-cs-per-word = <1>;
> + ti,spi-turbo-mode = <0>;

Better to use a boolean property here - check with of_find_property() to
see if the property is defined at all rather than using a value.

Attachment: signature.asc
Description: Digital signature