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 <[email protected]>
> ---
> 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;


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to