mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/5] spi: add controller driver for Atheros AR7XXX/AR9XXX SoCs
Date: Mon, 7 Apr 2014 09:38:56 +0200	[thread overview]
Message-ID: <20140407073856.GJ27055@pengutronix.de> (raw)
In-Reply-To: <1396722934-23818-3-git-send-email-antonynpavlov@gmail.com>

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.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-04-07  7:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-05 18:35 [PATCH 0/5] add SPI " Antony Pavlov
2014-04-05 18:35 ` [PATCH 1/5] spi: import bitbang txrx utility functions from linux Antony Pavlov
2014-04-05 18:35 ` [PATCH 2/5] spi: add controller driver for Atheros AR7XXX/AR9XXX SoCs Antony Pavlov
2014-04-07  7:38   ` Sascha Hauer [this message]
2014-04-07  7:59     ` Antony Pavlov
2014-04-05 18:35 ` [PATCH 3/5] MIPS: ar9331.dtsi: add SPI master Antony Pavlov
2014-04-05 18:35 ` [PATCH 4/5] MIPS: tplink-mr3020.dts: add S25FL032PIF SPI flash chip Antony Pavlov
2014-04-05 18:35 ` [PATCH 5/5] MIPS: tplink-mr3020_defconfig: add SPI support Antony Pavlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140407073856.GJ27055@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox