Commit 4217df50 authored by Etienne Carriere's avatar Etienne Carriere Committed by Dan Kalowsky
Browse files

drivers: i2c: stm32: exclude stm32f7 family for PM in RTIO driver



Exclude STM32F7 SoC series from PM support since that SoC doees not
yet manage power management in Zephyr and HAL API functions
LL_I2C_EnableWakeUpFromStop() and LL_I2C_DisableWakeUpFromStop()
are not implemented in the H7 HAL/LL drivers.

This change ports into the STM32 RTIO driver the change made in the
non-RTIO driver through commit 1804eb7b ("drivers: i2c: stm32:
exclude stm32f7 family for PM").

Back ported from commit 5ff3dbee ("drivers: i2c: stm32: exclude
stm32f7 family for PM in RTIO driver").

Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
parent d1a9ef6b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -213,11 +213,13 @@ int i2c_stm32_target_register(const struct device *dev,
	/* Mark device as active */
	(void)pm_device_runtime_get(dev);

#if !defined(CONFIG_SOC_SERIES_STM32F7X)
	if (pm_device_wakeup_is_capable(dev)) {
		/* Enable wake-up from stop */
		LOG_DBG("i2c: enabling wakeup from stop");
		LL_I2C_EnableWakeUpFromStop(cfg->i2c);
	}
#endif /* !CONFIG_SOC_SERIES_STM32F7X */
#endif /* defined(CONFIG_PM_DEVICE_RUNTIME) */

	LL_I2C_Enable(i2c);
@@ -300,11 +302,13 @@ int i2c_stm32_target_unregister(const struct device *dev,
	LL_I2C_Disable(i2c);

#if defined(CONFIG_PM_DEVICE_RUNTIME)
#if !defined(CONFIG_SOC_SERIES_STM32F7X)
	if (pm_device_wakeup_is_capable(dev)) {
		/* Disable wake-up from STOP */
		LOG_DBG("i2c: disabling wakeup from stop");
		LL_I2C_DisableWakeUpFromStop(i2c);
	}
#endif /* !CONFIG_SOC_SERIES_STM32F7X */
#endif /* defined(CONFIG_PM_DEVICE_RUNTIME) */

	/* Release the device */