| /OK3568_Linux_fs/kernel/drivers/pwm/ |
| H A D | core.c | 498 s2.duty_cycle = s1.period - s1.duty_cycle; in pwm_apply_state_debug() 506 state->duty_cycle < state->period) in pwm_apply_state_debug() 525 last->duty_cycle > s2.duty_cycle && in pwm_apply_state_debug() 526 last->duty_cycle <= state->duty_cycle) in pwm_apply_state_debug() 529 state->duty_cycle, state->period, in pwm_apply_state_debug() 530 s2.duty_cycle, s2.period, in pwm_apply_state_debug() 531 last->duty_cycle, last->period); in pwm_apply_state_debug() 533 if (state->enabled && state->duty_cycle < s2.duty_cycle) in pwm_apply_state_debug() 536 state->duty_cycle, state->period, in pwm_apply_state_debug() 537 s2.duty_cycle, s2.period); in pwm_apply_state_debug() [all …]
|
| H A D | pwm-cros-ec.c | 33 u16 duty_cycle; member 120 u16 duty_cycle; in cros_ec_pwm_apply() local 131 duty_cycle = state->enabled ? state->duty_cycle : 0; in cros_ec_pwm_apply() 133 ret = cros_ec_pwm_set_duty(ec_pwm->ec, pwm->hwpwm, duty_cycle); in cros_ec_pwm_apply() 137 channel->duty_cycle = state->duty_cycle; in cros_ec_pwm_apply() 167 if (ret == 0 && channel->duty_cycle > 0) in cros_ec_pwm_get_state() 168 state->duty_cycle = channel->duty_cycle; in cros_ec_pwm_get_state() 170 state->duty_cycle = ret; in cros_ec_pwm_get_state()
|
| H A D | pwm-twl-led.c | 61 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL4030_LED_MAX, period_ns) + 1; in twl4030_pwmled_config() local 76 if (duty_cycle == 1) in twl4030_pwmled_config() 77 duty_cycle = 2; in twl4030_pwmled_config() 78 else if (duty_cycle > TWL4030_LED_MAX) in twl4030_pwmled_config() 79 duty_cycle = 1; in twl4030_pwmled_config() 83 pwm_config[1] = duty_cycle; in twl4030_pwmled_config() 143 int duty_cycle = (duty_ns * TWL6030_LED_MAX) / period_ns; in twl6030_pwmled_config() local 147 on_time = duty_cycle & 0xff; in twl6030_pwmled_config()
|
| H A D | pwm-sl28cpld.c | 74 #define SL28CPLD_PWM_FROM_DUTY_CYCLE(duty_cycle) \ argument 75 (DIV_ROUND_DOWN_ULL((duty_cycle), NSEC_PER_SEC / SL28CPLD_PWM_CLK)) 106 state->duty_cycle = SL28CPLD_PWM_TO_DUTY_CYCLE(reg); in sl28cpld_pwm_get_state() 117 state->duty_cycle = min(state->duty_cycle, state->period); in sl28cpld_pwm_get_state() 147 cycle = SL28CPLD_PWM_FROM_DUTY_CYCLE(state->duty_cycle); in sl28cpld_pwm_apply()
|
| H A D | pwm-iqs620a.c | 49 unsigned int duty_cycle; in iqs620_pwm_apply() local 74 duty_cycle = min_t(u64, state->duty_cycle, IQS620_PWM_PERIOD_NS); in iqs620_pwm_apply() 75 duty_scale = duty_cycle * 256 / IQS620_PWM_PERIOD_NS; in iqs620_pwm_apply() 129 state->duty_cycle = DIV_ROUND_UP((iqs620_pwm->duty_val + 1) * in iqs620_pwm_get_state()
|
| H A D | pwm-imx-tpm.c | 122 real_state->duty_cycle = 0; in pwm_imx_tpm_round_state() 124 real_state->duty_cycle = state->duty_cycle; in pwm_imx_tpm_round_state() 126 tmp = (u64)p->mod * real_state->duty_cycle; in pwm_imx_tpm_round_state() 152 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in pwm_imx_tpm_get_state() 222 if (state->duty_cycle != c.duty_cycle) { in pwm_imx_tpm_apply_hw()
|
| H A D | pwm-twl.c | 63 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL_PWM_MAX, period_ns) + 1; in twl_pwm_config() local 78 if (duty_cycle == 1) in twl_pwm_config() 79 duty_cycle = 2; in twl_pwm_config() 80 else if (duty_cycle > TWL_PWM_MAX) in twl_pwm_config() 81 duty_cycle = 1; in twl_pwm_config() 85 pwm_config[1] = duty_cycle; in twl_pwm_config()
|
| H A D | pwm-sifive.c | 122 state->duty_cycle = in pwm_sifive_get_state() 151 unsigned int duty_cycle; in pwm_sifive_apply() local 170 duty_cycle = state->duty_cycle; in pwm_sifive_apply() 172 duty_cycle = 0; in pwm_sifive_apply() 180 num = (u64)duty_cycle * (1U << PWM_SIFIVE_CMPWIDTH); in pwm_sifive_apply()
|
| H A D | pwm-imx27.c | 93 unsigned int duty_cycle; member 167 val = imx->duty_cycle; in pwm_imx27_get_state() 170 state->duty_cycle = DIV_ROUND_UP_ULL(tmp, pwm_clk); in pwm_imx27_get_state() 237 c = clkrate * state->duty_cycle; in pwm_imx27_apply() 272 imx->duty_cycle = duty_cycles; in pwm_imx27_apply()
|
| H A D | pwm-zx.c | 94 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in zx_pwm_get_state() 165 state->duty_cycle != cstate.duty_cycle) { in zx_pwm_apply() 166 ret = zx_pwm_config(chip, pwm, state->duty_cycle, in zx_pwm_apply()
|
| H A D | pwm-crc.c | 77 if (pwm_get_duty_cycle(pwm) != state->duty_cycle || in crc_pwm_apply() 79 u64 level = state->duty_cycle * PWM_MAX_LEVEL; in crc_pwm_apply() 148 state->duty_cycle = in crc_pwm_get_state()
|
| H A D | pwm-hibvt.c | 145 state->duty_cycle = div_u64(value * 1000, freq); in hibvt_pwm_get_state() 160 state->duty_cycle != pwm->state.duty_cycle) { in hibvt_pwm_apply() 161 hibvt_pwm_config(chip, pwm, state->duty_cycle, state->period); in hibvt_pwm_apply()
|
| /OK3568_Linux_fs/kernel/drivers/media/rc/ |
| H A D | pwm-ir-tx.c | 21 unsigned int duty_cycle; member 30 static int pwm_ir_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in pwm_ir_set_duty_cycle() argument 34 pwm_ir->duty_cycle = duty_cycle; in pwm_ir_set_duty_cycle() 61 duty = DIV_ROUND_CLOSEST(pwm_ir->duty_cycle * period, 100); in pwm_ir_tx() 99 pwm_ir->duty_cycle = 50; in pwm_ir_probe()
|
| H A D | gpio-ir-tx.c | 21 unsigned int duty_cycle; member 30 static int gpio_ir_tx_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in gpio_ir_tx_set_duty_cycle() argument 34 gpio_ir->duty_cycle = duty_cycle; in gpio_ir_tx_set_duty_cycle() 103 pulse = DIV_ROUND_CLOSEST(gpio_ir->duty_cycle * (NSEC_PER_SEC / 100), in gpio_ir_tx_modulated() 105 space = DIV_ROUND_CLOSEST((100 - gpio_ir->duty_cycle) * in gpio_ir_tx_modulated() 187 gpio_ir->duty_cycle = 50; in gpio_ir_tx_probe()
|
| H A D | rc-loopback.c | 62 static int loop_set_tx_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in loop_set_tx_duty_cycle() argument 66 if (duty_cycle < 1 || duty_cycle > 99) { in loop_set_tx_duty_cycle() 67 dprintk("invalid duty cycle: %u\n", duty_cycle); in loop_set_tx_duty_cycle() 71 dprintk("setting duty cycle: %u\n", duty_cycle); in loop_set_tx_duty_cycle() 72 lodev->txduty = duty_cycle; in loop_set_tx_duty_cycle()
|
| H A D | ir-rx51.c | 27 unsigned int duty_cycle; /* carrier duty cycle */ member 48 duty = DIV_ROUND_CLOSEST(ir_rx51->duty_cycle * period, 100); in init_timing_params() 172 .duty_cycle = 50, 180 ir_rx51->duty_cycle = duty; in ir_rx51_set_duty_cycle()
|
| /OK3568_Linux_fs/kernel/include/linux/ |
| H A D | pwm.h | 72 u64 duty_cycle; member 146 pwm->state.duty_cycle = duty; in pwm_set_duty_cycle() 155 return state.duty_cycle; in pwm_get_duty_cycle() 213 state->duty_cycle = 0; in pwm_init_state() 235 return DIV_ROUND_CLOSEST_ULL((u64)state->duty_cycle * scale, in pwm_get_relative_duty_cycle() 258 pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle, in pwm_set_relative_duty_cycle() argument 261 if (!scale || duty_cycle > scale) in pwm_set_relative_duty_cycle() 264 state->duty_cycle = DIV_ROUND_CLOSEST_ULL((u64)duty_cycle * in pwm_set_relative_duty_cycle() 346 unsigned int duty_cycle; member 394 if (state.duty_cycle == duty_ns && state.period == period_ns) in pwm_config() [all …]
|
| /OK3568_Linux_fs/kernel/include/trace/events/ |
| H A D | pwm.h | 20 __field(u64, duty_cycle) 28 __entry->duty_cycle = state->duty_cycle; 34 __entry->pwm, __entry->period, __entry->duty_cycle,
|
| /OK3568_Linux_fs/kernel/drivers/leds/ |
| H A D | leds-lp3944.c | 133 u8 duty_cycle) in lp3944_dim_set_dutycycle() argument 147 if (duty_cycle > LP3944_DUTY_CYCLE_MAX) in lp3944_dim_set_dutycycle() 150 pwm_value = (duty_cycle * 255) / LP3944_DUTY_CYCLE_MAX; in lp3944_dim_set_dutycycle() 229 u8 duty_cycle; in lp3944_led_set_blink() local 248 duty_cycle = 100 * (*delay_on) / period; in lp3944_led_set_blink() 254 duty_cycle = 100 - duty_cycle; in lp3944_led_set_blink() 267 err = lp3944_dim_set_dutycycle(led->client, LP3944_DIM0, duty_cycle); in lp3944_led_set_blink()
|
| /OK3568_Linux_fs/kernel/drivers/net/wireless/ath/ath9k/ |
| H A D | mci.c | 106 (100 - btcoex->duty_cycle) / 100; in ath_mci_adjust_aggr_limit() 132 btcoex->duty_cycle = ath_mci_duty_cycle[num_profile]; in ath_mci_update_scheme() 149 btcoex->duty_cycle = 30; in ath_mci_update_scheme() 160 btcoex->duty_cycle = AR_SREV_9565(sc->sc_ah) ? 40 : 35; in ath_mci_update_scheme() 164 btcoex->duty_cycle, btcoex->btcoex_period); in ath_mci_update_scheme() 166 btcoex->duty_cycle = 30; in ath_mci_update_scheme() 174 btcoex->duty_cycle = 30; in ath_mci_update_scheme() 178 btcoex->duty_cycle); in ath_mci_update_scheme() 199 btcoex->duty_cycle += (mci->num_bdr ? ATH_MCI_BDR_DUTY_CYCLE : 0); in ath_mci_update_scheme() 200 if (btcoex->duty_cycle > ATH_MCI_MAX_DUTY_CYCLE) in ath_mci_update_scheme() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/video/backlight/ |
| H A D | pwm_bl.c | 87 state.duty_cycle = 0; in pwm_backlight_power_off() 98 u64 duty_cycle; in compute_duty_cycle() local 103 duty_cycle = pb->levels[brightness]; in compute_duty_cycle() 105 duty_cycle = brightness; in compute_duty_cycle() 107 duty_cycle *= state.period - lth; in compute_duty_cycle() 108 do_div(duty_cycle, pb->scale); in compute_duty_cycle() 110 return duty_cycle + lth; in compute_duty_cycle() 124 state.duty_cycle = compute_duty_cycle(pb, brightness); in pwm_backlight_update_status()
|
| /OK3568_Linux_fs/u-boot/drivers/power/regulator/ |
| H A D | pwm_regulator.c | 71 int duty_cycle; in pwm_regulator_set_voltage() local 74 duty_cycle = pwm_voltage_to_duty_cycle_percentage(dev, uvolt); in pwm_regulator_set_voltage() 83 priv->period_ns, (priv->period_ns / 100) * duty_cycle); in pwm_regulator_set_voltage()
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/rockchip/ |
| H A D | rockchip_drm_backlight.c | 57 int duty_cycle; in compute_duty_cycle() local 59 duty_cycle = bl->levels[brightness]; in compute_duty_cycle() 61 return (duty_cycle * (period - lth) / bl->scale) + lth; in compute_duty_cycle() 68 int duty_cycle; in rockchip_pwm_power_on() local 71 duty_cycle = compute_duty_cycle(bl, brightness, pargs.period); in rockchip_pwm_power_on() 72 pwm_config(pwm, duty_cycle, pargs.period); in rockchip_pwm_power_on()
|
| /OK3568_Linux_fs/kernel/drivers/hwmon/ |
| H A D | tc654.c | 126 u8 duty_cycle; /* The DUTY_CYCLE register is a 4-bit read/ member 177 data->duty_cycle = ret & 0x0f; in tc654_update_client() 377 pwm = tc654_pwm_map[data->duty_cycle]; in pwm_show() 402 data->duty_cycle = find_closest(val, tc654_pwm_map, in pwm_store() 410 data->duty_cycle); in pwm_store()
|
| /OK3568_Linux_fs/u-boot/drivers/video/ |
| H A D | pwm_backlight.c | 33 uint duty_cycle; in pwm_backlight_enable() local 55 duty_cycle = priv->period_ns * (priv->default_level - priv->min_level) / in pwm_backlight_enable() 58 duty_cycle); in pwm_backlight_enable()
|