Lines Matching full:lpc32xx

33 	struct lpc32xx_pwm_chip *lpc32xx = to_lpc32xx_pwm_chip(chip);  in lpc32xx_pwm_config()  local
37 c = clk_get_rate(lpc32xx->clk); in lpc32xx_pwm_config()
55 val = readl(lpc32xx->base); in lpc32xx_pwm_config()
58 writel(val, lpc32xx->base); in lpc32xx_pwm_config()
65 struct lpc32xx_pwm_chip *lpc32xx = to_lpc32xx_pwm_chip(chip); in lpc32xx_pwm_enable() local
69 ret = clk_prepare_enable(lpc32xx->clk); in lpc32xx_pwm_enable()
73 val = readl(lpc32xx->base); in lpc32xx_pwm_enable()
75 writel(val, lpc32xx->base); in lpc32xx_pwm_enable()
82 struct lpc32xx_pwm_chip *lpc32xx = to_lpc32xx_pwm_chip(chip); in lpc32xx_pwm_disable() local
85 val = readl(lpc32xx->base); in lpc32xx_pwm_disable()
87 writel(val, lpc32xx->base); in lpc32xx_pwm_disable()
89 clk_disable_unprepare(lpc32xx->clk); in lpc32xx_pwm_disable()
124 struct lpc32xx_pwm_chip *lpc32xx; in lpc32xx_pwm_probe() local
128 chip = devm_pwmchip_alloc(&pdev->dev, 1, sizeof(*lpc32xx)); in lpc32xx_pwm_probe()
131 lpc32xx = to_lpc32xx_pwm_chip(chip); in lpc32xx_pwm_probe()
133 lpc32xx->base = devm_platform_ioremap_resource(pdev, 0); in lpc32xx_pwm_probe()
134 if (IS_ERR(lpc32xx->base)) in lpc32xx_pwm_probe()
135 return PTR_ERR(lpc32xx->base); in lpc32xx_pwm_probe()
137 lpc32xx->clk = devm_clk_get(&pdev->dev, NULL); in lpc32xx_pwm_probe()
138 if (IS_ERR(lpc32xx->clk)) in lpc32xx_pwm_probe()
139 return PTR_ERR(lpc32xx->clk); in lpc32xx_pwm_probe()
144 val = readl(lpc32xx->base); in lpc32xx_pwm_probe()
146 writel(val, lpc32xx->base); in lpc32xx_pwm_probe()
165 .name = "lpc32xx-pwm",
172 MODULE_ALIAS("platform:lpc32xx-pwm");
174 MODULE_DESCRIPTION("LPC32XX PWM Driver");