Searched refs:prescale_val (Results 1 – 1 of 1) sorted by relevance
693 u32 prescale_val, output_freq; in npcm7xx_pwm_init() local699 prescale_val = DIV_ROUND_CLOSEST(output_freq, PWM_OUTPUT_FREQ_25KHZ); in npcm7xx_pwm_init()702 if (prescale_val < MIN_PRESCALE1) in npcm7xx_pwm_init()703 prescale_val = MIN_PRESCALE1; in npcm7xx_pwm_init()708 prescale_val--; in npcm7xx_pwm_init()711 prescale_val |= (prescale_val << NPCM7XX_PWM_PRESCALE_SHIFT_CH01); in npcm7xx_pwm_init()714 iowrite32(prescale_val, NPCM7XX_PWM_REG_PR(data->pwm_base, m)); in npcm7xx_pwm_init()726 return output_freq / ((prescale_val & 0xf) + 1); in npcm7xx_pwm_init()