| /linux/drivers/leds/ |
| H A D | leds-ti-lmu-common.c | 57 static unsigned int ti_lmu_common_convert_ramp_to_index(unsigned int usec) in ti_lmu_common_convert_ramp_to_index() argument 62 if (usec <= ramp_table[0]) in ti_lmu_common_convert_ramp_to_index() 65 if (usec > ramp_table[size - 1]) in ti_lmu_common_convert_ramp_to_index() 69 if (usec == ramp_table[i]) in ti_lmu_common_convert_ramp_to_index() 73 if (usec > ramp_table[i - 1] && usec < ramp_table[i]) { in ti_lmu_common_convert_ramp_to_index() 74 if (usec - ramp_table[i - 1] < ramp_table[i] - usec) in ti_lmu_common_convert_ramp_to_index()
|
| /linux/include/asm-generic/ |
| H A D | delay.h | 56 static __always_inline void udelay(unsigned long usec) in udelay() argument 58 if (__builtin_constant_p(usec)) { in udelay() 59 if (usec >= DELAY_CONST_MAX) in udelay() 62 __const_udelay(usec * UDELAY_CONST_MULT); in udelay() 64 __udelay(usec); in udelay()
|
| /linux/tools/testing/selftests/kvm/arm64/ |
| H A D | arch_timer_edge_cases.c | 85 typedef void (*sleep_method_t)(enum arch_timer timer, uint64_t usec); 87 static void sleep_poll(enum arch_timer timer, uint64_t usec); 88 static void sleep_sched_poll(enum arch_timer timer, uint64_t usec); 89 static void sleep_in_userspace(enum arch_timer timer, uint64_t usec); 90 static void sleep_migrate(enum arch_timer timer, uint64_t usec); 278 static void guest_poll(enum arch_timer test_timer, uint64_t usec, in guest_poll() argument 281 uint64_t cycles = usec_to_cycles(usec); in guest_poll() 294 static void sleep_poll(enum arch_timer timer, uint64_t usec) in sleep_poll() argument 296 guest_poll(timer, usec, NO_USERSPACE_CMD); in sleep_poll() 299 static void sleep_sched_poll(enum arch_timer timer, uint64_t usec) in sleep_sched_poll() argument [all …]
|
| /linux/arch/xtensa/include/asm/ |
| H A D | delay.h | 47 static inline void udelay(unsigned long usec) in udelay() argument 49 if (__builtin_constant_p(usec) && usec >= __MAX_UDELAY) in udelay() 52 __udelay(usec); in udelay()
|
| /linux/tools/testing/selftests/kvm/include/riscv/ |
| H A D | arch_timer.h | 19 #define usec_to_cycles(usec) \ argument 20 ((timer_freq) * (uint64_t)(usec) / 1000000) 66 static inline void udelay(unsigned long usec) in udelay() argument 68 __delay(usec_to_cycles(usec)); in udelay()
|
| /linux/tools/testing/selftests/kvm/include/loongarch/ |
| H A D | arch_timer.h | 13 #define usec_to_cycles(usec) (TIMER_FREQ * (unsigned long)(usec) / 1000000) argument 81 static inline void udelay(unsigned long usec) in udelay() argument 83 __delay(usec_to_cycles(usec)); in udelay()
|
| /linux/drivers/clocksource/ |
| H A D | timer-tegra186.c | 93 struct clocksource usec; member 405 usec); in tegra186_timer_usec_read() 412 tegra->usec.name = "usec"; in tegra186_timer_usec_init() 413 tegra->usec.rating = 300; in tegra186_timer_usec_init() 414 tegra->usec.read = tegra186_timer_usec_read; in tegra186_timer_usec_init() 415 tegra->usec.mask = CLOCKSOURCE_MASK(32); in tegra186_timer_usec_init() 416 tegra->usec.flags = CLOCK_SOURCE_IS_CONTINUOUS; in tegra186_timer_usec_init() 417 tegra->usec.owner = THIS_MODULE; in tegra186_timer_usec_init() 419 return clocksource_register_hz(&tegra->usec, USEC_PER_SEC); in tegra186_timer_usec_init() 483 clocksource_unregister(&tegra->usec); in tegra186_timer_remove()
|
| /linux/drivers/hv/ |
| H A D | connection.c | 446 u32 usec = 1; in vmbus_post_msg() local 491 if (can_sleep && usec > 1000) in vmbus_post_msg() 492 msleep(usec / 1000); in vmbus_post_msg() 493 else if (usec < MAX_UDELAY_MS * 1000) in vmbus_post_msg() 494 udelay(usec); in vmbus_post_msg() 496 mdelay(usec / 1000); in vmbus_post_msg() 499 usec *= 2; in vmbus_post_msg()
|
| /linux/samples/timers/ |
| H A D | hpet_example.c | 139 long usec; in hpet_poll() local 190 usec = stv.tv_sec * 1000000 + stv.tv_usec; in hpet_poll() 191 usec = (etv.tv_sec * 1000000 + etv.tv_usec) - usec; in hpet_poll() 194 "hpet_poll: expired time = 0x%lx\n", usec); in hpet_poll()
|
| /linux/drivers/iio/light/ |
| H A D | bh1750.c | 75 static int bh1750_change_int_time(struct bh1750_data *data, int usec) in bh1750_change_int_time() argument 82 if ((usec % chip_info->mtreg_to_usec) != 0) in bh1750_change_int_time() 85 val = usec / chip_info->mtreg_to_usec; in bh1750_change_int_time() 239 int ret, usec; in bh1750_probe() local 275 usec = data->chip_info->mtreg_to_usec * data->chip_info->mtreg_default; in bh1750_probe() 276 ret = bh1750_change_int_time(data, usec); in bh1750_probe()
|
| /linux/arch/powerpc/sysdev/ |
| H A D | fsl_gtm.c | 243 int gtm_set_timer16(struct gtm_timer *tmr, unsigned long usec, bool reload) in gtm_set_timer16() argument 249 bit = fls_long(usec); in gtm_set_timer16() 252 usec >>= bit - 15; in gtm_set_timer16() 258 return gtm_set_ref_timer16(tmr, freq, usec, reload); in gtm_set_timer16() 279 int gtm_set_exact_timer16(struct gtm_timer *tmr, u16 usec, bool reload) in gtm_set_exact_timer16() argument 291 return gtm_set_ref_timer16(tmr, freq, usec, reload); in gtm_set_exact_timer16()
|
| /linux/include/trace/events/ |
| H A D | rdma_core.h | 169 u16 usec 172 TP_ARGS(cq, comps, usec), 177 __field(unsigned int, usec) 183 __entry->usec = usec; 187 __entry->cq_id, __entry->comps, __entry->usec
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/bus/ |
| H A D | hwsq.c | 169 u8 shift = 0, usec = nsec / 1000; in nvkm_hwsq_nsec() local 170 while (usec & ~3) { in nvkm_hwsq_nsec() 171 usec >>= 2; in nvkm_hwsq_nsec() 176 hwsq_cmd(hwsq, 1, (u8[]){ 0x00 | (shift << 2) | usec }); in nvkm_hwsq_nsec()
|
| /linux/rust/helpers/ |
| H A D | time.c | 37 void rust_helper_udelay(unsigned long usec) in rust_helper_udelay() argument 39 udelay(usec); in rust_helper_udelay()
|
| /linux/arch/powerpc/include/asm/ |
| H A D | fsl_gtm.h | 36 extern int gtm_set_timer16(struct gtm_timer *tmr, unsigned long usec, 38 extern int gtm_set_exact_timer16(struct gtm_timer *tmr, u16 usec,
|
| /linux/drivers/net/ethernet/fungible/funeth/ |
| H A D | funeth_txrx.h | 45 #define FUN_IRQ_CQ_DB(usec, pkts) \ argument 46 (FUN_DB_IRQ_ARM_F | ((usec) << FUN_DB_INTCOAL_USEC_S) | \ 50 #define FUN_IRQ_SQ_DB(usec, pkts) \ argument 52 ((usec) << FUN_DB_INTCOAL_USEC_S) | \
|
| /linux/drivers/parport/ |
| H A D | ieee1284.c | 110 int usec) in parport_poll_peripheral() argument 113 int count = usec / 5 + 2; in parport_poll_peripheral() 161 int usec; in parport_wait_peripheral() local 165 usec = port->physport->spintime; /* usecs of fast polling */ in parport_wait_peripheral() 169 usec = 35000; in parport_wait_peripheral() 177 ret = parport_poll_peripheral (port, mask, result, usec); in parport_wait_peripheral()
|
| /linux/drivers/gpu/drm/nouveau/nvkm/engine/disp/ |
| H A D | dp.c | 233 int tries = 0, usec = 0, i; in nvkm_dp_train_eq() local 238 usec = (data & DPCD_RC0E_AUX_RD_INTERVAL) * 4000; in nvkm_dp_train_eq() 252 usec = (lt->outp->dp.dpcd[DPCD_RC0E] & DPCD_RC0E_AUX_RD_INTERVAL) * 4000; in nvkm_dp_train_eq() 258 nvkm_dp_train_sense(lt, lt->pc2, usec ? usec : 400)) in nvkm_dp_train_eq() 280 int tries = 0, usec = 0, i; in nvkm_dp_train_cr() local 285 usec = (lt->outp->dp.dpcd[DPCD_RC0E] & DPCD_RC0E_AUX_RD_INTERVAL) * 4000; in nvkm_dp_train_cr() 289 nvkm_dp_train_sense(lt, false, usec ? usec : 100)) in nvkm_dp_train_cr()
|
| /linux/Documentation/devicetree/bindings/regulator/ |
| H A D | lp872x.txt | 14 bit[0]: time step unit(usec). 1 = 25, 0 = 50 17 bit[7:6]: time step unit(usec). 00 = 32, 01 = 64, 10 = 128, 11 = 256 49 /* external DVS pin used, timestep is 25usec */ 101 /* Enable BUCK1,2, no DVS, normal LDO mode, timestep is 256usec */
|
| /linux/drivers/gpib/include/ |
| H A D | gpib_proto.h | 14 static inline unsigned long usec_to_jiffies(unsigned int usec) in usec_to_jiffies() argument 18 return 1 + (usec + usec_per_jiffy - 1) / usec_per_jiffy; in usec_to_jiffies()
|
| /linux/drivers/gpib/ni_usb/ |
| H A D | ni_usb_gpib.c | 33 static inline unsigned long ni_usb_timeout_msecs(unsigned int usec) in ni_usb_timeout_msecs() argument 35 if (usec == 0) in ni_usb_timeout_msecs() 37 return 2000 + usec / 500; in ni_usb_timeout_msecs() 41 static unsigned short ni_usb_timeout_code(unsigned int usec) in ni_usb_timeout_code() argument 43 if (usec == 0) in ni_usb_timeout_code() 45 else if (usec <= 10) in ni_usb_timeout_code() 47 else if (usec <= 30) in ni_usb_timeout_code() 49 else if (usec <= 100) in ni_usb_timeout_code() 51 else if (usec <= 300) in ni_usb_timeout_code() 53 else if (usec <= 1000) in ni_usb_timeout_code() [all …]
|
| /linux/drivers/net/wireless/ath/ath5k/ |
| H A D | reset.c | 101 ath5k_hw_htoclock(struct ath5k_hw *ah, unsigned int usec) in ath5k_hw_htoclock() argument 104 return usec * common->clockrate; in ath5k_hw_htoclock() 136 u32 usec_reg, txlat, rxlat, usec, clock, sclock, txf2txs; in ath5k_hw_init_core_clock() local 176 usec = clock - 1; in ath5k_hw_init_core_clock() 177 usec = AR5K_REG_SM(usec, AR5K_USEC_1); in ath5k_hw_init_core_clock() 256 usec_reg = (usec | sclock | txlat | rxlat); in ath5k_hw_init_core_clock()
|
| /linux/io_uring/ |
| H A D | fdinfo.c | 181 u64 usec; in __io_uring_show_fdinfo() local 185 usec = io_sq_cpu_usec(tsk); in __io_uring_show_fdinfo() 189 sq_total_time = usec; in __io_uring_show_fdinfo()
|
| /linux/drivers/net/ethernet/intel/igc/ |
| H A D | igc_defines.h | 622 #define IGC_PTM_CTRL_SHRT_CYC(usec) (((usec) & 0x3f) << 2) argument 623 #define IGC_PTM_CTRL_PTM_TO(usec) (((usec) & 0xff) << 8) argument
|
| /linux/drivers/hid/ |
| H A D | hid-ft260.c | 373 int ret, usec, try = 100; in ft260_hid_output_report_check_status() local 387 usec = len * 9000 / dev->clock; in ft260_hid_output_report_check_status() 388 if (usec > 2000) { in ft260_hid_output_report_check_status() 389 usec -= 1500; in ft260_hid_output_report_check_status() 390 usleep_range(usec, usec + 100); in ft260_hid_output_report_check_status() 391 ft260_dbg("wait %d usec, len %d\n", usec, len); in ft260_hid_output_report_check_status()
|