Lines Matching refs:fan_dev
205 struct npcm7xx_fan_dev fan_dev[NPCM7XX_FAN_MAX_CHN_NUM]; member
275 if (data->fan_dev[fan_id].fan_st_flg != FAN_DISABLE) { in npcm7xx_fan_start_capture()
279 data->fan_dev[fan_id].fan_st_flg = FAN_INIT; in npcm7xx_fan_start_capture()
379 if (data->fan_dev[fan_id].fan_st_flg == FAN_INIT) { in npcm7xx_fan_compute()
381 data->fan_dev[fan_id].fan_st_flg = in npcm7xx_fan_compute()
385 data->fan_dev[fan_id].fan_cnt_tmp = 0; in npcm7xx_fan_compute()
386 } else if (data->fan_dev[fan_id].fan_st_flg < FAN_ENOUGH_SAMPLE) { in npcm7xx_fan_compute()
391 data->fan_dev[fan_id].fan_cnt_tmp += in npcm7xx_fan_compute()
394 data->fan_dev[fan_id].fan_st_flg++; in npcm7xx_fan_compute()
397 if (data->fan_dev[fan_id].fan_st_flg == FAN_ENOUGH_SAMPLE) { in npcm7xx_fan_compute()
398 data->fan_dev[fan_id].fan_cnt_tmp += in npcm7xx_fan_compute()
402 data->fan_dev[fan_id].fan_cnt = in npcm7xx_fan_compute()
403 data->fan_dev[fan_id].fan_cnt_tmp / in npcm7xx_fan_compute()
406 data->fan_dev[fan_id].fan_st_flg = FAN_INIT; in npcm7xx_fan_compute()
472 data->fan_dev[fan_id].fan_cnt = 0; in npcm7xx_check_cmp()
564 if (data->fan_dev[channel].fan_cnt <= 0) in npcm7xx_read_fan()
565 return data->fan_dev[channel].fan_cnt; in npcm7xx_read_fan()
568 if (data->fan_dev[channel].fan_cnt > 0 && in npcm7xx_read_fan()
569 data->fan_dev[channel].fan_pls_per_rev > 0) in npcm7xx_read_fan()
571 (data->fan_dev[channel].fan_cnt * in npcm7xx_read_fan()
572 data->fan_dev[channel].fan_pls_per_rev)); in npcm7xx_read_fan()
764 data->fan_dev[ch].fan_st_flg = FAN_DISABLE; in npcm7xx_fan_init()
765 data->fan_dev[ch].fan_pls_per_rev = in npcm7xx_fan_init()
767 data->fan_dev[ch].fan_cnt = 0; in npcm7xx_fan_init()
902 data->fan_dev[index].fan_st_flg = FAN_INIT; in npcm7xx_en_pwm_fan()