Lines Matching refs:pc
98 struct tegra_pwm_chip *pc = to_tegra_pwm_chip(chip); in tegra_pwm_config() local
117 if (period_ns < pc->min_period_ns) in tegra_pwm_config()
133 if (pc->soc->num_channels == 1) { in tegra_pwm_config()
148 err = clk_set_rate(pc->clk, required_clk_rate); in tegra_pwm_config()
153 pc->clk_rate = clk_get_rate(pc->clk); in tegra_pwm_config()
156 rate = pc->clk_rate >> PWM_DUTY_WIDTH; in tegra_pwm_config()
184 err = clk_prepare_enable(pc->clk); in tegra_pwm_config()
190 pwm_writel(pc, pwm->hwpwm, val); in tegra_pwm_config()
196 clk_disable_unprepare(pc->clk); in tegra_pwm_config()
203 struct tegra_pwm_chip *pc = to_tegra_pwm_chip(chip); in tegra_pwm_enable() local
207 rc = clk_prepare_enable(pc->clk); in tegra_pwm_enable()
211 val = pwm_readl(pc, pwm->hwpwm); in tegra_pwm_enable()
213 pwm_writel(pc, pwm->hwpwm, val); in tegra_pwm_enable()
220 struct tegra_pwm_chip *pc = to_tegra_pwm_chip(chip); in tegra_pwm_disable() local
223 val = pwm_readl(pc, pwm->hwpwm); in tegra_pwm_disable()
225 pwm_writel(pc, pwm->hwpwm, val); in tegra_pwm_disable()
227 clk_disable_unprepare(pc->clk); in tegra_pwm_disable()
305 struct tegra_pwm_chip *pc = platform_get_drvdata(pdev); in tegra_pwm_remove() local
308 if (WARN_ON(!pc)) in tegra_pwm_remove()
311 err = clk_prepare_enable(pc->clk); in tegra_pwm_remove()
315 reset_control_assert(pc->rst); in tegra_pwm_remove()
316 clk_disable_unprepare(pc->clk); in tegra_pwm_remove()
318 return pwmchip_remove(&pc->chip); in tegra_pwm_remove()