Lines Matching refs:freq
91 static inline bool ite_is_high_carrier_freq(unsigned int freq) in ite_is_high_carrier_freq() argument
93 return freq >= ITE_HCF_MIN_CARRIER_FREQ; in ite_is_high_carrier_freq()
98 static u8 ite_get_carrier_freq_bits(unsigned int freq) in ite_get_carrier_freq_bits() argument
100 if (ite_is_high_carrier_freq(freq)) { in ite_get_carrier_freq_bits()
101 if (freq < 425000) in ite_get_carrier_freq_bits()
104 else if (freq < 465000) in ite_get_carrier_freq_bits()
107 else if (freq < 490000) in ite_get_carrier_freq_bits()
114 if (freq < ITE_LCF_MIN_CARRIER_FREQ) in ite_get_carrier_freq_bits()
115 freq = ITE_LCF_MIN_CARRIER_FREQ; in ite_get_carrier_freq_bits()
116 if (freq > ITE_LCF_MAX_CARRIER_FREQ) in ite_get_carrier_freq_bits()
117 freq = ITE_LCF_MAX_CARRIER_FREQ; in ite_get_carrier_freq_bits()
120 freq = in ite_get_carrier_freq_bits()
121 DIV_ROUND_CLOSEST(freq - ITE_LCF_MIN_CARRIER_FREQ, in ite_get_carrier_freq_bits()
124 return (u8) freq; in ite_get_carrier_freq_bits()
129 static u8 ite_get_pulse_width_bits(unsigned int freq, int duty_cycle) in ite_get_pulse_width_bits() argument
134 if (freq < ITE_LCF_MIN_CARRIER_FREQ) in ite_get_pulse_width_bits()
135 freq = ITE_LCF_MIN_CARRIER_FREQ; in ite_get_pulse_width_bits()
136 if (freq > ITE_HCF_MAX_CARRIER_FREQ) in ite_get_pulse_width_bits()
137 freq = ITE_HCF_MAX_CARRIER_FREQ; in ite_get_pulse_width_bits()
139 period_ns = 1000000000UL / freq; in ite_get_pulse_width_bits()
142 if (ite_is_high_carrier_freq(freq)) { in ite_get_pulse_width_bits()
229 unsigned int freq, low_freq, high_freq; in ite_set_carrier_params() local
238 freq = dev->params.tx_carrier_freq; in ite_set_carrier_params()
247 freq = in ite_set_carrier_params()
253 freq = (low_freq + high_freq) / 2; in ite_set_carrier_params()
270 dev->params.set_carrier_params(dev, ite_is_high_carrier_freq(freq), in ite_set_carrier_params()
271 use_demodulator, ite_get_carrier_freq_bits(freq), allowance, in ite_set_carrier_params()
272 ite_get_pulse_width_bits(freq, dev->params.tx_duty_cycle)); in ite_set_carrier_params()