Lines Matching refs:divs
44 u32 divs, duty; in nouveau_pwmfan_get() local
52 ret = pm->pwm_get(dev, gpio.line, &divs, &duty); in nouveau_pwmfan_get()
53 if (ret == 0 && divs) { in nouveau_pwmfan_get()
54 divs = max(divs, duty); in nouveau_pwmfan_get()
56 duty = divs - duty; in nouveau_pwmfan_get()
57 return (duty * 100) / divs; in nouveau_pwmfan_get()
72 u32 divs, duty; in nouveau_pwmfan_set() local
80 divs = pm->fan.pwm_divisor; in nouveau_pwmfan_set()
83 divs = 135000 / pm->fan.pwm_freq; in nouveau_pwmfan_set()
85 divs /= 4; in nouveau_pwmfan_set()
88 duty = ((divs * percent) + 99) / 100; in nouveau_pwmfan_set()
90 duty = divs - duty; in nouveau_pwmfan_set()
92 ret = pm->pwm_set(dev, gpio.line, divs, duty); in nouveau_pwmfan_set()