Lines Matching refs:ns
153 static inline u16 ns_to_clock_divider(unsigned int ns) in ns_to_clock_divider() argument
156 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_clock_divider()
207 static inline u16 ns_to_lpf_count(unsigned int ns) in ns_to_lpf_count() argument
210 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_lpf_count()
258 static u16 ns_to_pulse_width_count(u32 ns, u16 divider)
268 n = ((u64) ns) * CX25840_IR_REFCLK_FREQ / 1000000; /* millicycles */
306 static u64 ns_to_pulse_clocks(u32 ns) in ns_to_pulse_clocks() argument
310 clocks = CX25840_IR_REFCLK_FREQ / 1000000 * (u64) ns; /* millicycles */ in ns_to_pulse_clocks()
443 static u32 txclk_tx_s_max_pulse_width(struct i2c_client *c, u32 ns, in txclk_tx_s_max_pulse_width() argument
448 if (ns > IR_MAX_DURATION) in txclk_tx_s_max_pulse_width()
449 ns = IR_MAX_DURATION; in txclk_tx_s_max_pulse_width()
450 pulse_clocks = ns_to_pulse_clocks(ns); in txclk_tx_s_max_pulse_width()
456 static u32 rxclk_rx_s_max_pulse_width(struct i2c_client *c, u32 ns, in rxclk_rx_s_max_pulse_width() argument
461 if (ns > IR_MAX_DURATION) in rxclk_rx_s_max_pulse_width()
462 ns = IR_MAX_DURATION; in rxclk_rx_s_max_pulse_width()
463 pulse_clocks = ns_to_pulse_clocks(ns); in rxclk_rx_s_max_pulse_width()