Lines Matching refs:ns
187 static inline u16 ns_to_clock_divider(unsigned int ns) in ns_to_clock_divider() argument
190 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_clock_divider()
241 static inline u16 ns_to_lpf_count(unsigned int ns) in ns_to_lpf_count() argument
244 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_lpf_count()
314 static u64 ns_to_pulse_clocks(u32 ns) in ns_to_pulse_clocks() argument
318 clocks = CX23888_IR_REFCLK_FREQ / 1000000 * (u64) ns; /* millicycles */ in ns_to_pulse_clocks()
458 static u32 txclk_tx_s_max_pulse_width(struct cx23885_dev *dev, u32 ns, in txclk_tx_s_max_pulse_width() argument
463 if (ns > IR_MAX_DURATION) in txclk_tx_s_max_pulse_width()
464 ns = IR_MAX_DURATION; in txclk_tx_s_max_pulse_width()
465 pulse_clocks = ns_to_pulse_clocks(ns); in txclk_tx_s_max_pulse_width()
471 static u32 rxclk_rx_s_max_pulse_width(struct cx23885_dev *dev, u32 ns, in rxclk_rx_s_max_pulse_width() argument
476 if (ns > IR_MAX_DURATION) in rxclk_rx_s_max_pulse_width()
477 ns = IR_MAX_DURATION; in rxclk_rx_s_max_pulse_width()
478 pulse_clocks = ns_to_pulse_clocks(ns); in rxclk_rx_s_max_pulse_width()