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

On 12/04/2012 07:27 AM, Axel Lin wrote:
> 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

Hi Axel,

Thanks for the patch. But the code is correct as it is. The CPHA definition
of the chip is inverted to that of Linux.

Thanks,
- Lars


> 
>  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;

      reply	other threads:[~2012-12-05 17:39 UTC|newest]

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

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=50BF86B8.4020805@metafoo.de \
    --to=lars@metafoo.de \
    --cc=axel.lin@ingics.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --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.