/kernel/linux/linux-5.10/lib/ |
H A D | flex_proportions.c | 3 * Floating proportions with flexible aging period 14 * Where x_{i,j} is j's number of events in i-th last time period and x_i is 15 * total number of events in i-th last time period. 26 * When a new period is declared, we could do: 33 * occurs. This can bit trivially implemented by remembering last period in 42 p->period = 0; in fprop_global_init() 57 * Declare @periods new periods. It is upto the caller to make sure period 83 p->period += periods; in fprop_new_period() 97 pl->period = 0; in fprop_local_init_single() 109 unsigned int period in fprop_reflect_period_single() local 192 unsigned int period = p->period; fprop_reflect_period_percpu() local [all...] |
/kernel/linux/linux-6.6/lib/ |
H A D | flex_proportions.c | 3 * Floating proportions with flexible aging period 14 * Where x_{i,j} is j's number of events in i-th last time period and x_i is 15 * total number of events in i-th last time period. 26 * When a new period is declared, we could do: 33 * occurs. This can bit trivially implemented by remembering last period in 42 p->period = 0; in fprop_global_init() 57 * Declare @periods new periods. It is upto the caller to make sure period 79 p->period += periods; in fprop_new_period() 93 pl->period = 0; in fprop_local_init_single() 105 unsigned int period in fprop_reflect_period_single() local 188 unsigned int period = p->period; fprop_reflect_period_percpu() local [all...] |
/kernel/linux/linux-5.10/drivers/gpu/drm/tegra/ |
H A D | mipi-phy.c | 17 unsigned long period) in mipi_dphy_timing_get_default() 20 timing->clkpost = 70 + 52 * period; in mipi_dphy_timing_get_default() 30 timing->hsprepare = 65 + 5 * period; in mipi_dphy_timing_get_default() 31 timing->hszero = 145 + 5 * period; in mipi_dphy_timing_get_default() 32 timing->hssettle = 85 + 6 * period; in mipi_dphy_timing_get_default() 39 * T_HS-TRAIL = max(n * 8 * period, 60 + n * 4 * period) in mipi_dphy_timing_get_default() 43 * not parameterize on anything other that period, so this code will in mipi_dphy_timing_get_default() 46 timing->hstrail = max(4 * 8 * period, 60 + 4 * 4 * period); in mipi_dphy_timing_get_default() 16 mipi_dphy_timing_get_default(struct mipi_dphy_timing *timing, unsigned long period) mipi_dphy_timing_get_default() argument 62 mipi_dphy_timing_validate(struct mipi_dphy_timing *timing, unsigned long period) mipi_dphy_timing_validate() argument [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/tegra/ |
H A D | mipi-phy.c | 17 unsigned long period) in mipi_dphy_timing_get_default() 20 timing->clkpost = 70 + 52 * period; in mipi_dphy_timing_get_default() 30 timing->hsprepare = 65 + 5 * period; in mipi_dphy_timing_get_default() 31 timing->hszero = 145 + 5 * period; in mipi_dphy_timing_get_default() 32 timing->hssettle = 85 + 6 * period; in mipi_dphy_timing_get_default() 39 * T_HS-TRAIL = max(n * 8 * period, 60 + n * 4 * period) in mipi_dphy_timing_get_default() 43 * not parameterize on anything other that period, so this code will in mipi_dphy_timing_get_default() 46 timing->hstrail = max(4 * 8 * period, 60 + 4 * 4 * period); in mipi_dphy_timing_get_default() 16 mipi_dphy_timing_get_default(struct mipi_dphy_timing *timing, unsigned long period) mipi_dphy_timing_get_default() argument 62 mipi_dphy_timing_validate(struct mipi_dphy_timing *timing, unsigned long period) mipi_dphy_timing_validate() argument [all...] |
/kernel/linux/linux-5.10/drivers/iio/imu/inv_icm42600/ |
H A D | inv_icm42600_timestamp.c | 13 /* internal chip period is 32kHz, 31250ns */ 44 uint32_t period) in inv_icm42600_timestamp_init() 49 /* current multiplier and period values after reset */ in inv_icm42600_timestamp_init() 51 ts->period = default_period; in inv_icm42600_timestamp_init() 53 ts->new_mult = period / INV_ICM42600_TIMESTAMP_PERIOD; in inv_icm42600_timestamp_init() 55 /* use theoretical value for chip period */ in inv_icm42600_timestamp_init() 71 uint32_t period, bool fifo) in inv_icm42600_timestamp_update_odr() 77 ts->new_mult = period / INV_ICM42600_TIMESTAMP_PERIOD; in inv_icm42600_timestamp_update_odr() 82 static bool inv_validate_period(uint32_t period, uint32_t mult) in inv_validate_period() argument 87 /* check that period i in inv_validate_period() 43 inv_icm42600_timestamp_init(struct inv_icm42600_timestamp *ts, uint32_t period) inv_icm42600_timestamp_init() argument 70 inv_icm42600_timestamp_update_odr(struct inv_icm42600_timestamp *ts, uint32_t period, bool fifo) inv_icm42600_timestamp_update_odr() argument 96 inv_compute_chip_period(struct inv_icm42600_timestamp *ts, uint32_t mult, uint32_t period) inv_compute_chip_period() argument 118 uint32_t period = ts->period; inv_icm42600_timestamp_interrupt() local [all...] |
/kernel/linux/linux-6.6/drivers/pwm/ |
H A D | pwm-visconti.c | 15 * running period is completed. This way the hardware switches atomically 17 * - Disabling the hardware completes the currently running period and keeps 50 u32 period, duty_cycle, pwmc0; in visconti_pwm_apply() local 58 * The biggest period the hardware can provide is in visconti_pwm_apply() 63 if (state->period > (0xffff << 3) * 1000) in visconti_pwm_apply() 64 period = (0xffff << 3) * 1000; in visconti_pwm_apply() 66 period = state->period; in visconti_pwm_apply() 68 if (state->duty_cycle > period) in visconti_pwm_apply() 69 duty_cycle = period; in visconti_pwm_apply() 110 u32 period, duty, pwmc0, pwmc0_clk; visconti_pwm_get_state() local [all...] |
H A D | core.c | 148 pwm->args.period = args->args[1]; in of_pwm_xlate_with_flags() 176 pwm->args.period = args->args[0]; in of_pwm_single_xlate() 418 s2.duty_cycle = s1.period - s1.duty_cycle; in pwm_apply_state_debug() 419 s2.period = s1.period; in pwm_apply_state_debug() 426 state->duty_cycle < state->period) in pwm_apply_state_debug() 431 last->period > s2.period && in pwm_apply_state_debug() 432 last->period <= state->period) in pwm_apply_state_debug() [all...] |
H A D | pwm-ntxec.c | 16 * - The period and duty cycle can't be changed together in one atomic action. 58 int period, int duty) in ntxec_pwm_set_raw_period_and_duty_cycle() 63 * Changes to the period and duty cycle take effect as soon as the in ntxec_pwm_set_raw_period_and_duty_cycle() 65 * to an inconsistent state after the period is written and before the in ntxec_pwm_set_raw_period_and_duty_cycle() 67 * is longer than the new period, the EC may output 100% for a moment. in ntxec_pwm_set_raw_period_and_duty_cycle() 69 * To minimize the time between the changes to period and duty cycle in ntxec_pwm_set_raw_period_and_duty_cycle() 74 { NTXEC_REG_PERIOD_HIGH, ntxec_reg8(period >> 8) }, in ntxec_pwm_set_raw_period_and_duty_cycle() 76 { NTXEC_REG_PERIOD_LOW, ntxec_reg8(period) }, in ntxec_pwm_set_raw_period_and_duty_cycle() 87 unsigned int period, duty; in ntxec_pwm_apply() local 93 period in ntxec_pwm_apply() 57 ntxec_pwm_set_raw_period_and_duty_cycle(struct pwm_chip *chip, int period, int duty) ntxec_pwm_set_raw_period_and_duty_cycle() argument [all...] |
/kernel/linux/linux-6.6/drivers/iio/common/inv_sensors/ |
H A D | inv_sensors_timestamp.c | 46 /* save chip parameters and compute min and max clock period */ in inv_sensors_timestamp_init() 51 /* current multiplier and period values after reset */ in inv_sensors_timestamp_init() 53 ts->period = chip->init_period; in inv_sensors_timestamp_init() 55 /* use theoretical value for chip period */ in inv_sensors_timestamp_init() 61 uint32_t period, bool fifo) in inv_sensors_timestamp_update_odr() 67 ts->new_mult = period / ts->chip.clock_period; in inv_sensors_timestamp_update_odr() 73 static bool inv_validate_period(struct inv_sensors_timestamp *ts, uint32_t period, uint32_t mult) in inv_validate_period() argument 77 /* check that period is acceptable */ in inv_validate_period() 80 if (period > period_min && period < period_ma in inv_validate_period() 60 inv_sensors_timestamp_update_odr(struct inv_sensors_timestamp *ts, uint32_t period, bool fifo) inv_sensors_timestamp_update_odr() argument 86 inv_update_chip_period(struct inv_sensors_timestamp *ts, uint32_t mult, uint32_t period) inv_update_chip_period() argument 129 uint32_t period = ts->period; inv_sensors_timestamp_interrupt() local [all...] |
/kernel/linux/linux-5.10/tools/perf/tests/ |
H A D | hists_output.c | 54 struct perf_sample sample = { .period = 100, }; in add_hist_entries() 170 !strcmp(SYM(he), "main") && he->stat.period == 200); in test1() 176 !strcmp(SYM(he), "page_fault") && he->stat.period == 100); in test1() 182 !strcmp(SYM(he), "main") && he->stat.period == 100); in test1() 188 !strcmp(SYM(he), "xmalloc") && he->stat.period == 100); in test1() 194 !strcmp(SYM(he), "page_fault") && he->stat.period == 100); in test1() 200 !strcmp(SYM(he), "schedule") && he->stat.period == 100); in test1() 206 !strcmp(SYM(he), "free") && he->stat.period == 100); in test1() 212 !strcmp(SYM(he), "malloc") && he->stat.period == 100); in test1() 218 !strcmp(SYM(he), "cmd_record") && he->stat.period in test1() [all...] |
/kernel/linux/linux-6.6/tools/perf/tests/ |
H A D | hists_output.c | 54 struct perf_sample sample = { .period = 100, }; in add_hist_entries() 183 !strcmp(SYM(he), "main") && he->stat.period == 200); in test1() 189 !strcmp(SYM(he), "page_fault") && he->stat.period == 100); in test1() 195 !strcmp(SYM(he), "main") && he->stat.period == 100); in test1() 201 !strcmp(SYM(he), "xmalloc") && he->stat.period == 100); in test1() 207 !strcmp(SYM(he), "page_fault") && he->stat.period == 100); in test1() 213 !strcmp(SYM(he), "schedule") && he->stat.period == 100); in test1() 219 !strcmp(SYM(he), "free") && he->stat.period == 100); in test1() 225 !strcmp(SYM(he), "malloc") && he->stat.period == 100); in test1() 231 !strcmp(SYM(he), "cmd_record") && he->stat.period in test1() [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | pwm.h | 18 * period 21 * period 30 * @period: reference period 42 u64 period; member 53 * @period: PWM period (in nanoseconds) 59 u64 period; member 110 static inline void pwm_set_period(struct pwm_device *pwm, u64 period) in pwm_set_period() argument 113 pwm->state.period in pwm_set_period() 310 unsigned int period; global() member 573 unsigned int period; global() member [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | pwm.h | 15 * period 18 * period 27 * @period: reference period 39 u64 period; member 50 * @period: PWM period (in nanoseconds) 60 u64 period; member 117 static inline void pwm_set_period(struct pwm_device *pwm, u64 period) in pwm_set_period() argument 120 pwm->state.period in pwm_set_period() 257 unsigned int period; global() member 548 unsigned int period; global() member [all...] |
/kernel/linux/linux-5.10/drivers/watchdog/ |
H A D | booke_wdt.c | 22 * Also, the wdt_period sets the watchdog timer period timeout. 50 /* For the specified period, determine the number of seconds 55 * 2.5 * (2^(63-period+1)) / timebase_freq 57 * In order to simplify things, we assume that period is 60 static unsigned long long period_to_sec(unsigned int period) in period_to_sec() argument 62 unsigned long long tmp = 1ULL << (64 - period); in period_to_sec() 75 * This procedure will find the highest period which will give a timeout 81 unsigned int period; in sec_to_period() local 82 for (period = 63; period > in sec_to_period() 93 period_to_sec(unsigned int period) period_to_sec() argument [all...] |
/kernel/linux/linux-6.6/drivers/watchdog/ |
H A D | booke_wdt.c | 22 * Also, the wdt_period sets the watchdog timer period timeout. 50 /* For the specified period, determine the number of seconds 55 * 2.5 * (2^(63-period+1)) / timebase_freq 57 * In order to simplify things, we assume that period is 60 static unsigned long long period_to_sec(unsigned int period) in period_to_sec() argument 62 unsigned long long tmp = 1ULL << (64 - period); in period_to_sec() 75 * This procedure will find the highest period which will give a timeout 81 unsigned int period; in sec_to_period() local 82 for (period = 63; period > in sec_to_period() 93 period_to_sec(unsigned int period) period_to_sec() argument [all...] |
/kernel/linux/linux-5.10/drivers/net/wireless/mediatek/mt76/ |
H A D | mt76x02_dfs.c | 256 /* reported period */ in mt76x02_dfs_get_hw_pulse() 257 pulse->period = mt76_rr(dev, MT_BBP(DFS, 19)); in mt76x02_dfs_get_hw_pulse() 272 if (!pulse->period || !pulse->w1) in mt76x02_dfs_check_hw_pulse() 287 ret = (pulse->period >= 2900 && in mt76x02_dfs_check_hw_pulse() 288 (pulse->period <= 4700 || in mt76x02_dfs_check_hw_pulse() 289 pulse->period >= 6400) && in mt76x02_dfs_check_hw_pulse() 290 (pulse->period <= 6800 || in mt76x02_dfs_check_hw_pulse() 291 pulse->period >= 10200) && in mt76x02_dfs_check_hw_pulse() 292 pulse->period <= 61600); in mt76x02_dfs_check_hw_pulse() 294 ret = (pulse->period > in mt76x02_dfs_check_hw_pulse() [all...] |
/kernel/linux/linux-6.6/drivers/net/wireless/mediatek/mt76/ |
H A D | mt76x02_dfs.c | 256 /* reported period */ in mt76x02_dfs_get_hw_pulse() 257 pulse->period = mt76_rr(dev, MT_BBP(DFS, 19)); in mt76x02_dfs_get_hw_pulse() 272 if (!pulse->period || !pulse->w1) in mt76x02_dfs_check_hw_pulse() 287 ret = (pulse->period >= 2900 && in mt76x02_dfs_check_hw_pulse() 288 (pulse->period <= 4700 || in mt76x02_dfs_check_hw_pulse() 289 pulse->period >= 6400) && in mt76x02_dfs_check_hw_pulse() 290 (pulse->period <= 6800 || in mt76x02_dfs_check_hw_pulse() 291 pulse->period >= 10200) && in mt76x02_dfs_check_hw_pulse() 292 pulse->period <= 61600); in mt76x02_dfs_check_hw_pulse() 294 ret = (pulse->period > in mt76x02_dfs_check_hw_pulse() [all...] |
/kernel/linux/linux-5.10/drivers/pwm/ |
H A D | core.c | 154 pwm->args.period = args->args[1]; in of_pwm_xlate_with_flags() 184 pwm->args.period = args->args[1]; in of_pwm_simple_xlate() 497 s2.duty_cycle = s1.period - s1.duty_cycle; in pwm_apply_state_debug() 498 s2.period = s1.period; in pwm_apply_state_debug() 505 state->duty_cycle < state->period) in pwm_apply_state_debug() 510 last->period > s2.period && in pwm_apply_state_debug() 511 last->period <= state->period) in pwm_apply_state_debug() [all...] |
/kernel/liteos_a/kernel/extended/perf/pmu/ |
H A D | perf_timed_pmu.c | 39 STATIC BOOL OsPerfTimedPeriodValid(UINT32 period) in OsPerfTimedPeriodValid() argument 41 return period >= TIMER_PERIOD_LOWER_BOUND_US; in OsPerfTimedPeriodValid() 82 UINT32 period = event->period; in OsPerfTimedConfig() local 84 if (!OsPerfTimedPeriodValid(period)) { in OsPerfTimedConfig() 85 period = TIMER_PERIOD_LOWER_BOUND_US; in OsPerfTimedConfig() 86 PRINT_ERR("config period invalid, should be >= 100, use default period:%u us\n", period); in OsPerfTimedConfig() 90 .tv.sec = period / US_PER_SECON in OsPerfTimedConfig() [all...] |
/kernel/linux/linux-5.10/drivers/scsi/ |
H A D | scsi_transport_spi.c | 83 /* The PPR values at which you calculate the period in ns by multiplying 411 /* Translate the period into ns according to the current spec 413 static int period_to_str(char *buf, int period) in period_to_str() argument 417 if (period < 0 || period > 0xff) { in period_to_str() 419 } else if (period <= SPI_STATIC_PPR) { in period_to_str() 420 picosec = ppr_to_ps[period]; in period_to_str() 422 picosec = period * 4000; in period_to_str() 435 show_spi_transport_period_helper(char *buf, int period) in show_spi_transport_period_helper() argument 437 int len = period_to_str(buf, period); in show_spi_transport_period_helper() 447 int j, picosec, period = -1; store_spi_transport_period_helper() local 505 int period, retval; store_spi_transport_period() local 755 int period = 0, prevperiod = 0; spi_dv_retrain() local 1193 spi_populate_sync_msg(unsigned char *msg, int period, int offset) spi_populate_sync_msg() argument 1204 spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width, int options) spi_populate_ppr_msg() argument [all...] |
/kernel/linux/linux-6.6/drivers/scsi/ |
H A D | scsi_transport_spi.c | 83 /* The PPR values at which you calculate the period in ns by multiplying 410 /* Translate the period into ns according to the current spec 412 static int period_to_str(char *buf, int period) in period_to_str() argument 416 if (period < 0 || period > 0xff) { in period_to_str() 418 } else if (period <= SPI_STATIC_PPR) { in period_to_str() 419 picosec = ppr_to_ps[period]; in period_to_str() 421 picosec = period * 4000; in period_to_str() 434 show_spi_transport_period_helper(char *buf, int period) in show_spi_transport_period_helper() argument 436 int len = period_to_str(buf, period); in show_spi_transport_period_helper() 446 int j, picosec, period = -1; store_spi_transport_period_helper() local 504 int period, retval; store_spi_transport_period() local 754 int period = 0, prevperiod = 0; spi_dv_retrain() local 1193 spi_populate_sync_msg(unsigned char *msg, int period, int offset) spi_populate_sync_msg() argument 1204 spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width, int options) spi_populate_ppr_msg() argument [all...] |
/kernel/linux/linux-5.10/drivers/char/hw_random/ |
H A D | timeriomem-rng.c | 35 ktime_t period; member 50 int period_us = ktime_to_us(priv->period); in timeriomem_rng_read() 66 * for the RNG to generate new data. Since the period can have in timeriomem_rng_read() 86 hrtimer_forward_now(&priv->timer, priv->period); in timeriomem_rng_read() 109 int period; in timeriomem_rng_probe() local 138 "period", &i)) in timeriomem_rng_probe() 139 period = i; in timeriomem_rng_probe() 141 dev_err(&pdev->dev, "missing period\n"); in timeriomem_rng_probe() 151 period = pdata->period; in timeriomem_rng_probe() [all...] |
/kernel/linux/linux-6.6/drivers/char/hw_random/ |
H A D | timeriomem-rng.c | 35 ktime_t period; member 50 int period_us = ktime_to_us(priv->period); in timeriomem_rng_read() 66 * for the RNG to generate new data. Since the period can have in timeriomem_rng_read() 86 hrtimer_forward_now(&priv->timer, priv->period); in timeriomem_rng_read() 109 int period; in timeriomem_rng_probe() local 138 "period", &i)) in timeriomem_rng_probe() 139 period = i; in timeriomem_rng_probe() 141 dev_err(&pdev->dev, "missing period\n"); in timeriomem_rng_probe() 149 period = pdata->period; in timeriomem_rng_probe() [all...] |
/kernel/linux/linux-6.6/drivers/iio/trigger/ |
H A D | iio-trig-hrtimer.c | 29 ktime_t period; member 57 u64 period; in iio_hrtimer_store_sampling_frequency() local 73 period = PSEC_PER_SEC; in iio_hrtimer_store_sampling_frequency() 74 do_div(period, val); in iio_hrtimer_store_sampling_frequency() 75 info->period = period; /* nS */ in iio_hrtimer_store_sampling_frequency() 104 hrtimer_forward_now(timer, info->period); in iio_hrtimer_trig_handler() 117 hrtimer_start(&trig_info->timer, trig_info->period, in iio_trig_hrtimer_set_state() 152 trig_info->period = NSEC_PER_SEC / trig_info->sampling_frequency[0]; in iio_trig_hrtimer_probe()
|
/kernel/linux/linux-5.10/samples/bpf/ |
H A D | xdp_monitor_user.c | 248 __u64 period = 0; in calc_period() local 250 period = r->timestamp - p->timestamp; in calc_period() 251 if (period > 0) in calc_period() 252 period_ = ((double) period / NANOSEC_PER_SEC); in calc_period() 260 __u64 period = 0; in calc_period_u64() local 262 period = r->timestamp - p->timestamp; in calc_period_u64() 263 if (period > 0) in calc_period_u64() 264 period_ = ((double) period / NANOSEC_PER_SEC); in calc_period_u64() 269 static double calc_pps(struct datarec *r, struct datarec *p, double period) in calc_pps() argument 274 if (period > in calc_pps() 281 calc_pps_u64(struct u64rec *r, struct u64rec *p, double period) calc_pps_u64() argument 293 calc_drop(struct datarec *r, struct datarec *p, double period) calc_drop() argument 305 calc_info(struct datarec *r, struct datarec *p, double period) calc_info() argument 317 calc_err(struct datarec *r, struct datarec *p, double period) calc_err() argument [all...] |