Lines Matching +full:1000 +full:ns

125  *	(0xffff + 1) * 1000 / 108/2 MHz = 1,213,629.629... ns
139 static inline u16 ns_to_clock_divider(unsigned int ns) in ns_to_clock_divider() argument
142 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_clock_divider()
147 /* Period of the Rx or Tx clock in ns */ in clock_divider_to_ns()
148 return DIV_ROUND_CLOSEST((divider + 1) * 1000, in clock_divider_to_ns()
181 * 0xffff * 1000 / 108/2 MHz = 1,213,611.11... ns
193 static inline u16 ns_to_lpf_count(unsigned int ns) in ns_to_lpf_count() argument
196 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_lpf_count()
201 /* Duration of the Low Pass Filter rejection window in ns */ in lpf_count_to_ns()
202 return DIV_ROUND_CLOSEST(count * 1000, in lpf_count_to_ns()
220 * not readable, hence the << 2. This function returns ns. in clock_divider_to_resolution()
222 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000, in clock_divider_to_resolution()
235 n = (((u64) count << 2) | 0x3) * (divider + 1) * 1000; /* millicycles */ in pulse_width_count_to_ns()
236 rem = do_div(n, CX25840_IR_REFCLK_FREQ / 1000000); /* / MHz => ns */ in pulse_width_count_to_ns()
244 static u16 ns_to_pulse_width_count(u32 ns, u16 divider)
254 n = ((u64) ns) * CX25840_IR_REFCLK_FREQ / 1000000; /* millicycles */
255 d = (1 << 2) * ((u32) divider + 1) * 1000; /* millicycles/count */
292 static u64 ns_to_pulse_clocks(u32 ns) in ns_to_pulse_clocks() argument
296 clocks = CX25840_IR_REFCLK_FREQ / 1000000 * (u64) ns; /* millicycles */ in ns_to_pulse_clocks()
297 rem = do_div(clocks, 1000); /* /1000 = cycles */ in ns_to_pulse_clocks()
298 if (rem >= 1000 / 2) in ns_to_pulse_clocks()
429 static u32 txclk_tx_s_max_pulse_width(struct i2c_client *c, 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 i2c_client *c, 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()
691 (u16)(p->hw_fifo_data & FIFO_RXTX), divider) / 1000; in cx25840_ir_rx_read()
698 v4l2_dbg(2, ir_debug, sd, "rx read: %10u ns %s %s\n", in cx25840_ir_rx_read()
853 * from the tx_kfifo, or converted from ns to the proper units from the in cx25840_ir_tx_write()
1105 v4l2_info(sd, "\tMax measurable pulse width: %u us, %llu ns\n", in cx25840_ir_log_status()
1111 v4l2_info(sd, "\tMin acceptable pulse width (LPF): %u us, %u ns\n", in cx25840_ir_log_status()
1147 v4l2_info(sd, "\tMax pulse width: %u us, %llu ns\n", in cx25840_ir_log_status()
1183 /* RC-5: 666,667 ns = 1/36 kHz * 32 cycles * 1 mark * 0.75 */
1184 /* RC-6: 333,333 ns = 1/36 kHz * 16 cycles * 1 mark * 0.75 */
1185 .noise_filter_min_width = 333333, /* ns */