Lines Matching refs:chn
39 struct sprd_pwm_chn chn[SPRD_PWM_CHN_NUM]; member
73 struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; in sprd_pwm_get_state() local
82 ret = clk_bulk_prepare_enable(SPRD_PWM_CHN_CLKS_NUM, chn->clks); in sprd_pwm_get_state()
106 state->period = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate); in sprd_pwm_get_state()
111 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate); in sprd_pwm_get_state()
115 clk_bulk_disable_unprepare(SPRD_PWM_CHN_CLKS_NUM, chn->clks); in sprd_pwm_get_state()
121 struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; in sprd_pwm_config() local
137 tmp = (u64)chn->clk_rate * period_ns; in sprd_pwm_config()
163 struct sprd_pwm_chn *chn = &spc->chn[pwm->hwpwm]; in sprd_pwm_apply() local
177 chn->clks); in sprd_pwm_apply()
200 clk_bulk_disable_unprepare(SPRD_PWM_CHN_CLKS_NUM, chn->clks); in sprd_pwm_apply()
218 struct sprd_pwm_chn *chn = &spc->chn[i]; in sprd_pwm_clk_init() local
222 chn->clks[j].id = in sprd_pwm_clk_init()
226 chn->clks); in sprd_pwm_clk_init()
235 clk_pwm = chn->clks[SPRD_PWM_CHN_OUTPUT_CLK].clk; in sprd_pwm_clk_init()
236 chn->clk_rate = clk_get_rate(clk_pwm); in sprd_pwm_clk_init()