Message ID | 1392257895.3964.2.camel@phoenix (mailing list archive) |
---|---|
State | Accepted |
Commit | d31ad46f58e89fdb9f5b902aa7cc29689e123dde |
Headers | show |
On Thu, Feb 13, 2014 at 10:18:15AM +0800, Axel Lin wrote: > Current code in sun6i_spi_set_cs() actually clears CPHA and CPOL bits which is > obvious wrong. The define for SUN6I_TFR_CTL_CS_MASK is wrong. Fix it. > > Signed-off-by: Axel Lin <axel.lin@ingics.com> Oops, good catch. Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Thanks! Maxime
On Thu, Feb 13, 2014 at 10:18:15AM +0800, Axel Lin wrote: > Current code in sun6i_spi_set_cs() actually clears CPHA and CPOL bits which is > obvious wrong. The define for SUN6I_TFR_CTL_CS_MASK is wrong. Fix it. Applied, thanks.
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c index 94d38d0..dacc8d6 100644 --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -36,8 +36,8 @@ #define SUN6I_TFR_CTL_CPHA BIT(0) #define SUN6I_TFR_CTL_CPOL BIT(1) #define SUN6I_TFR_CTL_SPOL BIT(2) -#define SUN6I_TFR_CTL_CS_MASK 0x3 -#define SUN6I_TFR_CTL_CS(cs) (((cs) & SUN6I_TFR_CTL_CS_MASK) << 4) +#define SUN6I_TFR_CTL_CS_MASK 0x30 +#define SUN6I_TFR_CTL_CS(cs) (((cs) << 4) & SUN6I_TFR_CTL_CS_MASK) #define SUN6I_TFR_CTL_CS_MANUAL BIT(6) #define SUN6I_TFR_CTL_CS_LEVEL BIT(7) #define SUN6I_TFR_CTL_DHB BIT(8)
Current code in sun6i_spi_set_cs() actually clears CPHA and CPOL bits which is obvious wrong. The define for SUN6I_TFR_CTL_CS_MASK is wrong. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> --- drivers/spi/spi-sun6i.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)