Lines Matching full:imx
40 struct pwm_imx1_chip *imx = to_pwm_imx1_chip(chip); in pwm_imx1_clk_prepare_enable() local
43 ret = clk_prepare_enable(imx->clk_ipg); in pwm_imx1_clk_prepare_enable()
47 ret = clk_prepare_enable(imx->clk_per); in pwm_imx1_clk_prepare_enable()
49 clk_disable_unprepare(imx->clk_ipg); in pwm_imx1_clk_prepare_enable()
58 struct pwm_imx1_chip *imx = to_pwm_imx1_chip(chip); in pwm_imx1_clk_disable_unprepare() local
60 clk_disable_unprepare(imx->clk_per); in pwm_imx1_clk_disable_unprepare()
61 clk_disable_unprepare(imx->clk_ipg); in pwm_imx1_clk_disable_unprepare()
67 struct pwm_imx1_chip *imx = to_pwm_imx1_chip(chip); in pwm_imx1_config() local
87 max = readl(imx->mmio_base + MX1_PWMP); in pwm_imx1_config()
90 writel(max - p, imx->mmio_base + MX1_PWMS); in pwm_imx1_config()
97 struct pwm_imx1_chip *imx = to_pwm_imx1_chip(chip); in pwm_imx1_enable() local
105 value = readl(imx->mmio_base + MX1_PWMC); in pwm_imx1_enable()
107 writel(value, imx->mmio_base + MX1_PWMC); in pwm_imx1_enable()
114 struct pwm_imx1_chip *imx = to_pwm_imx1_chip(chip); in pwm_imx1_disable() local
117 value = readl(imx->mmio_base + MX1_PWMC); in pwm_imx1_disable()
119 writel(value, imx->mmio_base + MX1_PWMC); in pwm_imx1_disable()
162 struct pwm_imx1_chip *imx; in pwm_imx1_probe() local
164 chip = devm_pwmchip_alloc(&pdev->dev, 1, sizeof(*imx)); in pwm_imx1_probe()
167 imx = to_pwm_imx1_chip(chip); in pwm_imx1_probe()
169 imx->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); in pwm_imx1_probe()
170 if (IS_ERR(imx->clk_ipg)) in pwm_imx1_probe()
171 return dev_err_probe(&pdev->dev, PTR_ERR(imx->clk_ipg), in pwm_imx1_probe()
174 imx->clk_per = devm_clk_get(&pdev->dev, "per"); in pwm_imx1_probe()
175 if (IS_ERR(imx->clk_per)) in pwm_imx1_probe()
176 return dev_err_probe(&pdev->dev, PTR_ERR(imx->clk_per), in pwm_imx1_probe()
181 imx->mmio_base = devm_platform_ioremap_resource(pdev, 0); in pwm_imx1_probe()
182 if (IS_ERR(imx->mmio_base)) in pwm_imx1_probe()
183 return PTR_ERR(imx->mmio_base); in pwm_imx1_probe()