Lines Matching +full:1000 +full:ns
164 * (0xffff + 1) * 1000 / 108/2 MHz = 1,213,629.629... ns
200 * 0xffff * 1000 / 108/2 MHz = 1,213,611.11... ns
212 static inline u16 ns_to_lpf_count(unsigned int ns) in ns_to_lpf_count() argument
215 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_lpf_count()
220 /* Duration of the Low Pass Filter rejection window in ns */ in lpf_count_to_ns()
221 return DIV_ROUND_CLOSEST(count * 1000, in lpf_count_to_ns()
239 * not readable, hence the << 2. This function returns ns. in clock_divider_to_resolution()
241 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000, in clock_divider_to_resolution()
254 n = (((u64) count << 2) | 0x3) * (divider + 1) * 1000; /* millicycles */ in pulse_width_count_to_ns()
255 rem = do_div(n, CX23888_IR_REFCLK_FREQ / 1000000); /* / MHz => ns */ in pulse_width_count_to_ns()
285 static u64 ns_to_pulse_clocks(u32 ns) in ns_to_pulse_clocks() argument
289 clocks = CX23888_IR_REFCLK_FREQ / 1000000 * (u64) ns; /* millicycles */ in ns_to_pulse_clocks()
290 rem = do_div(clocks, 1000); /* /1000 = cycles */ in ns_to_pulse_clocks()
291 if (rem >= 1000 / 2) in ns_to_pulse_clocks()
429 static u32 txclk_tx_s_max_pulse_width(struct cx23885_dev *dev, u32 ns, in txclk_tx_s_max_pulse_width() argument
434 if (ns > IR_MAX_DURATION) in txclk_tx_s_max_pulse_width()
435 ns = IR_MAX_DURATION; in txclk_tx_s_max_pulse_width()
436 pulse_clocks = ns_to_pulse_clocks(ns); in txclk_tx_s_max_pulse_width()
442 static u32 rxclk_rx_s_max_pulse_width(struct cx23885_dev *dev, u32 ns, in rxclk_rx_s_max_pulse_width() argument
447 if (ns > IR_MAX_DURATION) in rxclk_rx_s_max_pulse_width()
448 ns = IR_MAX_DURATION; in rxclk_rx_s_max_pulse_width()
449 pulse_clocks = ns_to_pulse_clocks(ns); in rxclk_rx_s_max_pulse_width()
666 (u16)(p->hw_fifo_data & FIFO_RXTX), divider) / 1000; in cx23888_ir_rx_read()
673 v4l2_dbg(2, ir_888_debug, sd, "rx read: %10u ns %s %s\n", in cx23888_ir_rx_read()
992 v4l2_info(sd, "\tMax measurable pulse width: %u us, %llu ns\n", in cx23888_ir_log_status()
998 v4l2_info(sd, "\tMin acceptable pulse width (LPF): %u us, %u ns\n", in cx23888_ir_log_status()
1036 v4l2_info(sd, "\tMax pulse width: %u us, %llu ns\n", in cx23888_ir_log_status()
1115 /* RC-5: 666,667 ns = 1/36 kHz * 32 cycles * 1 mark * 0.75 */
1116 /* RC-6A: 333,333 ns = 1/36 kHz * 16 cycles * 1 mark * 0.75 */
1117 .noise_filter_min_width = 333333, /* ns */