Lines Matching +full:stm32 +full:- +full:lptimer
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>
30 * Low-Power Timer supports it. in stm32_lptimer_detect_encoder()
32 ret = regmap_update_bits(ddata->regmap, STM32_LPTIM_CFGR, in stm32_lptimer_detect_encoder()
37 ret = regmap_read(ddata->regmap, STM32_LPTIM_CFGR, &val); in stm32_lptimer_detect_encoder()
41 ret = regmap_update_bits(ddata->regmap, STM32_LPTIM_CFGR, in stm32_lptimer_detect_encoder()
46 ddata->has_encoder = !!(val & STM32_LPTIM_ENC); in stm32_lptimer_detect_encoder()
53 struct device *dev = &pdev->dev; in stm32_lptimer_probe()
61 return -ENOMEM; in stm32_lptimer_probe()
68 ddata->regmap = devm_regmap_init_mmio_clk(dev, "mux", mmio, in stm32_lptimer_probe()
70 if (IS_ERR(ddata->regmap)) in stm32_lptimer_probe()
71 return PTR_ERR(ddata->regmap); in stm32_lptimer_probe()
73 ddata->clk = devm_clk_get(dev, NULL); in stm32_lptimer_probe()
74 if (IS_ERR(ddata->clk)) in stm32_lptimer_probe()
75 return PTR_ERR(ddata->clk); in stm32_lptimer_probe()
83 return devm_of_platform_populate(&pdev->dev); in stm32_lptimer_probe()
87 { .compatible = "st,stm32-lptimer", },
95 .name = "stm32-lptimer",
102 MODULE_DESCRIPTION("STMicroelectronics STM32 Low-Power Timer");
103 MODULE_ALIAS("platform:stm32-lptimer");