Skip to content

Commit 999c9a3

Browse files
ajarmouni-sthenrikbrixandersen
authored andcommitted
drivers: counter: stm32_rtc: fix clk disable for WBAX
clock_control_on() was called instead of clock_control_off(). Signed-off-by: Abderrahmane Jarmouni <[email protected]> (cherry picked from commit c09f1ec)
1 parent 1c606f5 commit 999c9a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/counter/counter_ll_stm32_rtc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static int rtc_stm32_start(const struct device *dev)
191191

192192
/* Enable RTC bus clock */
193193
if (clock_control_on(clk, (clock_control_subsys_t) &cfg->pclken[0]) != 0) {
194-
LOG_ERR("clock op failed\n");
194+
LOG_ERR("RTC clock enabling failed\n");
195195
return -EIO;
196196
}
197197
#else
@@ -212,9 +212,9 @@ static int rtc_stm32_stop(const struct device *dev)
212212
const struct device *const clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
213213
const struct rtc_stm32_config *cfg = dev->config;
214214

215-
/* Enable RTC bus clock */
216-
if (clock_control_on(clk, (clock_control_subsys_t) &cfg->pclken[0]) != 0) {
217-
LOG_ERR("clock op failed\n");
215+
/* Disable RTC bus clock */
216+
if (clock_control_off(clk, (clock_control_subsys_t) &cfg->pclken[0]) != 0) {
217+
LOG_ERR("RTC clock disabling failed\n");
218218
return -EIO;
219219
}
220220
#else

0 commit comments

Comments
 (0)