Lines Matching refs:freq
297 u16 freq; in wl1273_fm_irq_thread_handler() local
311 r = core->read(core, WL1273_FREQ_SET, &freq); in wl1273_fm_irq_thread_handler()
317 freq * 50; in wl1273_fm_irq_thread_handler()
320 freq * 50; in wl1273_fm_irq_thread_handler()
330 r = core->read(core, WL1273_CHANL_SET, &freq); in wl1273_fm_irq_thread_handler()
334 dev_dbg(radio->dev, "%dkHz\n", freq); in wl1273_fm_irq_thread_handler()
346 static int wl1273_fm_set_tx_freq(struct wl1273_device *radio, unsigned int freq) in wl1273_fm_set_tx_freq() argument
352 if (freq < WL1273_BAND_TX_LOW) { in wl1273_fm_set_tx_freq()
354 "Frequency out of range: %d < %d\n", freq, in wl1273_fm_set_tx_freq()
359 if (freq > WL1273_BAND_TX_HIGH) { in wl1273_fm_set_tx_freq()
361 "Frequency out of range: %d > %d\n", freq, in wl1273_fm_set_tx_freq()
372 dev_dbg(radio->dev, "%s: freq: %d kHz\n", __func__, freq); in wl1273_fm_set_tx_freq()
375 r = core->write(core, WL1273_CHANL_SET, freq / 10); in wl1273_fm_set_tx_freq()
400 radio->tx_frequency = freq; in wl1273_fm_set_tx_freq()
406 static int wl1273_fm_set_rx_freq(struct wl1273_device *radio, unsigned int freq) in wl1273_fm_set_rx_freq() argument
412 if (freq < radio->rangelow) { in wl1273_fm_set_rx_freq()
414 "Frequency out of range: %d < %d\n", freq, in wl1273_fm_set_rx_freq()
420 if (freq > radio->rangehigh) { in wl1273_fm_set_rx_freq()
422 "Frequency out of range: %d > %d\n", freq, in wl1273_fm_set_rx_freq()
428 dev_dbg(radio->dev, "%s: %dkHz\n", __func__, freq); in wl1273_fm_set_rx_freq()
433 f = (freq - WL1273_BAND_JAPAN_LOW) / 50; in wl1273_fm_set_rx_freq()
435 f = (freq - WL1273_BAND_OTHER_LOW) / 50; in wl1273_fm_set_rx_freq()
459 radio->rx_frequency = freq; in wl1273_fm_set_rx_freq()
468 unsigned int freq; in wl1273_fm_get_freq() local
479 freq = WL1273_BAND_JAPAN_LOW + 50 * f; in wl1273_fm_get_freq()
481 freq = WL1273_BAND_OTHER_LOW + 50 * f; in wl1273_fm_get_freq()
487 freq = f * 10; in wl1273_fm_get_freq()
490 return freq; in wl1273_fm_get_freq()
1633 struct v4l2_frequency *freq) in wl1273_fm_vidioc_g_frequency() argument
1643 freq->type = V4L2_TUNER_RADIO; in wl1273_fm_vidioc_g_frequency()
1644 freq->frequency = WL1273_FREQ(wl1273_fm_get_freq(radio)); in wl1273_fm_vidioc_g_frequency()
1652 const struct v4l2_frequency *freq) in wl1273_fm_vidioc_s_frequency() argument
1658 dev_dbg(radio->dev, "%s: %d\n", __func__, freq->frequency); in wl1273_fm_vidioc_s_frequency()
1660 if (freq->type != V4L2_TUNER_RADIO) { in wl1273_fm_vidioc_s_frequency()
1662 "freq->type != V4L2_TUNER_RADIO: %d\n", freq->type); in wl1273_fm_vidioc_s_frequency()
1670 dev_dbg(radio->dev, "freq: %d\n", freq->frequency); in wl1273_fm_vidioc_s_frequency()
1673 WL1273_INV_FREQ(freq->frequency)); in wl1273_fm_vidioc_s_frequency()
1679 WL1273_INV_FREQ(freq->frequency)); in wl1273_fm_vidioc_s_frequency()