Lines Matching +full:1000 +full:ns
125 * (0xffff + 1) * 1000 / 108/2 MHz = 1,213,629.629... ns
161 * 0xffff * 1000 / 108/2 MHz = 1,213,611.11... ns
173 static inline u16 ns_to_lpf_count(unsigned int ns) in ns_to_lpf_count() argument
176 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_lpf_count()
181 /* Duration of the Low Pass Filter rejection window in ns */ in lpf_count_to_ns()
182 return DIV_ROUND_CLOSEST(count * 1000, in lpf_count_to_ns()
200 * not readable, hence the << 2. This function returns ns. in clock_divider_to_resolution()
202 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000, in clock_divider_to_resolution()
215 n = (((u64) count << 2) | 0x3) * (divider + 1) * 1000; /* millicycles */ in pulse_width_count_to_ns()
216 rem = do_div(n, CX25840_IR_REFCLK_FREQ / 1000000); /* / MHz => ns */ in pulse_width_count_to_ns()
224 static u16 ns_to_pulse_width_count(u32 ns, u16 divider)
234 n = ((u64) ns) * CX25840_IR_REFCLK_FREQ / 1000000; /* millicycles */
235 d = (1 << 2) * ((u32) divider + 1) * 1000; /* millicycles/count */
272 static u64 ns_to_pulse_clocks(u32 ns) in ns_to_pulse_clocks() argument
276 clocks = CX25840_IR_REFCLK_FREQ / 1000000 * (u64) ns; /* millicycles */ in ns_to_pulse_clocks()
277 rem = do_div(clocks, 1000); /* /1000 = cycles */ in ns_to_pulse_clocks()
278 if (rem >= 1000 / 2) in ns_to_pulse_clocks()
409 static u32 txclk_tx_s_max_pulse_width(struct i2c_client *c, u32 ns, in txclk_tx_s_max_pulse_width() argument
414 if (ns > IR_MAX_DURATION) in txclk_tx_s_max_pulse_width()
415 ns = IR_MAX_DURATION; in txclk_tx_s_max_pulse_width()
416 pulse_clocks = ns_to_pulse_clocks(ns); in txclk_tx_s_max_pulse_width()
422 static u32 rxclk_rx_s_max_pulse_width(struct i2c_client *c, u32 ns, in rxclk_rx_s_max_pulse_width() argument
427 if (ns > IR_MAX_DURATION) in rxclk_rx_s_max_pulse_width()
428 ns = IR_MAX_DURATION; in rxclk_rx_s_max_pulse_width()
429 pulse_clocks = ns_to_pulse_clocks(ns); in rxclk_rx_s_max_pulse_width()
671 (u16)(p->hw_fifo_data & FIFO_RXTX), divider) / 1000; in cx25840_ir_rx_read()
678 v4l2_dbg(2, ir_debug, sd, "rx read: %10u ns %s %s\n", in cx25840_ir_rx_read()
833 * from the tx_kfifo, or converted from ns to the proper units from the in cx25840_ir_tx_write()
1085 v4l2_info(sd, "\tMax measurable pulse width: %u us, %llu ns\n", in cx25840_ir_log_status()
1091 v4l2_info(sd, "\tMin acceptable pulse width (LPF): %u us, %u ns\n", in cx25840_ir_log_status()
1127 v4l2_info(sd, "\tMax pulse width: %u us, %llu ns\n", in cx25840_ir_log_status()
1163 /* RC-5: 666,667 ns = 1/36 kHz * 32 cycles * 1 mark * 0.75 */
1164 /* RC-6: 333,333 ns = 1/36 kHz * 16 cycles * 1 mark * 0.75 */
1165 .noise_filter_min_width = 333333, /* ns */