Skip to content

Commit 1804eb7

Browse files
djiatsaf-stdanieldegrasse
authored andcommitted
drivers: i2c: stm32: exclude stm32f7 family for PM
The STM32F7 family does not yet support power management in Zephyr. Besides, LL_I2C_EnableWakeUpFromStop and LL_I2C_DisableWakeUpFromStop are not implemented in the H7 HAL/LL drivers Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
1 parent 09778c3 commit 1804eb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/i2c/i2c_ll_stm32_v2.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,13 @@ int i2c_stm32_target_register(const struct device *dev,
439439
/* Mark device as active */
440440
(void)pm_device_runtime_get(dev);
441441

442+
#if !defined(CONFIG_SOC_SERIES_STM32F7X)
442443
if (pm_device_wakeup_is_capable(dev)) {
443444
/* Enable wake-up from stop */
444445
LOG_DBG("i2c: enabling wakeup from stop");
445446
LL_I2C_EnableWakeUpFromStop(cfg->i2c);
446447
}
448+
#endif /* CONFIG_SOC_SERIES_STM32F7X */
447449

448450
LL_I2C_Enable(i2c);
449451

@@ -526,11 +528,13 @@ int i2c_stm32_target_unregister(const struct device *dev,
526528
LL_I2C_Disable(i2c);
527529
}
528530

531+
#if !defined(CONFIG_SOC_SERIES_STM32F7X)
529532
if (pm_device_wakeup_is_capable(dev)) {
530533
/* Disable wake-up from STOP */
531534
LOG_DBG("i2c: disabling wakeup from stop");
532535
LL_I2C_DisableWakeUpFromStop(i2c);
533536
}
537+
#endif /* CONFIG_SOC_SERIES_STM32F7X */
534538

535539
/* Release the device */
536540
(void)pm_device_runtime_put(dev);
@@ -539,7 +543,6 @@ int i2c_stm32_target_unregister(const struct device *dev,
539543

540544
return 0;
541545
}
542-
543546
#endif /* defined(CONFIG_I2C_TARGET) */
544547

545548
void i2c_stm32_event(const struct device *dev)

0 commit comments

Comments
 (0)