Lines Matching full:mxs
52 struct mxs_pwm_chip *mxs = to_mxs_pwm_chip(chip); in mxs_pwm_apply() local
65 ret = clk_prepare_enable(mxs->clk); in mxs_pwm_apply()
71 writel(1 << pwm->hwpwm, mxs->base + PWM_CTRL + CLR); in mxs_pwm_apply()
73 rate = clk_get_rate(mxs->clk); in mxs_pwm_apply()
100 mxs->base + PWM_ACTIVE0 + pwm->hwpwm * 0x20); in mxs_pwm_apply()
102 mxs->base + PWM_PERIOD0 + pwm->hwpwm * 0x20); in mxs_pwm_apply()
110 writel(1 << pwm->hwpwm, mxs->base + PWM_CTRL + SET); in mxs_pwm_apply()
113 clk_disable_unprepare(mxs->clk); in mxs_pwm_apply()
126 struct mxs_pwm_chip *mxs; in mxs_pwm_probe() local
136 chip = devm_pwmchip_alloc(&pdev->dev, npwm, sizeof(*mxs)); in mxs_pwm_probe()
139 mxs = to_mxs_pwm_chip(chip); in mxs_pwm_probe()
141 mxs->base = devm_platform_ioremap_resource(pdev, 0); in mxs_pwm_probe()
142 if (IS_ERR(mxs->base)) in mxs_pwm_probe()
143 return PTR_ERR(mxs->base); in mxs_pwm_probe()
145 mxs->clk = devm_clk_get(&pdev->dev, NULL); in mxs_pwm_probe()
146 if (IS_ERR(mxs->clk)) in mxs_pwm_probe()
147 return PTR_ERR(mxs->clk); in mxs_pwm_probe()
152 ret = stmp_reset_block(mxs->base); in mxs_pwm_probe()
173 .name = "mxs-pwm",
180 MODULE_ALIAS("platform:mxs-pwm");
182 MODULE_DESCRIPTION("Freescale MXS PWM Driver");