Home
last modified time | relevance | path

Searched refs:duty (Results 1 – 69 of 69) sorted by relevance

/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/therm/
Dfanpwm.c45 u32 divs, duty; in nvkm_fanpwm_get() local
48 ret = therm->pwm_get(therm, priv->func.line, &divs, &duty); in nvkm_fanpwm_get()
50 divs = max(divs, duty); in nvkm_fanpwm_get()
52 duty = divs - duty; in nvkm_fanpwm_get()
53 return (duty * 100) / divs; in nvkm_fanpwm_get()
65 u32 divs, duty; in nvkm_fanpwm_set() local
76 duty = ((divs * percent) + 99) / 100; in nvkm_fanpwm_set()
78 duty = divs - duty; in nvkm_fanpwm_set()
80 ret = therm->pwm_set(therm, priv->func.line, divs, duty); in nvkm_fanpwm_set()
94 u32 divs, duty; in nvkm_fanpwm_create() local
[all …]
Dfan.c39 int duty; in nvkm_fan_update() local
53 duty = fan->get(therm); in nvkm_fan_update()
54 if (duty == target) { in nvkm_fan_update()
60 if (!immediate && duty >= 0) { in nvkm_fan_update()
65 if (duty < target) in nvkm_fan_update()
66 duty = min(duty + 3, target); in nvkm_fan_update()
67 else if (duty > target) in nvkm_fan_update()
68 duty = max(duty - 3, target); in nvkm_fan_update()
70 duty = target; in nvkm_fan_update()
73 nv_debug(therm, "FAN update: %d\n", duty); in nvkm_fan_update()
[all …]
Dbase.c36 u16 duty, i; in nvkm_therm_update_trip() local
51 duty = cur_trip->fan_duty; in nvkm_therm_update_trip()
54 duty = 0; in nvkm_therm_update_trip()
58 return duty; in nvkm_therm_update_trip()
68 u16 duty; in nvkm_therm_update_linear() local
77 duty = (temp - linear_min_temp); in nvkm_therm_update_linear()
78 duty *= (priv->fan->bios.max_duty - priv->fan->bios.min_duty); in nvkm_therm_update_linear()
79 duty /= (linear_max_temp - linear_min_temp); in nvkm_therm_update_linear()
80 duty += priv->fan->bios.min_duty; in nvkm_therm_update_linear()
81 return duty; in nvkm_therm_update_linear()
[all …]
Dgf110.c70 gf110_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in gf110_fan_pwm_get() argument
78 *duty = nv_rd32(therm, 0x00e118 + (indx * 8)); in gf110_fan_pwm_get()
83 *duty = nv_rd32(therm, 0x0200dc) & 0x1fff; in gf110_fan_pwm_get()
91 gf110_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in gf110_fan_pwm_set() argument
98 nv_wr32(therm, 0x00e118 + (indx * 8), duty | 0x80000000); in gf110_fan_pwm_set()
101 nv_wr32(therm, 0x0200dc, duty | 0x40000000); in gf110_fan_pwm_set()
Dfantog.c45 int duty; in nvkm_fantog_update() local
52 duty = !gpio->get(gpio, 0, DCB_GPIO_FAN, 0xff); in nvkm_fantog_update()
53 gpio->set(gpio, 0, DCB_GPIO_FAN, 0xff, duty); in nvkm_fantog_update()
55 if (list_empty(&priv->alarm.head) && percent != (duty * 100)) { in nvkm_fantog_update()
57 if (!duty) in nvkm_fantog_update()
Dgm107.c40 gm107_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in gm107_fan_pwm_get() argument
43 *duty = nv_rd32(therm, 0x10eb24) & 0x1fff; in gm107_fan_pwm_get()
48 gm107_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in gm107_fan_pwm_set() argument
51 nv_wr32(therm, 0x10eb14, duty | 0x80000000); in gm107_fan_pwm_set()
Dnv40.c127 nv40_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in nv40_fan_pwm_get() argument
132 *duty = (reg & 0x7fff0000) >> 16; in nv40_fan_pwm_get()
141 *duty = (reg & 0x7fffffff); in nv40_fan_pwm_get()
153 nv40_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in nv40_fan_pwm_set() argument
156 nv_mask(therm, 0x0010f0, 0x7fff7fff, (duty << 16) | divs); in nv40_fan_pwm_set()
160 nv_mask(therm, 0x0015f4, 0x7fffffff, duty); in nv40_fan_pwm_set()
Dnv50.c69 nv50_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in nv50_fan_pwm_get() argument
77 *duty = nv_rd32(therm, 0x00e118 + (id * 8)); in nv50_fan_pwm_get()
85 nv50_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in nv50_fan_pwm_set() argument
92 nv_wr32(therm, 0x00e118 + (id * 8), duty | 0x80000000); in nv50_fan_pwm_set()
/linux-4.1.27/drivers/pwm/
Dpwm-renesas-tpu.c86 u16 duty; member
187 tpu_pwm_write(pwm, TPU_TGRAn, pwm->duty); in tpu_pwm_timer_start()
191 pwm->channel, pwm->duty, pwm->period); in tpu_pwm_timer_start()
235 pwm->duty = 0; in tpu_pwm_request()
262 u32 duty; in tpu_pwm_config() local
284 duty = clk_rate / prescalers[prescaler] in tpu_pwm_config()
286 if (duty > period) in tpu_pwm_config()
289 duty = 0; in tpu_pwm_config()
294 clk_rate, prescalers[prescaler], period, duty); in tpu_pwm_config()
301 pwm->duty = duty; in tpu_pwm_config()
[all …]
Dpwm-atmel-tcb.c36 unsigned duty; /* PWM duty expressed in clk cycles */ member
87 tcbpwm->duty = 0; in atmel_tcb_pwm_request()
99 tcbpwm->duty = in atmel_tcb_pwm_request()
102 tcbpwm->duty = in atmel_tcb_pwm_request()
151 if (tcbpwm->duty == 0) in atmel_tcb_pwm_disable()
207 if (tcbpwm->duty == 0) in atmel_tcb_pwm_enable()
238 if (tcbpwm->duty != tcbpwm->period && tcbpwm->duty > 0) { in atmel_tcb_pwm_enable()
257 __raw_writel(tcbpwm->duty, regs + ATMEL_TC_REG(group, RA)); in atmel_tcb_pwm_enable()
259 __raw_writel(tcbpwm->duty, regs + ATMEL_TC_REG(group, RB)); in atmel_tcb_pwm_enable()
282 unsigned duty; in atmel_tcb_pwm_config() local
[all …]
Dpwm-clps711x.c72 unsigned int duty; in clps711x_pwm_config() local
77 duty = clps711x_get_duty(pwm, duty_ns); in clps711x_pwm_config()
78 clps711x_pwm_update_val(priv, pwm->hwpwm, duty); in clps711x_pwm_config()
86 unsigned int duty; in clps711x_pwm_enable() local
88 duty = clps711x_get_duty(pwm, pwm_get_duty_cycle(pwm)); in clps711x_pwm_enable()
89 clps711x_pwm_update_val(priv, pwm->hwpwm, duty); in clps711x_pwm_enable()
Dpwm-rockchip.c41 unsigned long duty; member
105 unsigned long period, duty; in rockchip_pwm_config() local
122 duty = div; in rockchip_pwm_config()
129 writel(duty, pc->base + pc->data->regs.duty); in rockchip_pwm_config()
190 .duty = 0x04,
202 .duty = 0x08,
214 .duty = 0x08,
Dpwm-bfin.c69 unsigned long period, duty; in bfin_pwm_config() local
78 duty = period - val; in bfin_pwm_config()
80 if (duty >= period) in bfin_pwm_config()
81 duty = period - 1; in bfin_pwm_config()
84 set_gptimer_pwidth(priv->pin, duty); in bfin_pwm_config()
Dpwm-jz4740.c113 unsigned long period, duty; in jz4740_pwm_config() local
132 duty = period - tmp; in jz4740_pwm_config()
134 if (duty >= period) in jz4740_pwm_config()
135 duty = period - 1; in jz4740_pwm_config()
142 jz4740_timer_set_duty(pwm->hwpwm, duty); in jz4740_pwm_config()
Dpwm-pca9685.c73 unsigned long long duty; in pca9685_pwm_config() local
98 duty = 4096 * (unsigned long long)duty_ns; in pca9685_pwm_config()
99 duty = DIV_ROUND_UP_ULL(duty, period_ns); in pca9685_pwm_config()
106 regmap_write(pca->regmap, reg, (int)duty & 0xff); in pca9685_pwm_config()
113 regmap_write(pca->regmap, reg, ((int)duty >> 8) & 0xf); in pca9685_pwm_config()
Dpwm-fsl-ftm.c223 unsigned long long duty; in fsl_pwm_calculate_duty() local
227 duty = (unsigned long long)duty_ns * (val + 1); in fsl_pwm_calculate_duty()
228 do_div(duty, period_ns); in fsl_pwm_calculate_duty()
230 return (unsigned long)duty; in fsl_pwm_calculate_duty()
237 u32 period, duty; in fsl_pwm_config() local
271 duty = fsl_pwm_calculate_duty(fpc, period_ns, duty_ns); in fsl_pwm_config()
275 regmap_write(fpc->regmap, FTM_CV(pwm->hwpwm), duty); in fsl_pwm_config()
Dpwm-img.c91 u32 val, div, duty, timebase; in img_pwm_config() local
124 duty = DIV_ROUND_UP(timebase * duty_ns, period_ns); in img_pwm_config()
132 val = (duty << PWM_CH_CFG_DUTY_SHIFT) | in img_pwm_config()
/linux-4.1.27/drivers/leds/
Dleds-pwm.c33 int duty; member
44 int new_duty = led_dat->duty; in __led_pwm_set()
68 unsigned long long duty = led_dat->period; in led_pwm_set() local
70 duty *= brightness; in led_pwm_set()
71 do_div(duty, max); in led_pwm_set()
74 duty = led_dat->period - duty; in led_pwm_set()
76 led_dat->duty = duty; in led_pwm_set()
/linux-4.1.27/Documentation/hwmon/
Dvt1211167 Each PWM has 4 associated distinct output duty-cycles: full, high, low and
172 thermal thresholds exist that controls both PWMs output duty-cycles. The
181 pwm[1-2]_auto_point4_pwm full speed duty-cycle (hard-wired to 255)
182 pwm[1-2]_auto_point3_pwm high speed duty-cycle
183 pwm[1-2]_auto_point2_pwm low speed duty-cycle
184 pwm[1-2]_auto_point1_pwm off duty-cycle (hard-wired to 0)
194 PWM output duty-cycle based on the input temperature:
199 full speed duty-cycle full speed duty-cycle
201 high speed duty-cycle full speed duty-cycle
203 low speed duty-cycle high speed duty-cycle
[all …]
Ddme1737143 attribute that needs to be set to the maximum attainable RPM (fan at 100% duty-
155 manual mode, the fan speed is set by writing the duty-cycle value to the
157 current duty-cycle as set by the fan controller in the chip. All PWM outputs
168 duty-cycles: full, low, and min. Full is internally hard-wired to 255 (100%)
174 pwm[1-3]_auto_point2_pwm full-speed duty-cycle (255, i.e., 100%)
175 pwm[1-3]_auto_point1_pwm low-speed duty-cycle
176 pwm[1-3]_auto_pwm_min min-speed duty-cycle
183 The chip adjusts the output duty-cycle linearly in the range of auto_point1_pwm
186 auto_point1_temp_hyst value, the output duty-cycle is set to the auto_pwm_min
189 duty-cycle. If any of the temperatures rise above the auto_point3_temp value,
[all …]
Dlm9398 a minimum pulse width of 5 clocks (at 22.5kHz => 6.25% duty cycle), and
99 a maximum pulse width of 80 clocks (at 22.5kHz => 99.88% duty cycle).
104 contains a value controlling the duty cycle for the PWM signal used when
106 indicating minimum duty cycle and 15 indicating maximum.
137 and pwm2 are used to set the manual duty cycle; each is an integer (0-255)
138 where 0 is 0% duty cycle, and 255 is 100%. Note that the duty cycle values
141 PWM mode is disabled, the value of pwm1 and pwm2 indicates the current duty
218 A spin-up cycle occurs when a PWM output is commanded from 0% duty cycle to
219 some value > 0%. The LM93 supports a minimum duty cycle during spin-up. These
221 file has the same representation as other PWM duty cycle values. The
[all …]
Dmax663938 pwm1 RW Fan 1 target duty cycle (0..255)
39 pwm2 RW Fan 2 target duty cycle (0..255)
Df71882fg99 There are 2 modes to specify the speed of the fan, PWM duty cycle (or DC
100 voltage) mode, where 0-100% duty cycle (0-100% of 12V) is specified. And RPM
122 You ask for a specific PWM duty cycle / DC voltage or a specific % of
133 * 3: Thermostat mode (Only available on the F8000 when in duty cycle mode)
Dw83792d133 specific speed set by pwm# and automatically controlled its PWM duty cycle
136 (1) If the temperature still exceeds the high limit, PWM duty
143 (3) If the temperature goes below the low limit, PWM duty cycle will decrease
160 pwm[1-3] - this file stores PWM duty cycle or DC value (fan speed) in range:
Dw83l786ng44 pwm[1-2] - this file stores PWM duty cycle or DC value (fan speed) in range:
Dw83791d78 Each fan controlled is controlled by PWM. The PWM duty cycle can be read and
Df71805f152 You ask for a specific PWM duty cycle or DC voltage by writing to the
Dnct677587 pwm[1-5] - this file stores PWM duty cycle or DC value (fan speed) in range:
Dw83627ehf103 pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range:
/linux-4.1.27/drivers/hwmon/
Dpwm-fan.c43 unsigned long duty; in __set_pwm() local
50 duty = DIV_ROUND_UP(pwm * (ctx->pwm->period - 1), MAX_PWM); in __set_pwm()
51 ret = pwm_config(ctx->pwm, duty, ctx->pwm->period); in __set_pwm()
306 unsigned long duty; in pwm_fan_resume() local
312 duty = DIV_ROUND_UP(ctx->pwm_value * (ctx->pwm->period - 1), MAX_PWM); in pwm_fan_resume()
313 ret = pwm_config(ctx->pwm, duty, ctx->pwm->period); in pwm_fan_resume()
Df75375s.c780 bool manu, duty; in f75375_init() local
786 duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1); in f75375_init()
787 if (!manu && duty) in f75375_init()
790 else if (manu && !duty) in f75375_init()
793 else if (!manu && !duty) in f75375_init()
/linux-4.1.27/Documentation/devicetree/bindings/video/backlight/
Dpwm-backlight.txt8 The actual brightness level (PWM duty cycle) will be interpolated
9 from these values. 0 means a 0% duty cycle (darkest/off), while the
10 last value in the array represents a 100% duty cycle (brightest).
/linux-4.1.27/drivers/staging/iio/trigger/
Diio-trig-bfin-timer.c62 unsigned int duty; member
106 if (val <= 4 || val <= st->duty) in iio_bfin_tmr_frequency_store()
110 set_gptimer_pwidth(st->t->id, val - st->duty); in iio_bfin_tmr_frequency_store()
234 st->duty = val; in iio_bfin_tmr_trigger_probe()
245 st->duty = 1; in iio_bfin_tmr_trigger_probe()
/linux-4.1.27/Documentation/devicetree/bindings/regulator/
Dpwm-regulator.txt6 - voltage-table: voltage and duty table, include 2 members in each set of
7 brackets, first one is voltage(unit: uv), the next is duty(unit: percent)
/linux-4.1.27/arch/cris/include/uapi/asm/
Detraxgpio.h184 int duty; /* 0..255 */ member
218 int duty; /* 0..255 */ member
/linux-4.1.27/drivers/video/backlight/
Dlp8788_bl.c128 unsigned int duty; in lp8788_pwm_ctrl() local
136 duty = br * period / max_br; in lp8788_pwm_ctrl()
150 pwm_config(bl->pwm, duty, period); in lp8788_pwm_ctrl()
151 if (duty) in lp8788_pwm_ctrl()
Dlm3630a_bl.c166 unsigned int duty = br * period / br_max; in lm3630a_pwm_ctrl() local
168 pwm_config(pchip->pwmd, duty, period); in lm3630a_pwm_ctrl()
169 if (duty) in lm3630a_pwm_ctrl()
Dlp855x_bl.c238 unsigned int duty = br * period / max_br; in lp855x_pwm_ctrl() local
250 pwm_config(lp->pwm, duty, period); in lp855x_pwm_ctrl()
251 if (duty) in lp855x_pwm_ctrl()
/linux-4.1.27/Documentation/devicetree/bindings/hwmon/
Dg762.txt15 - "pwm_polarity": pwm polarity. Accepted values are 0 (positive duty)
16 and 1 (negative duty).
/linux-4.1.27/arch/mips/include/asm/mach-jz4740/
Dtimer.h94 static inline void jz4740_timer_set_duty(unsigned int timer, uint16_t duty) in jz4740_timer_set_duty() argument
96 writew(duty, jz4740_timer_base + JZ_REG_TIMER_DHR(timer)); in jz4740_timer_set_duty()
/linux-4.1.27/arch/arm/boot/dts/
Dimx6dl-tx6u-811x.dts32 * the PWM value and the actual duty cycle
54 * the PWM value and the actual duty cycle
Dimx6q-tx6q-1110.dts32 * the PWM value and the actual duty cycle
54 * the PWM value and the actual duty cycle
Dimx6dl-tx6dl-comtft.dts30 * the PWM value and the actual duty cycle
Dimx6q-tx6q-1010-comtft.dts30 * the PWM value and the actual duty cycle
Dimx6q-tx6q-1020-comtft.dts30 * the PWM value and the actual duty cycle
Dimx6dl-tx6u-801x.dts30 * the PWM value and the actual duty cycle
Dimx6q-tx6q-1010.dts30 * the PWM value and the actual duty cycle
Dimx6q-tx6q-1020.dts30 * the PWM value and the actual duty cycle
Dimx28-tx28.dts159 * PWM value and the actual duty cycle
/linux-4.1.27/include/linux/
Dpwm.h106 static inline void pwm_set_duty_cycle(struct pwm_device *pwm, unsigned int duty) in pwm_set_duty_cycle() argument
109 pwm->duty_cycle = duty; in pwm_set_duty_cycle()
/linux-4.1.27/arch/cris/arch-v32/drivers/mach-a3/
Dgpio.c858 unsigned int duty; in gpio_pwm_set_duty() local
861 if (get_user(duty, &((struct io_pwm_set_duty *) arg)->duty)) in gpio_pwm_set_duty()
863 if (duty > 255) in gpio_pwm_set_duty()
865 rw_pwm_duty.data = duty; in gpio_pwm_set_duty()
/linux-4.1.27/drivers/input/misc/
Dmax8997_haptic.c75 unsigned int duty = chip->pwm_period * chip->level / 100; in max8997_haptic_set_duty_cycle() local
76 ret = pwm_config(chip->pwm, duty, chip->pwm_period); in max8997_haptic_set_duty_cycle()
/linux-4.1.27/Documentation/leds/
Dleds-lp3944.txt23 - duty cycle: percentage of the period the led is on, from 0 to 100
/linux-4.1.27/arch/arm/include/asm/hardware/
Dlocomo.h215 void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf);
/linux-4.1.27/Documentation/
Dpwm.txt103 characterizes a signal starts high for the duration of the duty cycle and
105 polarity starts low for the duration of the duty cycle and goes high for the
Dinitrd.txt353 this time executing /sbin/init. Again, it would be the duty of this init
/linux-4.1.27/Documentation/ABI/testing/
Dsysfs-class-pwm62 Sets the PWM signal duty cycle in nanoseconds.
/linux-4.1.27/Documentation/isdn/
DCREDITS65 For heavy-duty-beta-testing with his BBS ;)
/linux-4.1.27/Documentation/devicetree/bindings/mfd/
Dmax77693.txt31 users with tactile feedback. PWM period and duty-cycle are varied in
/linux-4.1.27/drivers/clk/
DKconfig138 at 50% duty cycle.
/linux-4.1.27/arch/arm/common/
Dlocomo.c796 void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf) in locomo_frontlight_set() argument
809 locomo_writel(duty, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); in locomo_frontlight_set()
/linux-4.1.27/Documentation/cpu-freq/
Dgovernors.txt237 CPUFREQ_GOV_START: This governor shall start its duty for the CPU
239 CPUFREQ_GOV_STOP: This governor shall end its duty for the CPU
/linux-4.1.27/kernel/time/
DKconfig129 handle the timekeeping duty.
/linux-4.1.27/Documentation/thermal/
Dintel_powerclamp.txt78 clamping actions of controlled duty ratio and duration. Each per-CPU
/linux-4.1.27/drivers/gpu/drm/radeon/
Dsi_dpm.c6060 u32 duty, duty100; in si_fan_ctrl_get_fan_speed_percent() local
6067 duty = (RREG32(CG_THERMAL_STATUS) & FDO_PWM_DUTY_MASK) >> FDO_PWM_DUTY_SHIFT; in si_fan_ctrl_get_fan_speed_percent()
6072 tmp64 = (u64)duty * 100; in si_fan_ctrl_get_fan_speed_percent()
6087 u32 duty, duty100; in si_fan_ctrl_set_fan_speed_percent() local
6106 duty = (u32)tmp64; in si_fan_ctrl_set_fan_speed_percent()
6109 tmp |= FDO_STATIC_DUTY(duty); in si_fan_ctrl_set_fan_speed_percent()
Dci_dpm.c1069 u32 duty, duty100; in ci_fan_ctrl_get_fan_speed_percent() local
1076 duty = (RREG32_SMC(CG_THERMAL_STATUS) & FDO_PWM_DUTY_MASK) >> FDO_PWM_DUTY_SHIFT; in ci_fan_ctrl_get_fan_speed_percent()
1081 tmp64 = (u64)duty * 100; in ci_fan_ctrl_get_fan_speed_percent()
1095 u32 duty, duty100; in ci_fan_ctrl_set_fan_speed_percent() local
1115 duty = (u32)tmp64; in ci_fan_ctrl_set_fan_speed_percent()
1118 tmp |= FDO_STATIC_DUTY(duty); in ci_fan_ctrl_set_fan_speed_percent()
/linux-4.1.27/drivers/regulator/
DKconfig501 duty cycle can increase or decrease the voltage.
/linux-4.1.27/Documentation/development-process/
D4.Coding385 which is broken by the change. For a widely-used function, this duty can
/linux-4.1.27/Documentation/virtual/uml/
DUserModeLinux-HOWTO.txt3776 Aha! The light dawns. That first page is doing double duty as a