From 97043e635fc35f6262418f60b9e03c7ccf6c570f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 9 Jun 2015 12:50:30 -0600 Subject: [PATCH] Correct write to incorrect register in EFM32 SPI driver. From Pierre-noel Bouteville. --- arch/arm/src/efm32/efm32_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/efm32/efm32_spi.c b/arch/arm/src/efm32/efm32_spi.c index 865782ebd6..c67dc3ad6e 100644 --- a/arch/arm/src/efm32/efm32_spi.c +++ b/arch/arm/src/efm32/efm32_spi.c @@ -978,7 +978,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) regval = spi_getreg(config, EFM32_USART_CTRL_OFFSET); regval &= ~(_USART_CTRL_CLKPOL_MASK | _USART_CTRL_CLKPHA_MASK); regval |= setting; - spi_putreg(config, EFM32_USART_CLKDIV_OFFSET, regval); + spi_putreg(config, EFM32_USART_CTRL_OFFSET, regval); #ifndef CONFIG_SPI_OWNBUS /* Save the mode so that subsequent re-configurations will be faster */