Lines Matching refs:pc
69 struct tegra_pwm_chip *pc = to_tegra_pwm_chip(chip); in tegra_pwm_config() local
89 rate = clk_get_rate(pc->clk) >> PWM_DUTY_WIDTH; in tegra_pwm_config()
116 err = clk_prepare_enable(pc->clk); in tegra_pwm_config()
122 pwm_writel(pc, pwm->hwpwm, val); in tegra_pwm_config()
128 clk_disable_unprepare(pc->clk); in tegra_pwm_config()
135 struct tegra_pwm_chip *pc = to_tegra_pwm_chip(chip); in tegra_pwm_enable() local
139 rc = clk_prepare_enable(pc->clk); in tegra_pwm_enable()
143 val = pwm_readl(pc, pwm->hwpwm); in tegra_pwm_enable()
145 pwm_writel(pc, pwm->hwpwm, val); in tegra_pwm_enable()
152 struct tegra_pwm_chip *pc = to_tegra_pwm_chip(chip); in tegra_pwm_disable() local
155 val = pwm_readl(pc, pwm->hwpwm); in tegra_pwm_disable()
157 pwm_writel(pc, pwm->hwpwm, val); in tegra_pwm_disable()
159 clk_disable_unprepare(pc->clk); in tegra_pwm_disable()
210 struct tegra_pwm_chip *pc = platform_get_drvdata(pdev); in tegra_pwm_remove() local
213 if (WARN_ON(!pc)) in tegra_pwm_remove()
217 struct pwm_device *pwm = &pc->chip.pwms[i]; in tegra_pwm_remove()
220 if (clk_prepare_enable(pc->clk) < 0) in tegra_pwm_remove()
223 pwm_writel(pc, i, 0); in tegra_pwm_remove()
225 clk_disable_unprepare(pc->clk); in tegra_pwm_remove()
228 return pwmchip_remove(&pc->chip); in tegra_pwm_remove()