drivers: counter: Properly deprecate Kconfig symbols in STM32 RTC driver
Now that both RTC source clock Kconfig symbols are disabled by default,
we invert the ifdef so that in the absence of configuration we still
fall in the LSI configuration.
@@ -451,15 +451,15 @@ static int rtc_stm32_init(const struct device *dev)
static struct rtc_stm32_data rtc_data;
#if DT_INST_NUM_CLOCKS(0) == 1
-#warning Kconfig COUNTER_RTC_STM32_CLOCK_LS* are deprecated. Please define clock source in dtsi file
+#warning STM32 RTC needs a kernel source clock. Please define it in dts file
static const struct stm32_pclken rtc_clk[] = {
STM32_CLOCK_INFO(0, DT_DRV_INST(0)),
- /* Use Kconfig to configure source clocks fields */
+ /* Use Kconfig to configure source clocks fields (Deprecated) */
/* Fortunately, values are consistent across enabled series */
-#ifdef COUNTER_RTC_STM32_CLOCK_LSI
- {.bus = STM32_SRC_LSI, .enr = RTC_SEL(2)}
-#else
+#ifdef CONFIG_COUNTER_RTC_STM32_CLOCK_LSE
{.bus = STM32_SRC_LSE, .enr = RTC_SEL(1)}
+#else
+ {.bus = STM32_SRC_LSI, .enr = RTC_SEL(2)}
#endif
};
#else
