Lines Matching refs:freq_idx

111 	int freq_idx;  member
166 static u32 sso_led_get_freq_src(int freq_idx) in sso_led_get_freq_src() argument
168 if (freq_idx < MAX_FPID_FREQ_RANK) in sso_led_get_freq_src()
170 else if (freq_idx < MAX_GPTC_FREQ_RANK) in sso_led_get_freq_src()
192 static void sso_led_freq_set(struct sso_led_priv *priv, u32 pin, int freq_idx) in sso_led_freq_set() argument
198 if (!freq_idx) in sso_led_freq_set()
202 freq_src = sso_led_get_freq_src(freq_idx); in sso_led_freq_set()
213 val_freq = freq_idx - 1; in sso_led_freq_set()
215 val_freq = freq_idx - MAX_FPID_FREQ_RANK; in sso_led_freq_set()
279 int freq_idx; in delay_to_freq_idx() local
290 freq_idx = sso_get_blink_rate_idx(priv, freq); in delay_to_freq_idx()
291 if (freq_idx == -1) in delay_to_freq_idx()
292 freq_idx = MAX_FREQ_RANK - 1; in delay_to_freq_idx()
294 delay = 1000 / priv->freq[freq_idx]; in delay_to_freq_idx()
300 return freq_idx; in delay_to_freq_idx()
309 int freq_idx; in sso_led_blink_set() local
313 freq_idx = delay_to_freq_idx(led, delay_on, delay_off); in sso_led_blink_set()
315 sso_led_freq_set(priv, led->desc.pin, freq_idx); in sso_led_blink_set()
318 led->desc.freq_idx = freq_idx; in sso_led_blink_set()
319 led->desc.blink_rate = priv->freq[freq_idx]; in sso_led_blink_set()
331 sso_led_freq_set(priv, desc->pin, desc->freq_idx); in sso_led_hw_cfg()
518 int freq_idx; in sso_gpio_freq_set() local
521 freq_idx = sso_gpio_get_freq_idx(priv->gpio.freq); in sso_gpio_freq_set()
522 if (freq_idx == -1) in sso_gpio_freq_set()
523 freq_idx = ARRAY_SIZE(freq_tbl) - 1; in sso_gpio_freq_set()
525 val = freq_idx % FPID_FREQ_RANK_MAX; in sso_gpio_freq_set()
531 } else if (freq_idx < FPID_FREQ_RANK_MAX) { in sso_gpio_freq_set()
686 desc->freq_idx = 0; in __sso_led_dt_parse()
687 desc->blink_rate = priv->freq[desc->freq_idx]; in __sso_led_dt_parse()
689 desc->freq_idx = sso_get_blink_rate_idx(priv, prop); in __sso_led_dt_parse()
690 if (desc->freq_idx == -1) in __sso_led_dt_parse()
691 desc->freq_idx = MAX_FREQ_RANK - 1; in __sso_led_dt_parse()
693 desc->blink_rate = priv->freq[desc->freq_idx]; in __sso_led_dt_parse()