ep93xx_pwm 42 drivers/pwm/pwm-ep93xx.c static inline struct ep93xx_pwm *to_ep93xx_pwm(struct pwm_chip *chip) ep93xx_pwm 44 drivers/pwm/pwm-ep93xx.c return container_of(chip, struct ep93xx_pwm, chip); ep93xx_pwm 64 drivers/pwm/pwm-ep93xx.c struct ep93xx_pwm *ep93xx_pwm = to_ep93xx_pwm(chip); ep93xx_pwm 65 drivers/pwm/pwm-ep93xx.c void __iomem *base = ep93xx_pwm->base; ep93xx_pwm 77 drivers/pwm/pwm-ep93xx.c ret = clk_enable(ep93xx_pwm->clk); ep93xx_pwm 82 drivers/pwm/pwm-ep93xx.c c = clk_get_rate(ep93xx_pwm->clk); ep93xx_pwm 108 drivers/pwm/pwm-ep93xx.c clk_disable(ep93xx_pwm->clk); ep93xx_pwm 116 drivers/pwm/pwm-ep93xx.c struct ep93xx_pwm *ep93xx_pwm = to_ep93xx_pwm(chip); ep93xx_pwm 123 drivers/pwm/pwm-ep93xx.c ret = clk_enable(ep93xx_pwm->clk); ep93xx_pwm 128 drivers/pwm/pwm-ep93xx.c writew(0x1, ep93xx_pwm->base + EP93XX_PWMx_INVERT); ep93xx_pwm 130 drivers/pwm/pwm-ep93xx.c writew(0x0, ep93xx_pwm->base + EP93XX_PWMx_INVERT); ep93xx_pwm 132 drivers/pwm/pwm-ep93xx.c clk_disable(ep93xx_pwm->clk); ep93xx_pwm 139 drivers/pwm/pwm-ep93xx.c struct ep93xx_pwm *ep93xx_pwm = to_ep93xx_pwm(chip); ep93xx_pwm 142 drivers/pwm/pwm-ep93xx.c ret = clk_enable(ep93xx_pwm->clk); ep93xx_pwm 146 drivers/pwm/pwm-ep93xx.c writew(0x1, ep93xx_pwm->base + EP93XX_PWMx_ENABLE); ep93xx_pwm 153 drivers/pwm/pwm-ep93xx.c struct ep93xx_pwm *ep93xx_pwm = to_ep93xx_pwm(chip); ep93xx_pwm 155 drivers/pwm/pwm-ep93xx.c writew(0x0, ep93xx_pwm->base + EP93XX_PWMx_ENABLE); ep93xx_pwm 156 drivers/pwm/pwm-ep93xx.c clk_disable(ep93xx_pwm->clk); ep93xx_pwm 171 drivers/pwm/pwm-ep93xx.c struct ep93xx_pwm *ep93xx_pwm; ep93xx_pwm 175 drivers/pwm/pwm-ep93xx.c ep93xx_pwm = devm_kzalloc(&pdev->dev, sizeof(*ep93xx_pwm), GFP_KERNEL); ep93xx_pwm 176 drivers/pwm/pwm-ep93xx.c if (!ep93xx_pwm) ep93xx_pwm 180 drivers/pwm/pwm-ep93xx.c ep93xx_pwm->base = devm_ioremap_resource(&pdev->dev, res); ep93xx_pwm 181 drivers/pwm/pwm-ep93xx.c if (IS_ERR(ep93xx_pwm->base)) ep93xx_pwm 182 drivers/pwm/pwm-ep93xx.c return PTR_ERR(ep93xx_pwm->base); ep93xx_pwm 184 drivers/pwm/pwm-ep93xx.c ep93xx_pwm->clk = devm_clk_get(&pdev->dev, "pwm_clk"); ep93xx_pwm 185 drivers/pwm/pwm-ep93xx.c if (IS_ERR(ep93xx_pwm->clk)) ep93xx_pwm 186 drivers/pwm/pwm-ep93xx.c return PTR_ERR(ep93xx_pwm->clk); ep93xx_pwm 188 drivers/pwm/pwm-ep93xx.c ep93xx_pwm->chip.dev = &pdev->dev; ep93xx_pwm 189 drivers/pwm/pwm-ep93xx.c ep93xx_pwm->chip.ops = &ep93xx_pwm_ops; ep93xx_pwm 190 drivers/pwm/pwm-ep93xx.c ep93xx_pwm->chip.base = -1; ep93xx_pwm 191 drivers/pwm/pwm-ep93xx.c ep93xx_pwm->chip.npwm = 1; ep93xx_pwm 193 drivers/pwm/pwm-ep93xx.c ret = pwmchip_add(&ep93xx_pwm->chip); ep93xx_pwm 197 drivers/pwm/pwm-ep93xx.c platform_set_drvdata(pdev, ep93xx_pwm); ep93xx_pwm 203 drivers/pwm/pwm-ep93xx.c struct ep93xx_pwm *ep93xx_pwm = platform_get_drvdata(pdev); ep93xx_pwm 205 drivers/pwm/pwm-ep93xx.c return pwmchip_remove(&ep93xx_pwm->chip);