Lines Matching refs:pwm_id
15 int pwm_enable(int pwm_id) in pwm_enable() argument
22 tcon |= TCON_START(pwm_id); in pwm_enable()
29 void pwm_disable(int pwm_id) in pwm_disable() argument
36 tcon &= ~TCON_START(pwm_id); in pwm_disable()
41 static unsigned long pwm_calc_tin(int pwm_id, unsigned long freq) in pwm_calc_tin() argument
58 int pwm_config(int pwm_id, int duty_ns, int period_ns) in pwm_config() argument
84 tin_rate = pwm_calc_tin(pwm_id, frequency); in pwm_config()
94 offset = pwm_id * 3; in pwm_config()
95 if (pwm_id < 4) { in pwm_config()
101 tcon |= TCON_UPDATE(pwm_id); in pwm_config()
102 if (pwm_id < 4) in pwm_config()
103 tcon |= TCON_AUTO_RELOAD(pwm_id); in pwm_config()
108 tcon &= ~TCON_UPDATE(pwm_id); in pwm_config()
114 int pwm_init(int pwm_id, int div, int invert) in pwm_init() argument
128 if (pwm_id < 2) { in pwm_init()
139 val &= ~(0xf << MUX_DIV_SHIFT(pwm_id)); in pwm_init()
140 val |= (div & 0xf) << MUX_DIV_SHIFT(pwm_id); in pwm_init()
143 if (pwm_id == 4) { in pwm_init()
158 offset = pwm_id * 3; in pwm_init()
162 val = readl(&pwm->tcon) & ~(0xf << TCON_OFFSET(pwm_id)); in pwm_init()
163 if (invert && (pwm_id < 4)) in pwm_init()
164 val |= TCON_INVERTER(pwm_id); in pwm_init()
167 pwm_enable(pwm_id); in pwm_init()