Commit 1804eb7b authored by Fabrice DJIATSA's avatar Fabrice DJIATSA Committed by Daniel DeGrasse
Browse files

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: default avatarFabrice DJIATSA <fabrice.djiatsa-ext@st.com>
parent 09778c36
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -439,11 +439,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 */

	LL_I2C_Enable(i2c);

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

#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 */

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

	return 0;
}

#endif /* defined(CONFIG_I2C_TARGET) */

void i2c_stm32_event(const struct device *dev)