Lines Matching full:pc
52 struct ecap_pwm_chip *pc = to_ecap_pwm_chip(chip); in ecap_pwm_config() local
57 c = pc->clk_rate; in ecap_pwm_config()
66 c = pc->clk_rate; in ecap_pwm_config()
74 value = readw(pc->mmio_base + ECCTL2); in ecap_pwm_config()
79 writew(value, pc->mmio_base + ECCTL2); in ecap_pwm_config()
83 writel(duty_cycles, pc->mmio_base + CAP2); in ecap_pwm_config()
84 writel(period_cycles, pc->mmio_base + CAP1); in ecap_pwm_config()
91 writel(duty_cycles, pc->mmio_base + CAP4); in ecap_pwm_config()
92 writel(period_cycles, pc->mmio_base + CAP3); in ecap_pwm_config()
96 value = readw(pc->mmio_base + ECCTL2); in ecap_pwm_config()
99 writew(value, pc->mmio_base + ECCTL2); in ecap_pwm_config()
110 struct ecap_pwm_chip *pc = to_ecap_pwm_chip(chip); in ecap_pwm_set_polarity() local
115 value = readw(pc->mmio_base + ECCTL2); in ecap_pwm_set_polarity()
124 writew(value, pc->mmio_base + ECCTL2); in ecap_pwm_set_polarity()
133 struct ecap_pwm_chip *pc = to_ecap_pwm_chip(chip); in ecap_pwm_enable() local
143 value = readw(pc->mmio_base + ECCTL2); in ecap_pwm_enable()
145 writew(value, pc->mmio_base + ECCTL2); in ecap_pwm_enable()
152 struct ecap_pwm_chip *pc = to_ecap_pwm_chip(chip); in ecap_pwm_disable() local
159 value = readw(pc->mmio_base + ECCTL2); in ecap_pwm_disable()
161 writew(value, pc->mmio_base + ECCTL2); in ecap_pwm_disable()
219 struct ecap_pwm_chip *pc; in ecap_pwm_probe() local
224 chip = devm_pwmchip_alloc(&pdev->dev, 1, sizeof(*pc)); in ecap_pwm_probe()
227 pc = to_ecap_pwm_chip(chip); in ecap_pwm_probe()
242 pc->clk_rate = clk_get_rate(clk); in ecap_pwm_probe()
243 if (!pc->clk_rate) { in ecap_pwm_probe()
250 pc->mmio_base = devm_platform_ioremap_resource(pdev, 0); in ecap_pwm_probe()
251 if (IS_ERR(pc->mmio_base)) in ecap_pwm_probe()
252 return PTR_ERR(pc->mmio_base); in ecap_pwm_probe()
273 struct ecap_pwm_chip *pc = to_ecap_pwm_chip(chip); in ecap_pwm_save_context() local
276 pc->ctx.ecctl2 = readw(pc->mmio_base + ECCTL2); in ecap_pwm_save_context()
277 pc->ctx.cap4 = readl(pc->mmio_base + CAP4); in ecap_pwm_save_context()
278 pc->ctx.cap3 = readl(pc->mmio_base + CAP3); in ecap_pwm_save_context()
284 struct ecap_pwm_chip *pc = to_ecap_pwm_chip(chip); in ecap_pwm_restore_context() local
286 writel(pc->ctx.cap3, pc->mmio_base + CAP3); in ecap_pwm_restore_context()
287 writel(pc->ctx.cap4, pc->mmio_base + CAP4); in ecap_pwm_restore_context()
288 writew(pc->ctx.ecctl2, pc->mmio_base + ECCTL2); in ecap_pwm_restore_context()