Re: [RFC/PATCH] spi: s3c64xx: Enable Word transfer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+cc: Mark

On 24 September 2013 19:30, Rajeshwari S Shinde
<rajeshwari.s@xxxxxxxxxxx> wrote:
> This patch enables word transfer for s3c64xx spi driver.
> User can set bits_per_word to 32 before calling spi_setup,
> which would enable the word transfer mode.
>
> +       if(sdd->cur_bpw == 32) {

Space needed after if, else checkpatch will complain.

> +               /* For word transfer we need to swap bytes */
> +               u32 swapcfg = (S3C64XX_SPI_SWAP_TX_EN | S3C64XX_SPI_SWAP_TX_BYTE |
> +                               S3C64XX_SPI_SWAP_TX_HALF_WORD |
> +                               S3C64XX_SPI_SWAP_RX_EN |
> +                               S3C64XX_SPI_SWAP_RX_BYTE |
> +                               S3C64XX_SPI_SWAP_RX_HALF_WORD);
> +               writel(swapcfg, regs + S3C64XX_SPI_SWAP_CFG);
> +       } else
> +               writel(0, regs + S3C64XX_SPI_SWAP_CFG);

Braces necessary around else as the if block has it.

> +               if (speed != sdd->cur_speed) {
> +                       sdd->cur_speed = speed;
>                 }

Braces are not necessary here.

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux