Lines Matching defs:divider

124  * Note the largest clock divider value of 0xffff corresponds to:
145 static inline unsigned int clock_divider_to_ns(unsigned int divider)
148 return DIV_ROUND_CLOSEST((divider + 1) * 1000,
158 static inline unsigned int clock_divider_to_carrier_freq(unsigned int divider)
160 return DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ, (divider + 1) * 16);
170 static inline unsigned int clock_divider_to_freq(unsigned int divider,
174 (divider + 1) * rollovers);
215 static u32 clock_divider_to_resolution(u16 divider)
222 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000,
226 static u64 pulse_width_count_to_ns(u16 count, u16 divider)
235 n = (((u64) count << 2) | 0x3) * (divider + 1) * 1000; /* millicycles */
244 static u16 ns_to_pulse_width_count(u32 ns, u16 divider)
255 d = (1 << 2) * ((u32) divider + 1) * 1000; /* millicycles/count */
268 static unsigned int pulse_width_count_to_us(u16 count, u16 divider)
277 n = (((u64) count << 2) | 0x3) * (divider + 1); /* cycles */
288 * significant part and (up to) 16 bit clock divider count as a modulus.
289 * When the Rx clock divider ticks down to 0, it increments the 18 bit pulse
413 u16 *divider)
415 *divider = carrier_freq_to_clock_divider(freq);
416 cx25840_write4(c, CX25840_IR_TXCLK_REG, *divider);
417 return clock_divider_to_carrier_freq(*divider);
422 u16 *divider)
424 *divider = carrier_freq_to_clock_divider(freq);
425 cx25840_write4(c, CX25840_IR_RXCLK_REG, *divider);
426 return clock_divider_to_carrier_freq(*divider);
430 u16 *divider)
437 *divider = pulse_clocks_to_clock_divider(pulse_clocks);
438 cx25840_write4(c, CX25840_IR_TXCLK_REG, *divider);
439 return (u32) pulse_width_count_to_ns(FIFO_RXTX, *divider);
443 u16 *divider)
450 *divider = pulse_clocks_to_clock_divider(pulse_clocks);
451 cx25840_write4(c, CX25840_IR_RXCLK_REG, *divider);
452 return (u32) pulse_width_count_to_ns(FIFO_RXTX, *divider);
653 u16 divider;
662 divider = (u16) atomic_read(&ir_state->rxclk_divider);
691 (u16)(p->hw_fifo_data & FIFO_RXTX), divider) / 1000;