Searched refs:duty_cycle (Results 1 - 25 of 116) sorted by last modified time

12345

/linux-master/drivers/pwm/
H A Dpwm-dwc-core.c52 tmp = DIV_ROUND_CLOSEST_ULL(state->duty_cycle, dwc->clk_ns);
57 tmp = DIV_ROUND_CLOSEST_ULL(state->period - state->duty_cycle,
150 state->duty_cycle = duty;
H A Dcore.c60 * best effort inverted .polarity and fixed .duty_cycle respectively.
65 s2.duty_cycle = s1.period - s1.duty_cycle;
73 state->duty_cycle < state->period)
92 last->duty_cycle > s2.duty_cycle &&
93 last->duty_cycle <= state->duty_cycle)
96 state->duty_cycle, state->period,
97 s2.duty_cycle, s
[all...]
H A Dpwm-img.c197 err = img_pwm_config(chip, pwm, state->duty_cycle, state->period);
H A Dsysfs.c80 return sysfs_emit(buf, "%llu\n", state.duty_cycle);
99 state.duty_cycle = val;
215 return sysfs_emit(buf, "%u %u\n", result.period, result.duty_cycle);
219 static DEVICE_ATTR_RW(duty_cycle);
H A Dpwm-xilinx.c122 duty_cycles = min_t(u64, state->duty_cycle, U32_MAX * NSEC_PER_SEC);
179 state->duty_cycle = xilinx_timer_get_period(priv, tlr1, tcsr1);
187 if (state->period == state->duty_cycle)
188 state->duty_cycle = 0;
H A Dpwm-vt8500.c210 * pwm->state.period && state->duty_cycle == pwm->state.duty_cycle
215 err = vt8500_pwm_config(chip, pwm, state->duty_cycle, state->period);
H A Dpwm-twl-led.c22 * - A request for .duty_cycle = 0 results in an output wave with one active
76 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL4030_LED_MAX, period_ns) + 1; local
91 if (duty_cycle == 1)
92 duty_cycle = 2;
93 else if (duty_cycle > TWL4030_LED_MAX)
94 duty_cycle = 1;
98 pwm_config[1] = duty_cycle;
172 * pwm->state.period && state->duty_cycle == pwm->state.duty_cycle
178 state->duty_cycle, stat
196 int duty_cycle = (duty_ns * TWL6030_LED_MAX) / period_ns; local
[all...]
H A Dpwm-twl.c62 int duty_cycle = DIV64_U64_ROUND_UP(duty_ns * TWL_PWM_MAX, period_ns) + 1; local
77 if (duty_cycle == 1)
78 duty_cycle = 2;
79 else if (duty_cycle > TWL_PWM_MAX)
80 duty_cycle = 1;
84 pwm_config[1] = duty_cycle;
296 err = twl_pwm_config(chip, pwm, state->duty_cycle, state->period);
321 err = twl_pwm_config(chip, pwm, state->duty_cycle, state->period);
H A Dpwm-visconti.c49 u32 period, duty_cycle, pwmc0; local
67 if (state->duty_cycle > period)
68 duty_cycle = period;
70 duty_cycle = state->duty_cycle;
78 duty_cycle /= 1000;
94 duty_cycle >>= pwmc0;
99 writel(duty_cycle, priv->base + PIPGM_PDUT(pwm->hwpwm));
117 state->duty_cycle = (duty << pwmc0_clk) * NSEC_PER_USEC;
H A Dpwm-tiehrpwm.c426 err = ehrpwm_pwm_config(chip, pwm, state->duty_cycle, state->period);
H A Dpwm-tiecap.c194 err = ecap_pwm_config(chip, pwm, state->duty_cycle,
H A Dpwm-tegra.c256 err = tegra_pwm_config(chip, pwm, state->duty_cycle, state->period);
H A Dpwm-sunplus.c107 if (state->duty_cycle == state->period) {
116 duty = mul_u64_u64_div_u64(state->duty_cycle, clk_rate,
150 state->duty_cycle = DIV64_U64_ROUND_UP((u64)dd_freq * (u64)duty * NSEC_PER_SEC,
H A Dpwm-stm32.c142 * contains period + duty_cycle. So, subtract period.
298 result->duty_cycle = DIV_ROUND_UP_ULL(dty, rate);
450 state->duty_cycle, state->period);
508 state->duty_cycle = DIV_ROUND_UP_ULL(dty, rate);
H A Dpwm-sun4i.c132 state->duty_cycle = DIV_ROUND_UP_ULL(state->period, 2);
161 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate);
183 (state->duty_cycle * clk_rate * 2 >= NSEC_PER_SEC);
224 div *= state->duty_cycle;
H A Dpwm-stmpe.c277 err = stmpe_24xx_pwm_config(chip, pwm, state->duty_cycle, state->period);
H A Dpwm-sti.c362 result->duty_cycle = 0;
376 result->duty_cycle = high * NSEC_PER_SEC;
377 result->duty_cycle /= effective_ticks;
418 err = sti_pwm_config(chip, pwm, state->duty_cycle, state->period);
H A Dpwm-stm32-lp.c79 dty = prd * state->duty_cycle;
185 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate);
/linux-master/drivers/video/fbdev/core/
H A Dfbmon.c1059 * xres * duty_cycle
1061 * 100 - duty_cycle
1074 u32 c_val, m_val, duty_cycle, hblank; local
1080 duty_cycle = c_val - m_val;
1081 hblank = (xres * duty_cycle)/(100000 - duty_cycle);
1092 * xres * duty_cycle
1094 * 100 - duty_cycle
1107 u32 duty_cycle, h_period, hblank; local
1120 duty_cycle
[all...]
/linux-master/drivers/bus/
H A Dts-nbus.c294 state.duty_cycle = state.period;
/linux-master/drivers/phy/microchip/
H A Dsparx5_serdes.c113 u8 duty_cycle; /* Set output level to half/full */ member in struct:sparx5_sd25g28_args
241 u8 duty_cycle; /* Set output level to half/full */ member in struct:sparx5_sd10g28_mode_preset
567 .duty_cycle = 0x2,
576 .duty_cycle = 0x0,
585 .duty_cycle = 0x0,
594 .duty_cycle = 0x0,
603 .duty_cycle = 0x0,
612 .duty_cycle = 0x0,
837 .cfg_lane_reserve_15_8 = mode->duty_cycle,
/linux-master/include/linux/
H A Dpwm.h51 * @duty_cycle: PWM duty cycle (in nanoseconds)
61 u64 duty_cycle; member in struct:pwm_state
128 return state.duty_cycle;
155 * Once the function returns, you can adjust the ->enabled and ->duty_cycle
158 * ->duty_cycle is initially set to zero to avoid cases where the current
159 * ->duty_cycle value exceed the pwm_args->period one, which would trigger
160 * an error if the user calls pwm_apply_might_sleep() without adjusting ->duty_cycle
176 state->duty_cycle = 0;
188 * For example if you want to get the duty_cycle expressed in percent, call:
199 return DIV_ROUND_CLOSEST_ULL((u64)state->duty_cycle * scal
222 pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle, unsigned int scale) argument
242 unsigned int duty_cycle; member in struct:pwm_capture
[all...]
/linux-master/drivers/video/backlight/
H A Dlm3630a_bl.c181 pchip->pwmd_state.enabled = pchip->pwmd_state.duty_cycle ? true : false;
/linux-master/drivers/staging/greybus/
H A Dpwm.c196 u64 duty_cycle = state->duty_cycle; local
218 * PWM privodes 64-bit period and duty_cycle, but greybus only accepts
224 if (duty_cycle > period)
225 duty_cycle = period;
227 err = gb_pwm_config_operation(chip, pwm->hwpwm, duty_cycle, period);
/linux-master/drivers/regulator/
H A Dpwm-regulator.c162 pstate.duty_cycle = pstate.period;
164 pstate.duty_cycle = 0;
343 pstate.duty_cycle = pstate.period;
345 pstate.duty_cycle = 0;

Completed in 219 milliseconds

12345