[PATCH 2/5] spi: add controller driver for Atheros AR7XXX/AR9XXX SoCs

Antony Pavlov antonynpavlov at gmail.com
Mon Apr 7 00:59:48 PDT 2014


On Mon, 7 Apr 2014 09:38:56 +0200
Sascha Hauer <s.hauer at pengutronix.de> wrote:

> On Sat, Apr 05, 2014 at 10:35:31PM +0400, Antony Pavlov wrote:
> > +static int ath79_spi_setup(struct spi_device *spi)
> > +{
> > +	struct spi_master *master = spi->master;
> > +	struct device_d spi_dev = spi->dev;
> > +
> > +	if (spi->bits_per_word != 8) {
> > +		dev_err(master->dev, "master doesn't support %d bits per word requested by %s\n",
> > +			spi->bits_per_word, spi_dev.name);
> > +		return -1;
> > +	}
> > +
> > +	if ((spi->mode & (SPI_CPHA | SPI_CPOL)) != SPI_MODE_0) {
> > +		dev_err(master->dev, "master doesn't support SPI_MODE%d requested by %s\n",
> > +			spi->mode & (SPI_CPHA | SPI_CPOL), spi_dev.name);
> > +		return -1;
> > +	}
> 
> Better -EINVAL?
> 
> Otherwise this series looks good.
>
 
Sure!

I'll resend the series.
 
-- 
Best regards,
  Antony Pavlov



More information about the barebox mailing list