| /kernel/linux/linux-5.10/drivers/rtc/ |
| D | rtc-88pm80x.c | 103 unsigned long ticks, base, data; in pm80x_rtc_read_time() local 113 ticks = base + data; in pm80x_rtc_read_time() 114 dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm80x_rtc_read_time() 115 base, data, ticks); in pm80x_rtc_read_time() 116 rtc_time64_to_tm(ticks, tm); in pm80x_rtc_read_time() 124 unsigned long ticks, base, data; in pm80x_rtc_set_time() local 126 ticks = rtc_tm_to_time64(tm); in pm80x_rtc_set_time() 132 base = ticks - data; in pm80x_rtc_set_time() 133 dev_dbg(info->dev, "set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm80x_rtc_set_time() 134 base, data, ticks); in pm80x_rtc_set_time() [all …]
|
| D | rtc-tps6586x.c | 72 unsigned long long ticks = 0; in tps6586x_rtc_read_time() local 85 ticks <<= 8; in tps6586x_rtc_read_time() 86 ticks |= buff[i]; in tps6586x_rtc_read_time() 89 seconds = ticks >> 10; in tps6586x_rtc_read_time() 98 unsigned long long ticks; in tps6586x_rtc_set_time() local 105 ticks = (unsigned long long)seconds << 10; in tps6586x_rtc_set_time() 106 buff[0] = (ticks >> 32) & 0xff; in tps6586x_rtc_set_time() 107 buff[1] = (ticks >> 24) & 0xff; in tps6586x_rtc_set_time() 108 buff[2] = (ticks >> 16) & 0xff; in tps6586x_rtc_set_time() 109 buff[3] = (ticks >> 8) & 0xff; in tps6586x_rtc_set_time() [all …]
|
| D | rtc-88pm860x.c | 82 unsigned long ticks, base, data; in pm860x_rtc_read_time() local 94 ticks = base + data; in pm860x_rtc_read_time() 95 dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm860x_rtc_read_time() 96 base, data, ticks); in pm860x_rtc_read_time() 98 rtc_time64_to_tm(ticks, tm); in pm860x_rtc_read_time() 107 unsigned long ticks, base, data; in pm860x_rtc_set_time() local 109 ticks = rtc_tm_to_time64(tm); in pm860x_rtc_set_time() 115 base = ticks - data; in pm860x_rtc_set_time() 116 dev_dbg(info->dev, "set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm860x_rtc_set_time() 117 base, data, ticks); in pm860x_rtc_set_time() [all …]
|
| /kernel/linux/linux-4.19/Documentation/timers/ |
| D | NO_HZ.txt | 1 NO_HZ: Reducing Scheduling-Clock Ticks 11 (also known as "scheduling-clock ticks" or simply "ticks"): 13 1. Never omit scheduling-clock ticks (CONFIG_HZ_PERIODIC=y or 17 2. Omit scheduling-clock ticks on idle CPUs (CONFIG_NO_HZ_IDLE=y or 21 3. Omit scheduling-clock ticks on CPUs that are either idle or that 31 NEVER OMIT SCHEDULING-CLOCK TICKS 34 are incapable of omitting scheduling-clock ticks. It turns out that 62 OMIT SCHEDULING-CLOCK TICKS FOR IDLE CPUs 100 OMIT SCHEDULING-CLOCK TICKS FOR CPUs WITH ONLY ONE RUNNABLE TASK 104 Note that omitting scheduling-clock ticks for CPUs with only one runnable [all …]
|
| /kernel/linux/linux-5.10/fs/ |
| D | timerfd.c | 39 u64 ticks; member 69 ctx->ticks++; in timerfd_triggered() 94 * wake-up requires ctx->ticks to be non zero, therefore we increment 110 ctx->ticks++; in timerfd_clock_was_set() 185 ctx->ticks = 0; in timerfd_setup() 242 if (ctx->ticks) in timerfd_poll() 254 u64 ticks = 0; in timerfd_read() local 256 if (count < sizeof(ticks)) in timerfd_read() 262 res = wait_event_interruptible_locked_irq(ctx->wqh, ctx->ticks); in timerfd_read() 266 * ticks and we do not rearm the timer. Userspace must in timerfd_read() [all …]
|
| /kernel/linux/linux-4.19/fs/ |
| D | timerfd.c | 38 u64 ticks; member 68 ctx->ticks++; in timerfd_triggered() 93 * wake-up requires ctx->ticks to be non zero, therefore we increment 109 ctx->ticks++; in timerfd_clock_was_set() 184 ctx->ticks = 0; in timerfd_setup() 239 if (ctx->ticks) in timerfd_poll() 251 u64 ticks = 0; in timerfd_read() local 253 if (count < sizeof(ticks)) in timerfd_read() 259 res = wait_event_interruptible_locked_irq(ctx->wqh, ctx->ticks); in timerfd_read() 263 * ticks and we do not rearm the timer. Userspace must in timerfd_read() [all …]
|
| /kernel/linux/linux-4.19/drivers/rtc/ |
| D | rtc-88pm80x.c | 115 unsigned long ticks, base, data; in pm80x_rtc_read_time() local 125 ticks = base + data; in pm80x_rtc_read_time() 126 dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm80x_rtc_read_time() 127 base, data, ticks); in pm80x_rtc_read_time() 128 rtc_time64_to_tm(ticks, tm); in pm80x_rtc_read_time() 136 unsigned long ticks, base, data; in pm80x_rtc_set_time() local 138 ticks = rtc_tm_to_time64(tm); in pm80x_rtc_set_time() 144 base = ticks - data; in pm80x_rtc_set_time() 145 dev_dbg(info->dev, "set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm80x_rtc_set_time() 146 base, data, ticks); in pm80x_rtc_set_time() [all …]
|
| D | rtc-tps6586x.c | 71 unsigned long long ticks = 0; in tps6586x_rtc_read_time() local 84 ticks <<= 8; in tps6586x_rtc_read_time() 85 ticks |= buff[i]; in tps6586x_rtc_read_time() 88 seconds = ticks >> 10; in tps6586x_rtc_read_time() 97 unsigned long long ticks; in tps6586x_rtc_set_time() local 104 ticks = (unsigned long long)seconds << 10; in tps6586x_rtc_set_time() 105 buff[0] = (ticks >> 32) & 0xff; in tps6586x_rtc_set_time() 106 buff[1] = (ticks >> 24) & 0xff; in tps6586x_rtc_set_time() 107 buff[2] = (ticks >> 16) & 0xff; in tps6586x_rtc_set_time() 108 buff[3] = (ticks >> 8) & 0xff; in tps6586x_rtc_set_time() [all …]
|
| D | rtc-88pm860x.c | 34 int (*sync)(unsigned int ticks); 113 unsigned long ticks, base, data; in pm860x_rtc_read_time() local 125 ticks = base + data; in pm860x_rtc_read_time() 126 dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm860x_rtc_read_time() 127 base, data, ticks); in pm860x_rtc_read_time() 129 rtc_time_to_tm(ticks, tm); in pm860x_rtc_read_time() 138 unsigned long ticks, base, data; in pm860x_rtc_set_time() local 146 rtc_tm_to_time(tm, &ticks); in pm860x_rtc_set_time() 152 base = ticks - data; in pm860x_rtc_set_time() 153 dev_dbg(info->dev, "set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n", in pm860x_rtc_set_time() [all …]
|
| /kernel/linux/linux-5.10/Documentation/timers/ |
| D | no_hz.rst | 2 NO_HZ: Reducing Scheduling-Clock Ticks 13 (also known as "scheduling-clock ticks" or simply "ticks"): 15 1. Never omit scheduling-clock ticks (CONFIG_HZ_PERIODIC=y or 19 2. Omit scheduling-clock ticks on idle CPUs (CONFIG_NO_HZ_IDLE=y or 23 3. Omit scheduling-clock ticks on CPUs that are either idle or that 33 Never Omit Scheduling-Clock Ticks 37 are incapable of omitting scheduling-clock ticks. It turns out that 65 Omit Scheduling-Clock Ticks For Idle CPUs 104 Omit Scheduling-Clock Ticks For CPUs With Only One Runnable Task 109 Note that omitting scheduling-clock ticks for CPUs with only one runnable [all …]
|
| /kernel/linux/linux-5.10/drivers/watchdog/ |
| D | cpu5wdt.c | 28 static int ticks = 10000; variable 61 pr_debug("trigger at %i ticks\n", ticks); in cpu5wdt_trigger() 64 ticks--; in cpu5wdt_trigger() 71 if (cpu5wdt_device.queue && ticks) in cpu5wdt_trigger() 74 /* ticks doesn't matter anyway */ in cpu5wdt_trigger() 83 ticks = cpu5wdt_device.default_ticks; in cpu5wdt_reset() 86 pr_debug("reset (%i ticks)\n", (int) ticks); in cpu5wdt_reset() 116 ticks = cpu5wdt_device.default_ticks; in cpu5wdt_stop() 215 cpu5wdt_device.default_ticks = ticks; in cpu5wdt_init() 285 module_param(ticks, int, 0); [all …]
|
| /kernel/linux/linux-5.10/drivers/hwmon/ |
| D | hih6130.c | 46 * hih6130_temp_ticks_to_millicelsius() - convert raw temperature ticks to 48 * @ticks: temperature ticks value received from sensor 50 static inline int hih6130_temp_ticks_to_millicelsius(int ticks) in hih6130_temp_ticks_to_millicelsius() argument 52 ticks = ticks >> 2; in hih6130_temp_ticks_to_millicelsius() 55 * Formula T = ( ticks / ( 2^14 - 2 ) ) * 165 -40 in hih6130_temp_ticks_to_millicelsius() 57 return (DIV_ROUND_CLOSEST(ticks * 1650, 16382) - 400) * 100; in hih6130_temp_ticks_to_millicelsius() 61 * hih6130_rh_ticks_to_per_cent_mille() - convert raw humidity ticks to 63 * @ticks: humidity ticks value received from sensor 65 static inline int hih6130_rh_ticks_to_per_cent_mille(int ticks) in hih6130_rh_ticks_to_per_cent_mille() argument 67 ticks &= ~0xC000; /* clear status bits */ in hih6130_rh_ticks_to_per_cent_mille() [all …]
|
| /kernel/linux/linux-4.19/drivers/watchdog/ |
| D | cpu5wdt.c | 42 static int ticks = 10000; variable 75 pr_debug("trigger at %i ticks\n", ticks); in cpu5wdt_trigger() 78 ticks--; in cpu5wdt_trigger() 85 if (cpu5wdt_device.queue && ticks) in cpu5wdt_trigger() 88 /* ticks doesn't matter anyway */ in cpu5wdt_trigger() 97 ticks = cpu5wdt_device.default_ticks; in cpu5wdt_reset() 100 pr_debug("reset (%i ticks)\n", (int) ticks); in cpu5wdt_reset() 130 ticks = cpu5wdt_device.default_ticks; in cpu5wdt_stop() 228 cpu5wdt_device.default_ticks = ticks; in cpu5wdt_init() 298 module_param(ticks, int, 0); [all …]
|
| /kernel/linux/linux-4.19/drivers/hwmon/ |
| D | hih6130.c | 59 * hih6130_temp_ticks_to_millicelsius() - convert raw temperature ticks to 61 * @ticks: temperature ticks value received from sensor 63 static inline int hih6130_temp_ticks_to_millicelsius(int ticks) in hih6130_temp_ticks_to_millicelsius() argument 65 ticks = ticks >> 2; in hih6130_temp_ticks_to_millicelsius() 68 * Formula T = ( ticks / ( 2^14 - 2 ) ) * 165 -40 in hih6130_temp_ticks_to_millicelsius() 70 return (DIV_ROUND_CLOSEST(ticks * 1650, 16382) - 400) * 100; in hih6130_temp_ticks_to_millicelsius() 74 * hih6130_rh_ticks_to_per_cent_mille() - convert raw humidity ticks to 76 * @ticks: humidity ticks value received from sensor 78 static inline int hih6130_rh_ticks_to_per_cent_mille(int ticks) in hih6130_rh_ticks_to_per_cent_mille() argument 80 ticks &= ~0xC000; /* clear status bits */ in hih6130_rh_ticks_to_per_cent_mille() [all …]
|
| /kernel/linux/linux-4.19/arch/powerpc/sysdev/ |
| D | mpic_timer.c | 90 const u64 ticks, time64_t *time) in convert_ticks_to_time() argument 92 *time = (u64)div_u64(ticks, priv->timerfreq); in convert_ticks_to_time() 95 /* the time set by the user is converted to "ticks" */ 97 time64_t time, u64 *ticks) in convert_time_to_ticks() argument 106 *ticks = (u64)time * (u64)priv->timerfreq; in convert_time_to_ticks() 142 static int set_cascade_timer(struct timer_group_priv *priv, u64 ticks, in set_cascade_timer() argument 159 tmp_ticks = div_u64_rem(ticks, MAX_TICKS_CASCADE, &rem_ticks); in set_cascade_timer() 171 u64 ticks) in get_cascade_timer() argument 179 if (ticks > max_ticks) in get_cascade_timer() 187 /* set ticks to timer */ in get_cascade_timer() [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/sysdev/ |
| D | mpic_timer.c | 86 const u64 ticks, time64_t *time) in convert_ticks_to_time() argument 88 *time = (u64)div_u64(ticks, priv->timerfreq); in convert_ticks_to_time() 91 /* the time set by the user is converted to "ticks" */ 93 time64_t time, u64 *ticks) in convert_time_to_ticks() argument 102 *ticks = (u64)time * (u64)priv->timerfreq; in convert_time_to_ticks() 138 static int set_cascade_timer(struct timer_group_priv *priv, u64 ticks, in set_cascade_timer() argument 155 tmp_ticks = div_u64_rem(ticks, MAX_TICKS_CASCADE, &rem_ticks); in set_cascade_timer() 167 u64 ticks) in get_cascade_timer() argument 175 if (ticks > max_ticks) in get_cascade_timer() 183 /* set ticks to timer */ in get_cascade_timer() [all …]
|
| /kernel/linux/linux-5.10/drivers/ssb/ |
| D | driver_extif.c | 115 u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks) in ssb_extif_watchdog_timer_set_wdt() argument 119 return ssb_extif_watchdog_timer_set(extif, ticks); in ssb_extif_watchdog_timer_set_wdt() 125 u32 ticks = (SSB_EXTIF_WATCHDOG_CLK / 1000) * ms; in ssb_extif_watchdog_timer_set_ms() local 127 ticks = ssb_extif_watchdog_timer_set(extif, ticks); in ssb_extif_watchdog_timer_set_ms() 129 return (ticks * 1000) / SSB_EXTIF_WATCHDOG_CLK; in ssb_extif_watchdog_timer_set_ms() 132 u32 ssb_extif_watchdog_timer_set(struct ssb_extif *extif, u32 ticks) in ssb_extif_watchdog_timer_set() argument 134 if (ticks > SSB_EXTIF_WATCHDOG_MAX_TIMER) in ssb_extif_watchdog_timer_set() 135 ticks = SSB_EXTIF_WATCHDOG_MAX_TIMER; in ssb_extif_watchdog_timer_set() 136 extif_write32(extif, SSB_EXTIF_WATCHDOG, ticks); in ssb_extif_watchdog_timer_set() 138 return ticks; in ssb_extif_watchdog_timer_set()
|
| /kernel/linux/linux-4.19/drivers/ssb/ |
| D | driver_extif.c | 115 u32 ssb_extif_watchdog_timer_set_wdt(struct bcm47xx_wdt *wdt, u32 ticks) in ssb_extif_watchdog_timer_set_wdt() argument 119 return ssb_extif_watchdog_timer_set(extif, ticks); in ssb_extif_watchdog_timer_set_wdt() 125 u32 ticks = (SSB_EXTIF_WATCHDOG_CLK / 1000) * ms; in ssb_extif_watchdog_timer_set_ms() local 127 ticks = ssb_extif_watchdog_timer_set(extif, ticks); in ssb_extif_watchdog_timer_set_ms() 129 return (ticks * 1000) / SSB_EXTIF_WATCHDOG_CLK; in ssb_extif_watchdog_timer_set_ms() 132 u32 ssb_extif_watchdog_timer_set(struct ssb_extif *extif, u32 ticks) in ssb_extif_watchdog_timer_set() argument 134 if (ticks > SSB_EXTIF_WATCHDOG_MAX_TIMER) in ssb_extif_watchdog_timer_set() 135 ticks = SSB_EXTIF_WATCHDOG_MAX_TIMER; in ssb_extif_watchdog_timer_set() 136 extif_write32(extif, SSB_EXTIF_WATCHDOG, ticks); in ssb_extif_watchdog_timer_set() 138 return ticks; in ssb_extif_watchdog_timer_set()
|
| /kernel/linux/linux-5.10/include/sound/ |
| D | timer.h | 46 unsigned long ticks; /* max timer ticks per interrupt */ member 67 unsigned long sticks; /* schedule ticks */ 89 unsigned long ticks, unsigned long resolution); 96 unsigned long ticks; /* auto-load ticks when expired */ member 97 unsigned long cticks; /* current ticks */ 98 unsigned long pticks; /* accumulated ticks for callback */ 100 unsigned long lost; /* lost ticks */ 126 int snd_timer_start(struct snd_timer_instance *timeri, unsigned int ticks);
|
| /kernel/linux/linux-4.19/drivers/bcma/ |
| D | driver_chipcommon.c | 78 u32 ticks) in bcma_chipco_watchdog_timer_set_wdt() argument 82 return bcma_chipco_watchdog_timer_set(cc, ticks); in bcma_chipco_watchdog_timer_set_wdt() 89 u32 ticks; in bcma_chipco_watchdog_timer_set_ms_wdt() local 91 ticks = bcma_chipco_watchdog_timer_set(cc, cc->ticks_per_ms * ms); in bcma_chipco_watchdog_timer_set_ms_wdt() 92 return ticks / cc->ticks_per_ms; in bcma_chipco_watchdog_timer_set_ms_wdt() 235 /* Set chip watchdog reset timer to fire in 'ticks' backplane cycles */ 236 u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks) in bcma_chipco_watchdog_timer_set() argument 242 if (ticks == 1) in bcma_chipco_watchdog_timer_set() 243 ticks = 2; in bcma_chipco_watchdog_timer_set() 244 else if (ticks > maxt) in bcma_chipco_watchdog_timer_set() [all …]
|
| /kernel/linux/linux-5.10/drivers/bcma/ |
| D | driver_chipcommon.c | 78 u32 ticks) in bcma_chipco_watchdog_timer_set_wdt() argument 82 return bcma_chipco_watchdog_timer_set(cc, ticks); in bcma_chipco_watchdog_timer_set_wdt() 89 u32 ticks; in bcma_chipco_watchdog_timer_set_ms_wdt() local 91 ticks = bcma_chipco_watchdog_timer_set(cc, cc->ticks_per_ms * ms); in bcma_chipco_watchdog_timer_set_ms_wdt() 92 return ticks / cc->ticks_per_ms; in bcma_chipco_watchdog_timer_set_ms_wdt() 235 /* Set chip watchdog reset timer to fire in 'ticks' backplane cycles */ 236 u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks) in bcma_chipco_watchdog_timer_set() argument 242 if (ticks == 1) in bcma_chipco_watchdog_timer_set() 243 ticks = 2; in bcma_chipco_watchdog_timer_set() 244 else if (ticks > maxt) in bcma_chipco_watchdog_timer_set() [all …]
|
| /kernel/linux/linux-4.19/include/sound/ |
| D | timer.h | 61 unsigned long ticks; /* max timer ticks per interrupt */ member 82 unsigned long sticks; /* schedule ticks */ 104 unsigned long ticks, unsigned long resolution); 111 unsigned long ticks; /* auto-load ticks when expired */ member 112 unsigned long cticks; /* current ticks */ 113 unsigned long pticks; /* accumulated ticks for callback */ 115 unsigned long lost; /* lost ticks */ 139 int snd_timer_start(struct snd_timer_instance *timeri, unsigned int ticks);
|
| /kernel/linux/linux-5.10/drivers/acpi/acpica/ |
| D | hwtimer.c | 53 * PARAMETERS: ticks - Where the timer value is returned in ACPI_EXPORT_SYMBOL() 55 * RETURN: Status and current timer value (ticks) in ACPI_EXPORT_SYMBOL() 57 * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). in ACPI_EXPORT_SYMBOL() 60 acpi_status acpi_get_timer(u32 * ticks) in ACPI_EXPORT_SYMBOL() 67 if (!ticks) { in ACPI_EXPORT_SYMBOL() 82 *ticks = (u32)timer_value; in ACPI_EXPORT_SYMBOL() 104 * The PM Timer's clock ticks at roughly 3.6 times per in ACPI_EXPORT_SYMBOL() 114 * 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec in ACPI_EXPORT_SYMBOL() 115 * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes in ACPI_EXPORT_SYMBOL()
|
| /kernel/linux/linux-4.19/drivers/acpi/acpica/ |
| D | hwtimer.c | 53 * PARAMETERS: ticks - Where the timer value is returned in ACPI_EXPORT_SYMBOL() 55 * RETURN: Status and current timer value (ticks) in ACPI_EXPORT_SYMBOL() 57 * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). in ACPI_EXPORT_SYMBOL() 60 acpi_status acpi_get_timer(u32 * ticks) in ACPI_EXPORT_SYMBOL() 67 if (!ticks) { in ACPI_EXPORT_SYMBOL() 82 *ticks = (u32)timer_value; in ACPI_EXPORT_SYMBOL() 104 * The PM Timer's clock ticks at roughly 3.6 times per in ACPI_EXPORT_SYMBOL() 114 * 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec in ACPI_EXPORT_SYMBOL() 115 * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes in ACPI_EXPORT_SYMBOL()
|
| /kernel/liteos_a/kernel/include/ |
| D | los_sys.h | 116 * @brief Obtain the number of Ticks. 119 * This API is used to obtain the number of Ticks. 127 * @retval UINT64 The number of Ticks. 156 * @brief Convert Ticks to milliseconds. 159 * This API is used to convert Ticks to milliseconds. 165 * @param tick [IN] Number of Ticks. The value range is (0,OS_SYS_CLOCK). 167 …* @retval UINT32 Number of milliseconds obtained through the conversion. Ticks are successfully co… 177 * @brief Convert milliseconds to Ticks. 180 * This API is used to convert milliseconds to Ticks. 189 * @retval UINT32 Number of Ticks obtained through the conversion.
|