diff --git a/ChangeLog b/ChangeLog index 2579eb94888..d5980f37f50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2134,3 +2134,12 @@ * arch/arm/src/sam3u/sam3u_spi.c: Add an SPI driver for the AT91SAM3U. * drivers/input/ads7843e.c and include/nuttx/input/ads7843e.h: Add a driver for the TI ADS7843E touchscreen controller. + * fs/nxffs/nxffs_open.c: Fix an error when a file is open for writing; since + the file will get deleted it is already exists, there must be a check if + there are other open references to the file. + * arch/arm/src/stm32/stm32_sdio.c: Fixed an error where during SDHC + initialization interrupts were not being re-enabled. Caused more subtle + errors than you would think. + * arch/arm/src/stm32/stm32_i2c.c: Fixed an error where I2C timeouts appeared + to be successful transfers. + diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c index 74d403648a7..1737850ee02 100644 --- a/arch/arm/src/stm32/stm32_i2c.c +++ b/arch/arm/src/stm32/stm32_i2c.c @@ -1212,12 +1212,12 @@ static int stm32_i2c_init(FAR struct stm32_i2c_priv_s *priv) /* Configure pins */ - if (stm32_configgpio(GPIO_I2C1_SCL)==ERROR) + if (stm32_configgpio(GPIO_I2C1_SCL) < 0) { return ERROR; } - if (stm32_configgpio(GPIO_I2C1_SDA)==ERROR) + if (stm32_configgpio(GPIO_I2C1_SDA) < 0) { stm32_unconfiggpio(GPIO_I2C1_SCL); return ERROR; @@ -1246,12 +1246,12 @@ static int stm32_i2c_init(FAR struct stm32_i2c_priv_s *priv) /* Configure pins */ - if (stm32_configgpio(GPIO_I2C2_SCL)==ERROR) + if (stm32_configgpio(GPIO_I2C2_SCL) < 0) { return ERROR; } - if (stm32_configgpio(GPIO_I2C2_SDA)==ERROR) + if (stm32_configgpio(GPIO_I2C2_SDA) < 0) { stm32_unconfiggpio(GPIO_I2C2_SCL); return ERROR; @@ -1451,7 +1451,7 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms * the BUSY flag. */ - if (stm32_i2c_sem_waitdone(priv) == ERROR) + if (stm32_i2c_sem_waitdone(priv) < 0) { status = stm32_i2c_getstatus(priv); errval = ETIMEDOUT; diff --git a/arch/arm/src/stm32/stm32_sdio.c b/arch/arm/src/stm32/stm32_sdio.c index 7e6c60868fe..0830afb4f6a 100644 --- a/arch/arm/src/stm32/stm32_sdio.c +++ b/arch/arm/src/stm32/stm32_sdio.c @@ -1411,6 +1411,8 @@ static void stm32_reset(FAR struct sdio_dev_s *dev) /* (Re-)enable clocking */ putreg32(1, SDIO_CLKCR_CLKEN_BB); + irqrestore(flags); + fvdbg("CLCKR: %08x POWER: %08x\n", getreg32(STM32_SDIO_CLKCR), getreg32(STM32_SDIO_POWER)); } diff --git a/drivers/input/tsc2007.c b/drivers/input/tsc2007.c index e6e570d6293..61b48fbd495 100644 --- a/drivers/input/tsc2007.c +++ b/drivers/input/tsc2007.c @@ -1187,6 +1187,7 @@ int tsc2007_register(FAR struct i2c_dev_s *dev, */ #ifdef CONFIG_TSC2007_MULTIPLE + flags = irqsave(); priv->flink = g_tsc2007list; g_tsc2007list = priv; irqrestore(flags);