/u-boot/drivers/pwm/ |
H A D | cros_ec_pwm.c | 12 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 D | rk_pwm.c | 62 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 D | sunxi_pwm.c | 64 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), ®s->ch0_period); 109 debug("%s: prescaler: %d, period: %d, duty: %d\n", 111 best_period, duty);
|
H A D | pwm-meson.c | 104 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 D | cros_ec_pwm.c | 16 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 D | pwm.h | 11 unsigned long duty; member in struct:rockchip_pwm_regs
|
/u-boot/drivers/led/ |
H A D | led_pwm.c | 19 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 D | cros_ec_sandbox.c | 78 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 D | cros_ec.c | 1164 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 D | nexell.h | 348 #define TO_DUTY_NS(duty, freq) (duty ? TO_PERIOD_NS(freq) / (100 / duty) : 0)
|
/u-boot/arch/sandbox/include/asm/ |
H A D | test.h | 137 * @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 D | cros_ec.h | 507 * 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 D | ec_commands.h | 1522 /* 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
|