/linux-master/drivers/pwm/ |
H A D | pwm-dwc-core.c | 52 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 D | core.c | 60 * 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 D | pwm-img.c | 197 err = img_pwm_config(chip, pwm, state->duty_cycle, state->period);
|
H A D | sysfs.c | 80 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 D | pwm-xilinx.c | 122 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 D | pwm-vt8500.c | 210 * pwm->state.period && state->duty_cycle == pwm->state.duty_cycle 215 err = vt8500_pwm_config(chip, pwm, state->duty_cycle, state->period);
|
H A D | pwm-twl-led.c | 22 * - 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 D | pwm-twl.c | 62 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 D | pwm-visconti.c | 49 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 D | pwm-tiehrpwm.c | 426 err = ehrpwm_pwm_config(chip, pwm, state->duty_cycle, state->period);
|
H A D | pwm-tiecap.c | 194 err = ecap_pwm_config(chip, pwm, state->duty_cycle,
|
H A D | pwm-tegra.c | 256 err = tegra_pwm_config(chip, pwm, state->duty_cycle, state->period);
|
H A D | pwm-sunplus.c | 107 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 D | pwm-stm32.c | 142 * 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 D | pwm-sun4i.c | 132 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 D | pwm-stmpe.c | 277 err = stmpe_24xx_pwm_config(chip, pwm, state->duty_cycle, state->period);
|
H A D | pwm-sti.c | 362 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 D | pwm-stm32-lp.c | 79 dty = prd * state->duty_cycle; 185 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate);
|
/linux-master/drivers/video/fbdev/core/ |
H A D | fbmon.c | 1059 * 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 D | ts-nbus.c | 294 state.duty_cycle = state.period;
|
/linux-master/drivers/phy/microchip/ |
H A D | sparx5_serdes.c | 113 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 D | pwm.h | 51 * @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 D | lm3630a_bl.c | 181 pchip->pwmd_state.enabled = pchip->pwmd_state.duty_cycle ? true : false;
|
/linux-master/drivers/staging/greybus/ |
H A D | pwm.c | 196 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 D | pwm-regulator.c | 162 pstate.duty_cycle = pstate.period; 164 pstate.duty_cycle = 0; 343 pstate.duty_cycle = pstate.period; 345 pstate.duty_cycle = 0;
|