All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Grant Likely <grant.likely@secretlab.ca>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	spi-devel-general@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH RFT] spi: spi-xcomm: Fix wrong setting for SPI_XCOMM_SETTINGS_CPHA
Date: Tue, 04 Dec 2012 14:27:41 +0800	[thread overview]
Message-ID: <1354602461.3286.1.camel@phoenix> (raw)

The logic of setting SPI_XCOMM_SETTINGS_CPHA bit is reversed.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Lars,
The logic of setting SPI_XCOMM_SETTINGS_CPHA bit looks wrong to me.
Can you check if this patch works?

Thanks,
Axel

 drivers/spi/spi-xcomm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
index 266a847..c2a3e8f 100644
--- a/drivers/spi/spi-xcomm.c
+++ b/drivers/spi/spi-xcomm.c
@@ -99,9 +99,9 @@ static int spi_xcomm_setup_transfer(struct spi_xcomm *spi_xcomm,
 		*settings &= ~SPI_XCOMM_SETTINGS_CPOL;
 
 	if (spi->mode & SPI_CPHA)
-		*settings &= ~SPI_XCOMM_SETTINGS_CPHA;
-	else
 		*settings |= SPI_XCOMM_SETTINGS_CPHA;
+	else
+		*settings &= ~SPI_XCOMM_SETTINGS_CPHA;
 
 	if (spi->mode & SPI_3WIRE)
 		*settings |= SPI_XCOMM_SETTINGS_3WIRE;
-- 
1.7.9.5

             reply	other threads:[~2012-12-04  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04  6:27 Axel Lin [this message]
2012-12-05 17:39 ` [PATCH RFT] spi: spi-xcomm: Fix wrong setting for SPI_XCOMM_SETTINGS_CPHA Lars-Peter Clausen

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=1354602461.3286.1.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.