Commit e29ebbe1 authored by Etienne Carriere's avatar Etienne Carriere Committed by Johan Hedberg
Browse files

drivers: i2c: stm32: drop few redundant guards in RTIO driver



Drop few CONFIG_PM_DEVICE_RUNTIME guards, the pm_device_runtime
functions they are masking are no-op automatically when the
corresponding config option is not selected.

This change is related to the change made in the STM32 non-RTIO driver
trough commit 4f3523d9 ("i2c: stm32: drop few redundant guards").

Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
parent 181e5445
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -269,9 +269,7 @@ static int i2c_stm32_init(const struct device *dev)
		return ret;
	}

#ifdef CONFIG_PM_DEVICE_RUNTIME
	(void)pm_device_runtime_enable(dev);
#endif

	return 0;
}
+0 −4
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ int i2c_stm32_target_register(const struct device *dev,
		return ret;
	}

#if defined(CONFIG_PM_DEVICE_RUNTIME)
	/* Mark device as active */
	(void)pm_device_runtime_get(dev);

@@ -218,7 +217,6 @@ int i2c_stm32_target_register(const struct device *dev,
		LOG_DBG("i2c: enabling wakeup from stop");
		LL_I2C_EnableWakeUpFromStop(cfg->i2c);
	}
#endif /* defined(CONFIG_PM_DEVICE_RUNTIME) */

	LL_I2C_Enable(i2c);

@@ -299,13 +297,11 @@ int i2c_stm32_target_unregister(const struct device *dev,

	LL_I2C_Disable(i2c);

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

	/* Release the device */
	(void)pm_device_runtime_put(dev);