[PATCH V2 1/2] spi: dual and quad support(device tree)
Stephen Warren
swarren at wwwdotorg.org
Fri Aug 30 17:20:13 EDT 2013
On 08/26/2013 06:50 PM, wangyuhang wrote:
> fix two things in patch:
> commit id:f477b7fb13df2b843997559ff34e87d054ba6538
>
> 1.change the name of property: spi-tx-nbits and spi-rx-nbits to
> spi-tmax-nbits and spi-rmax-nbits, aimed to make that name different
> from the member of spi_transfer(tx_nbits and rx_nbits). using tmax
> and rmax here to describe that it is the max transfer bits that the
> members in spi_transfer(tx_nbits and rx_nbits) can reach.
> 2.change property spi-tmax-nbits and spi-rmax-nbits to optional.
> If User don't set spi-tmax-nbits or spi-rmax-nbits, spi device mode
> should be regarded as SINGLE, not return an error. In such case, user
> don't have to modify the old dts files to fit the new spi framework.
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> + } else {
> + switch (be32_to_cpup(prop)) {
> + case SPI_NBITS_SINGLE:
> + break;
> + case SPI_NBITS_DUAL:
> + spi->mode |= SPI_TX_DUAL;
> + break;
> + case SPI_NBITS_QUAD:
> + spi->mode |= SPI_TX_QUAD;
> + break;
> + default:
> + dev_err(&master->dev,
> + "spi-tmax-nbits value is not supported\n");
> + spi_dev_put(spi);
> + continue;
You're missing a closing brace here; this patch doesn't compile...
> }
More information about the linux-mtd
mailing list