Searched refs:duty (Results 1 - 13 of 13) sorted by relevance

/u-boot/drivers/pwm/
H A Dcros_ec_pwm.c12 uint duty; member in struct:cros_ec_pwm_priv
19 uint duty; local
25 /* No way to set the period, only a relative duty cycle */
26 duty = EC_PWM_MAX_DUTY * duty_ns / period_ns;
27 if (duty > EC_PWM_MAX_DUTY)
28 duty = EC_PWM_MAX_DUTY;
31 priv->duty = duty;
32 debug("%s: duty=%#x to-be-set\n", __func__, duty);
[all...]
H A Drk_pwm.c62 unsigned long period, duty; local
69 * Lock the period and duty of previous configuration, then
70 * change the duty and period, that would not be effective.
79 duty = lldiv((uint64_t)priv->freq * duty_ns,
83 writel(duty, priv->base + regs->duty);
92 * the configuration of duty, period and polarity
99 debug("%s: period=%lu, duty=%lu\n", __func__, period, duty);
163 .duty
[all...]
H A Dsunxi_pwm.c64 u32 v, best_period = 0, duty; local
91 duty = lldiv(best_scaled_freq * duty_ns, nsecs_per_sec);
107 SUNXI_PWM_CH0_PERIOD_DUTY(duty), &regs->ch0_period);
109 debug("%s: prescaler: %d, period: %d, duty: %d\n",
111 best_period, duty);
H A Dpwm-meson.c104 unsigned int duty, period, pre_div, cnt, duty_cnt; local
115 duty = period_ns - duty_ns;
117 duty = duty_ns;
119 debug("%s%d: polarity %s duty %d period %d\n", __func__, channeln,
120 channel->polarity ? "true" : "false", duty, period);
144 if (duty == period) {
148 } else if (duty == 0) {
153 /* Then check is we can have the duty with the same pre_div */
154 duty_cnt = div64_u64(fin_freq * (u64)duty, NSEC_PER_SEC * (pre_div + 1));
156 printf("%s%d: unable to get duty cycl
[all...]
/u-boot/test/dm/
H A Dcros_ec_pwm.c16 uint duty; local
25 ut_assertok(sandbox_cros_ec_get_pwm_duty(ec, 0, &duty));
26 ut_asserteq(50 * EC_PWM_MAX_DUTY / 100, duty);
30 ut_assertok(sandbox_cros_ec_get_pwm_duty(ec, 0, &duty));
31 ut_asserteq(2719 * EC_PWM_MAX_DUTY / 15721, duty);
34 ut_assertok(sandbox_cros_ec_get_pwm_duty(ec, 0, &duty));
35 ut_asserteq(0, duty);
38 ut_assertok(sandbox_cros_ec_get_pwm_duty(ec, 0, &duty));
39 ut_asserteq(2719 * EC_PWM_MAX_DUTY / 15721, duty);
43 ut_assertok(sandbox_cros_ec_get_pwm_duty(ec, 1, &duty));
[all...]
/u-boot/arch/arm/include/asm/arch-rockchip/
H A Dpwm.h11 unsigned long duty; member in struct:rockchip_pwm_regs
/u-boot/drivers/led/
H A Dled_pwm.c19 uint duty; /* duty cycle in ns */ member in struct:led_pwm_priv
34 ret = pwm_set_config(priv->pwm, priv->channel, priv->period, priv->duty);
129 priv->duty = priv->period * def_brightness / max_brightness;
131 priv->duty = priv->period;
/u-boot/drivers/misc/
H A Dcros_ec_sandbox.c78 uint duty; /* not ns, EC_PWM_MAX_DUTY = 100% */ member in struct:ec_pwm_channel
574 resp->duty = pwm->duty;
587 pwm->duty = req->duty;
661 int sandbox_cros_ec_get_pwm_duty(struct udevice *dev, uint index, uint *duty) argument
669 *duty = pwm->duty;
H A Dcros_ec.c1164 int cros_ec_set_pwm_duty(struct udevice *dev, uint8_t index, uint16_t duty) argument
1169 p.duty = duty;
/u-boot/arch/arm/mach-nexell/include/mach/
H A Dnexell.h348 #define TO_DUTY_NS(duty, freq) (duty ? TO_PERIOD_NS(freq) / (100 / duty) : 0)
/u-boot/arch/sandbox/include/asm/
H A Dtest.h137 * @duty_ns: Current duty cycle of the PWM in nanoseconds
297 * @duty: Current duty cycle in 0..EC_PWM_MAX_DUTY range.
300 int sandbox_cros_ec_get_pwm_duty(struct udevice *dev, uint index, uint *duty);
/u-boot/include/
H A Dcros_ec.h507 * cros_ec_set_pwm_duty() - Set duty cycle of a generic pwm
509 * Note that duty value needs to be passed to the EC as a 16 bit number
514 * @param duty Desired duty cycle, in 0..EC_PWM_MAX_DUTY range.
517 int cros_ec_set_pwm_duty(struct udevice *dev, uint8_t index, uint16_t duty);
H A Dec_commands.h1522 /* Set target fan PWM duty cycle */
1537 /* 16 bit duty cycle, 0xffff = 100% */
1551 uint16_t duty; /* Duty cycle, EC_PWM_MAX_DUTY = 100% */ member in struct:ec_params_pwm_set_duty
1564 uint16_t duty; /* Duty cycle, EC_PWM_MAX_DUTY = 100% */ member in struct:ec_response_pwm_get_duty

Completed in 92 milliseconds