Lines Matching +full:stm32 +full:- +full:timers
1 // SPDX-License-Identifier: GPL-2.0
3 * STM32 Low-Power Timer parent driver.
6 * Inspired by Benjamin Gaignard's stm32-timers driver
9 #include <linux/mfd/stm32-lptimer.h>
31 * Low-Power Timer supports it. in stm32_lptimer_detect_encoder()
33 ret = regmap_update_bits(ddata->regmap, STM32_LPTIM_CFGR, in stm32_lptimer_detect_encoder()
38 ret = regmap_read(ddata->regmap, STM32_LPTIM_CFGR, &val); in stm32_lptimer_detect_encoder()
42 ret = regmap_update_bits(ddata->regmap, STM32_LPTIM_CFGR, in stm32_lptimer_detect_encoder()
47 ddata->has_encoder = !!(val & STM32_LPTIM_ENC); in stm32_lptimer_detect_encoder()
54 struct device *dev = &pdev->dev; in stm32_lptimer_probe()
61 return -ENOMEM; in stm32_lptimer_probe()
67 ddata->regmap = devm_regmap_init_mmio_clk(dev, "mux", mmio, in stm32_lptimer_probe()
69 if (IS_ERR(ddata->regmap)) in stm32_lptimer_probe()
70 return PTR_ERR(ddata->regmap); in stm32_lptimer_probe()
72 ddata->clk = devm_clk_get(dev, NULL); in stm32_lptimer_probe()
73 if (IS_ERR(ddata->clk)) in stm32_lptimer_probe()
74 return PTR_ERR(ddata->clk); in stm32_lptimer_probe()
82 return devm_of_platform_populate(&pdev->dev); in stm32_lptimer_probe()
86 { .compatible = "st,stm32-lptimer", },
94 .name = "stm32-lptimer",
101 MODULE_DESCRIPTION("STMicroelectronics STM32 Low-Power Timer");
102 MODULE_ALIAS("platform:stm32-lptimer");