/openbmc/linux/drivers/pwm/ |
H A D | pwm-fsl-ftm.c | 48 struct fsl_pwm_periodcfg period; member 121 rate = clk_get_rate(fpc->clk[fpc->period.clk_select]); in fsl_pwm_ticks_to_ns() 124 do_div(exval, rate >> fpc->period.clk_ps); in fsl_pwm_ticks_to_ns() 191 unsigned int period = fpc->period.mod_period + 1; in fsl_pwm_calculate_duty() local 192 unsigned int period_ns = fsl_pwm_ticks_to_ns(fpc, period); in fsl_pwm_calculate_duty() 194 duty = (unsigned long long)duty_ns * period; in fsl_pwm_calculate_duty() 254 if (fpc->period.clk_select != periodcfg.clk_select) { in fsl_pwm_apply_config() 256 enum fsl_pwm_clk oldclk = fpc->period.clk_select; in fsl_pwm_apply_config() 276 fpc->period = periodcfg; in fsl_pwm_apply_config() 483 clk_disable_unprepare(fpc->clk[fpc->period.clk_select]); in fsl_pwm_suspend() [all …]
|
H A D | pwm-crc.c | 61 if (state->period > PWM_MAX_PERIOD_NS) { in crc_pwm_apply() 78 pwm_get_period(pwm) != state->period) { in crc_pwm_apply() 81 do_div(level, state->period); in crc_pwm_apply() 91 pwm_get_period(pwm) != state->period) { in crc_pwm_apply() 100 if (pwm_get_period(pwm) != state->period || in crc_pwm_apply() 102 int clk_div = crc_pwm_calc_clk_div(state->period); in crc_pwm_apply() 146 state->period = in crc_pwm_get_state() 149 DIV_ROUND_UP_ULL(duty_cycle_reg * state->period, PWM_MAX_LEVEL); in crc_pwm_get_state()
|
H A D | pwm-intel-lgm.c | 47 u32 period; member 72 if (state->polarity != PWM_POLARITY_NORMAL || state->period < pc->period) in lgm_pwm_apply() 78 duty_cycle = min_t(u64, state->duty_cycle, pc->period); in lgm_pwm_apply() 79 val = duty_cycle * LGM_PWM_MAX_DUTY_CYCLE / pc->period; in lgm_pwm_apply() 98 state->period = pc->period; /* fixed period */ in lgm_pwm_get_state() 102 state->duty_cycle = DIV_ROUND_UP(duty * pc->period, LGM_PWM_MAX_DUTY_CYCLE); in lgm_pwm_get_state() 119 pc->period = LGM_PWM_PERIOD_2WIRE_NS; in lgm_pwm_init()
|
H A D | pwm-atmel-tcb.c | 38 unsigned period; /* PWM period expressed in clk cycles */ member 82 tcbpwm->period = 0; in atmel_tcb_pwm_request() 103 &tcbpwm->period); in atmel_tcb_pwm_request() 254 tcbpwm->period); in atmel_tcb_pwm_enable() 272 unsigned period; in atmel_tcb_pwm_config() local 312 period = div_u64(period_ns, min); in atmel_tcb_pwm_config() 328 atcbpwm->duty != atcbpwm->period) && in atmel_tcb_pwm_config() 329 (atcbpwm->div != i || atcbpwm->period != period)) { in atmel_tcb_pwm_config() 335 tcbpwm->period = period; in atmel_tcb_pwm_config() 345 int duty_cycle, period; in atmel_tcb_pwm_apply() local [all …]
|
H A D | pwm-rockchip.c | 42 unsigned long period; member 81 tmp = readl_relaxed(pc->base + pc->data->regs.period); in rockchip_pwm_get_state() 83 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in rockchip_pwm_get_state() 107 unsigned long period, duty; in rockchip_pwm_config() local 118 div = clk_rate * state->period; in rockchip_pwm_config() 119 period = DIV_ROUND_CLOSEST_ULL(div, in rockchip_pwm_config() 135 writel(period, pc->base + pc->data->regs.period); in rockchip_pwm_config() 237 .period = 0x08, 250 .period = 0x04, 264 .period = 0x04, [all …]
|
H A D | pwm-microchip-core.c | 72 bool enable, u64 period) in mchp_core_pwm_enable() argument 99 mchp_core_pwm->update_timestamp = ktime_add_ns(ktime_get(), period); in mchp_core_pwm_enable() 212 tmp = mul_u64_u64_div_u64(state->period, clk_rate, NSEC_PER_SEC); in mchp_core_pwm_calc_period() 285 mchp_core_pwm_enable(chip, pwm, false, pwm->state.period); in mchp_core_pwm_apply_locked() 355 mchp_core_pwm_enable(chip, pwm, true, pwm->state.period); in mchp_core_pwm_apply_locked() 412 state->period = (period_steps + 1) * (prescale + 1); in mchp_core_pwm_get_state() 413 state->period *= NSEC_PER_SEC; in mchp_core_pwm_get_state() 414 state->period = DIV64_U64_ROUND_UP(state->period, rate); in mchp_core_pwm_get_state() 422 state->duty_cycle = state->period; in mchp_core_pwm_get_state() 423 state->period *= 2; in mchp_core_pwm_get_state()
|
H A D | pwm-mtk-disp.c | 74 u32 clk_div, period, high_width, value; in mtk_disp_pwm_apply() local 119 clk_div = mul_u64_u64_div_u64(state->period, rate, NSEC_PER_SEC) >> in mtk_disp_pwm_apply() 130 period = mul_u64_u64_div_u64(state->period, rate, div); in mtk_disp_pwm_apply() 131 if (period > 0) in mtk_disp_pwm_apply() 132 period--; in mtk_disp_pwm_apply() 135 value = period | (high_width << PWM_HIGH_WIDTH_SHIFT); in mtk_disp_pwm_apply() 178 u64 rate, period, high_width; in mtk_disp_pwm_get_state() local 211 period = FIELD_GET(PWM_PERIOD_MASK, con1); in mtk_disp_pwm_get_state() 216 state->period = DIV64_U64_ROUND_UP(period * (clk_div + 1) * NSEC_PER_SEC, rate); in mtk_disp_pwm_get_state()
|
H A D | pwm-clk.c | 44 u64 period = state->period; in pwm_clk_apply() local 67 rate = DIV64_U64_ROUND_UP(NSEC_PER_SEC, period); in pwm_clk_apply() 73 duty_cycle = period - duty_cycle; in pwm_clk_apply() 75 return clk_set_duty_cycle(pcchip->clk, duty_cycle, period); in pwm_clk_apply()
|
H A D | pwm-sun4i.c | 132 state->period = DIV_ROUND_UP_ULL(NSEC_PER_SEC, clk_rate); in sun4i_pwm_get_state() 133 state->duty_cycle = DIV_ROUND_UP_ULL(state->period, 2); in sun4i_pwm_get_state() 165 state->period = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state() 182 (state->period * clk_rate >= NSEC_PER_SEC) && in sun4i_pwm_calculate() 183 (state->period * clk_rate < 2 * NSEC_PER_SEC) && in sun4i_pwm_calculate() 198 div = clk_rate * state->period + NSEC_PER_SEC / 2; in sun4i_pwm_calculate() 214 div = div * state->period; in sun4i_pwm_calculate() 226 do_div(div, state->period); in sun4i_pwm_calculate() 238 u32 ctrl, duty = 0, period = 0, val; in sun4i_pwm_apply() local 286 val = (duty & PWM_DTY_MASK) | PWM_PRD(period); in sun4i_pwm_apply() [all …]
|
/openbmc/linux/drivers/clk/ |
H A D | clk-pwm.c | 55 duty->den = state.period; in clk_pwm_get_duty_cycle() 86 if (!pargs.period) { in clk_pwm_probe() 92 clk_pwm->fixed_rate = div64_u64(NSEC_PER_SEC, pargs.period); in clk_pwm_probe() 99 if (pargs.period != NSEC_PER_SEC / clk_pwm->fixed_rate && in clk_pwm_probe() 100 pargs.period != DIV_ROUND_UP(NSEC_PER_SEC, clk_pwm->fixed_rate)) { in clk_pwm_probe() 111 ret = pwm_config(pwm, (pargs.period + 1) >> 1, pargs.period); in clk_pwm_probe()
|
/openbmc/linux/drivers/watchdog/ |
H A D | nic7018_wdt.c | 47 u32 period; member 52 u32 period; member 61 static inline u32 nic7018_timeout(u32 period, u8 counter) in nic7018_timeout() argument 63 return period * counter - period / 2; in nic7018_timeout() 98 wdd->timeout = nic7018_timeout(config->period, counter); in nic7018_set_timeout() 99 wdt->period = config->period; in nic7018_set_timeout() 151 return nic7018_timeout(wdt->period, count); in nic7018_get_timeleft()
|
/openbmc/openbmc/meta-ufispace/meta-ncplite/recipes-phosphor/state/phosphor-state-manager/ |
H A D | host-control | 10 gpioset --hold-period 50ms -t0 power-button=1 12 gpioset --hold-period 50ms -t0 power-button=0 18 gpioset --hold-period 50ms -t0 reset-button=0 20 gpioset --hold-period 50ms -t0 reset-button=1
|
H A D | chassis-control | 26 gpioset --hold-period 50ms -t0 power-chassis-control0=1 27 gpioset --hold-period 50ms -t0 power-chassis-control1=1 37 gpioset --hold-period 50ms -t0 power-chassis-control0=0 38 gpioset --hold-period 50ms -t0 power-chassis-control1=0
|
/openbmc/linux/drivers/md/ |
H A D | md-faulty.c | 77 int period[Modes]; member 87 if (conf->period[mode] == 0 && in check_mode() 93 if (conf->period[mode]) in check_mode() 230 n, conf->period[WriteTransient]); in faulty_status() 234 n, conf->period[ReadTransient]); in faulty_status() 238 n, conf->period[WritePersistent]); in faulty_status() 242 n, conf->period[ReadPersistent]); in faulty_status() 247 n, conf->period[ReadFixable]); in faulty_status() 271 conf->period[i] = 0; in faulty_reshape() 275 conf->period[mode] = count; in faulty_reshape() [all …]
|
/openbmc/linux/arch/powerpc/platforms/52xx/ |
H A D | mpc52xx_gpt.c | 403 clocks = period * (u64)gpt->ipb_freq; in mpc52xx_gpt_do_start() 491 u64 period; in mpc52xx_gpt_timer_period() local 496 period = in_be32(&gpt->regs->count); in mpc52xx_gpt_timer_period() 499 prescale = period >> 16; in mpc52xx_gpt_timer_period() 500 period &= 0xffff; in mpc52xx_gpt_timer_period() 503 period = period * prescale * 1000000000ULL; in mpc52xx_gpt_timer_period() 504 do_div(period, gpt->ipb_freq); in mpc52xx_gpt_timer_period() 505 return period; in mpc52xx_gpt_timer_period() 675 const u32 *period) in mpc52xx_gpt_wdt_setup() argument 683 if (!period || *period == 0) in mpc52xx_gpt_wdt_setup() [all …]
|
/openbmc/linux/drivers/leds/trigger/ |
H A D | ledtrig-heartbeat.c | 28 unsigned int period; member 60 heartbeat_data->period = 300 + in led_heartbeat_function() 62 heartbeat_data->period = in led_heartbeat_function() 63 msecs_to_jiffies(heartbeat_data->period); in led_heartbeat_function() 70 delay = heartbeat_data->period / 4 - msecs_to_jiffies(70); in led_heartbeat_function() 82 delay = heartbeat_data->period - heartbeat_data->period / 4 - in led_heartbeat_function()
|
/openbmc/linux/drivers/staging/greybus/ |
H A D | pwm.c | 93 u8 which, u32 duty, u32 period) in gb_pwm_config_operation() argument 104 request.period = cpu_to_le32(period); in gb_pwm_config_operation() 213 u64 period = state->period; in gb_pwm_apply() local 240 if (period > U32_MAX) in gb_pwm_apply() 241 period = U32_MAX; in gb_pwm_apply() 243 if (duty_cycle > period) in gb_pwm_apply() 244 duty_cycle = period; in gb_pwm_apply() 246 err = gb_pwm_config_operation(pwmc, pwm->hwpwm, duty_cycle, period); in gb_pwm_apply()
|
/openbmc/linux/tools/lib/perf/Documentation/ |
H A D | libperf-sampling.txt | 23 cpu 0, pid 0, tid 0, ip ffffffffad06c4e6, period 1 24 cpu 0, pid 4465, tid 4469, ip ffffffffad118748, period 18322959 25 cpu 0, pid 0, tid 0, ip ffffffffad115722, period 33544846 26 cpu 0, pid 4465, tid 4470, ip 7f84fe0cdad6, period 23687474 27 cpu 0, pid 0, tid 0, ip ffffffffad9e0349, period 34255790 28 cpu 0, pid 4465, tid 4469, ip ffffffffad136581, period 38664069 29 cpu 0, pid 0, tid 0, ip ffffffffad9e55e2, period 21922384 30 cpu 0, pid 4465, tid 4470, ip 7f84fe0ebebf, period 17655175 193 86 __u64 ip, period, *array; 210 103 period = *array; [all …]
|
/openbmc/linux/drivers/net/ethernet/qlogic/qed/ |
H A D | qed_ptp.c | 256 s64 best_val = 0, val, best_period = 0, period, approx_dev, dif, dif2; in qed_ptp_hw_adjfreq() local 274 period = div_s64(val * 1000000000, ppb); in qed_ptp_hw_adjfreq() 275 period -= 8; in qed_ptp_hw_adjfreq() 276 period >>= 4; in qed_ptp_hw_adjfreq() 277 if (period < 1) in qed_ptp_hw_adjfreq() 278 period = 1; in qed_ptp_hw_adjfreq() 279 if (period > 0xFFFFFFE) in qed_ptp_hw_adjfreq() 280 period = 0xFFFFFFE; in qed_ptp_hw_adjfreq() 283 approx_dev = period * 16 + 8; in qed_ptp_hw_adjfreq() 294 period++; in qed_ptp_hw_adjfreq() [all …]
|
/openbmc/linux/include/trace/events/ |
H A D | pwm.h | 19 __field(u64, period) 28 __entry->period = state->period; 36 __entry->pwm, __entry->period, __entry->duty_cycle,
|
/openbmc/linux/Documentation/scheduler/ |
H A D | sched-rt-group.rst | 27 system when the period is smaller than either the available hrtimer 53 in a given period. We allocate this "run time" for each realtime group which 90 The scheduling period that is equivalent to 100% CPU bandwidth 102 * A run time of -1 specifies runtime == period, ie. no limit. 151 There is work in progress to make the scheduling period for each group 154 The constraint on the period is that a subgroup must have a smaller or 155 equal period to its parent. But realistically its not very useful _yet_ 159 period is twice the length of B's. 161 * group A: period=100000us, runtime=50000us 165 * group B: period= 50000us, runtime=25000us [all …]
|
/openbmc/linux/Documentation/litmus-tests/rcu/ |
H A D | RCU+sync+read.litmus | 6 * This litmus test demonstrates that after a grace period, an RCU updater always 8 * read-side critical sections would have ended before the grace period ended. 10 * This is one implication of the RCU grace-period guarantee, which says (among 11 * other things) that an RCU read-side critical section cannot span a grace period.
|
/openbmc/linux/drivers/mmc/core/ |
H A D | sdio_irq.c | 142 unsigned long period, idle_period; in sdio_irq_thread() local 154 period = (host->caps & MMC_CAP_SDIO_IRQ) ? in sdio_irq_thread() 158 mmc_hostname(host), period); in sdio_irq_thread() 199 period /= 2; in sdio_irq_thread() 201 period++; in sdio_irq_thread() 202 if (period > idle_period) in sdio_irq_thread() 203 period = idle_period; in sdio_irq_thread() 211 schedule_timeout(period); in sdio_irq_thread()
|
/openbmc/u-boot/drivers/video/exynos/ |
H A D | exynos_pwm_bl.c | 27 pwm_config(pwm->pwm_id, 0, pwm->period); in exynos_pwm_backlight_update_status() 31 brightness * pwm->period / max, pwm->period); in exynos_pwm_backlight_update_status()
|
/openbmc/linux/Documentation/RCU/ |
H A D | stallwarn.rst | 40 - Anything that prevents RCU's grace-period kthreads from running. 51 in which case the next RCU grace period can never complete, which 121 in progress. No grace period, no CPU stall warnings. 170 the expedited grace period. This parameter defines the period 173 period is normally 20 milliseconds on Android devices. A zero 218 task stalling the current RCU-tasks grace period. 249 interrupts during the current stalled grace period. 264 (stalled) grace period, or it might be some earlier grace period (for 276 period. 280 period (in this case 2603), the grace-period sequence number (7075), and [all …]
|