| /linux-6.15/drivers/pwm/ |
| H A D | pwm-sl28cpld.c | 55 #define SL28CPLD_PWM_MAX_DUTY_CYCLE(prescaler) (1 << (7 - (prescaler))) argument 56 #define SL28CPLD_PWM_PERIOD(prescaler) \ argument 57 (NSEC_PER_SEC / SL28CPLD_PWM_CLK * SL28CPLD_PWM_MAX_DUTY_CYCLE(prescaler)) 99 int prescaler; in sl28cpld_pwm_get_state() local 105 prescaler = FIELD_GET(SL28CPLD_PWM_CTRL_PRESCALER_MASK, reg); in sl28cpld_pwm_get_state() 106 state->period = SL28CPLD_PWM_PERIOD(prescaler); in sl28cpld_pwm_get_state() 129 unsigned int cycle, prescaler; in sl28cpld_pwm_apply() local 142 prescaler = DIV_ROUND_UP_ULL(SL28CPLD_PWM_PERIOD(0), state->period); in sl28cpld_pwm_apply() 143 prescaler = order_base_2(prescaler); in sl28cpld_pwm_apply() 145 if (prescaler > field_max(SL28CPLD_PWM_CTRL_PRESCALER_MASK)) in sl28cpld_pwm_apply() [all …]
|
| H A D | pwm-sun4i.c | 116 unsigned int prescaler; in sun4i_pwm_get_state() local 140 prescaler = 1; in sun4i_pwm_get_state() 144 if (prescaler == 0) in sun4i_pwm_get_state() 175 unsigned int prescaler = 0; in sun4i_pwm_calculate() local 191 prescaler = PWM_PRESCAL_MASK; in sun4i_pwm_calculate() 200 prescaler = 0; in sun4i_pwm_calculate() 203 if (prescaler == 0) { in sun4i_pwm_calculate() 205 for (prescaler = 0; prescaler < PWM_PRESCAL_MASK; prescaler++) { in sun4i_pwm_calculate() 227 *prsclr = prescaler; in sun4i_pwm_calculate() 239 unsigned int delay_us, prescaler = 0; in sun4i_pwm_apply() local [all …]
|
| H A D | pwm-renesas-tpu.c | 75 unsigned int prescaler; member 178 tpd->prescaler); in tpu_pwm_timer_start() 225 tpd->prescaler = 0; in tpu_pwm_request() 247 unsigned int prescaler; in tpu_pwm_config() local 281 prescaler = 0; in tpu_pwm_config() 285 prescaler = 1; in tpu_pwm_config() 289 prescaler = 2; in tpu_pwm_config() 293 prescaler = 3; in tpu_pwm_config() 300 period >>= 2 * prescaler; in tpu_pwm_config() 312 if (tpd->prescaler == prescaler && tpd->period == period) in tpu_pwm_config() [all …]
|
| H A D | pwm-rockchip.c | 48 unsigned int prescaler; member 81 tmp *= pc->data->prescaler * NSEC_PER_SEC; in rockchip_pwm_get_state() 85 tmp *= pc->data->prescaler * NSEC_PER_SEC; in rockchip_pwm_get_state() 119 pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config() 122 duty = DIV_ROUND_CLOSEST_ULL(div, pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config() 239 .prescaler = 2, 252 .prescaler = 1, 266 .prescaler = 1, 280 .prescaler = 1,
|
| H A D | pwm-imx27.c | 108 u32 period, prescaler, pwm_clk, val; in pwm_imx27_get_state() local 134 prescaler = MX3_PWMCR_PRESCALER_GET(val); in pwm_imx27_get_state() 140 tmp = NSEC_PER_SEC * (u64)(period + 2) * prescaler; in pwm_imx27_get_state() 152 tmp = NSEC_PER_SEC * (u64)(val) * prescaler; in pwm_imx27_get_state()
|
| /linux-6.15/drivers/tty/serial/8250/ |
| H A D | 8250_ni.c | 68 u8 prescaler; member 156 u8 prescaler) in ni16550_config_prescaler() argument 178 serial_out(up, UART_ICR, prescaler); in ni16550_config_prescaler() 283 unsigned int prescaler = 0; in ni16550_probe() local 352 if (info->prescaler) in ni16550_probe() 353 prescaler = info->prescaler; in ni16550_probe() 354 device_property_read_u32(dev, "clock-prescaler", &prescaler); in ni16550_probe() 356 if (prescaler != 0) { in ni16550_probe() 358 ni16550_config_prescaler(&uart, (u8)prescaler); in ni16550_probe() 429 .prescaler = 0x09, [all …]
|
| /linux-6.15/drivers/clocksource/ |
| H A D | timer-stm32.c | 209 int prescaler = 1; in stm32_timer_set_prescaler() local 212 prescaler = DIV_ROUND_CLOSEST(timer_of_rate(to), in stm32_timer_set_prescaler() 219 prescaler = prescaler < TIM_PSC_MAX ? prescaler : TIM_PSC_MAX; in stm32_timer_set_prescaler() 222 writel_relaxed(prescaler - 1, timer_of_base(to) + TIM_PSC); in stm32_timer_set_prescaler() 227 to->of_clk.rate = DIV_ROUND_CLOSEST(to->of_clk.rate, prescaler); in stm32_timer_set_prescaler()
|
| /linux-6.15/drivers/watchdog/ |
| H A D | mpc8xxx_wdt.c | 44 int prescaler; member 186 ddata->swtc = min(ddata->wdd.timeout * freq / wdt_type->prescaler, in mpc8xxx_wdt_probe() 197 ddata->wdd.max_hw_heartbeat_ms = (ddata->swtc * wdt_type->prescaler) / in mpc8xxx_wdt_probe() 219 .prescaler = 0x10000, 226 .prescaler = 0x10000, 234 .prescaler = 0x800,
|
| H A D | cadence_wdt.c | 78 u32 prescaler; member 186 count = (wdd->timeout * (clock_f / wdt->prescaler)) / in cdns_wdt_start() 338 wdt->prescaler = CDNS_WDT_PRESCALE_512; in cdns_wdt_probe() 341 wdt->prescaler = CDNS_WDT_PRESCALE_4096; in cdns_wdt_probe()
|
| H A D | kempld_wdt.c | 133 u32 prescaler; in kempld_wdt_set_stage_timeout() local 139 prescaler = kempld_prescaler[PRESCALER_21]; in kempld_wdt_set_stage_timeout() 145 remainder = do_div(stage_timeout64, prescaler); in kempld_wdt_set_stage_timeout() 175 u32 prescaler; in kempld_wdt_get_timeout() local 184 prescaler = kempld_prescaler[STAGE_CFG_GET_PRESCALER(stage_cfg)]; in kempld_wdt_get_timeout() 186 stage_timeout = (stage_timeout & stage->mask) * prescaler; in kempld_wdt_get_timeout()
|
| /linux-6.15/arch/powerpc/sysdev/ |
| H A D | fsl_gtm.c | 170 unsigned int prescaler; in gtm_set_ref_timer16() local 181 prescaler = gtm->clock / frequency; in gtm_set_ref_timer16() 187 if (prescaler > max_prescaler) in gtm_set_ref_timer16() 190 if (prescaler > max_prescaler / 16) { in gtm_set_ref_timer16() 192 prescaler /= 16; in gtm_set_ref_timer16() 195 if (prescaler <= 256) { in gtm_set_ref_timer16() 197 sps = prescaler - 1; in gtm_set_ref_timer16() 200 sps = prescaler / 256 - 1; in gtm_set_ref_timer16()
|
| /linux-6.15/Documentation/misc-devices/ |
| H A D | oxsemi-tornado.rst | 11 frequency by dividing it by the clock prescaler, which can be set to any 19 By default the oversampling rate is set to 16 and the clock prescaler is 27 prescaler is programmed with the CPR/CPR2 register pair [OX200]_ [OX952]_ 29 the prescaler the enhanced mode has to be explicitly enabled though, by 31 the prescaler or otherwise it is bypassed as if the value of 1 was used. 34 devices that do not have the extra prescaler's 9th bit in CPR2, so the 45 (tcr), the clock prescaler (cpr) and the divisor (div) produced by the 93 used by encoding the values for, the prescaler, the oversampling rate 109 oversampling rate to 16 and prescaler values below 1 in CPR2/CPR are 113 respectively to 0x1f4, 0x0 and 0x04e2, choosing the prescaler value,
|
| /linux-6.15/Documentation/devicetree/bindings/power/supply/ |
| H A D | lltc,ltc294x.yaml | 39 lltc,prescaler-exponent: 42 The prescaler exponent as explained in the datasheet. 51 - lltc,prescaler-exponent 64 lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */
|
| /linux-6.15/drivers/rtc/ |
| H A D | rtc-mpfs.c | 219 unsigned long prescaler; in mpfs_rtc_probe() local 260 prescaler = clk_get_rate(devm_clk_get(&pdev->dev, "rtcref")) - 1; in mpfs_rtc_probe() 261 if (prescaler > MAX_PRESCALER_COUNT) { in mpfs_rtc_probe() 262 dev_dbg(&pdev->dev, "invalid prescaler %lu\n", prescaler); in mpfs_rtc_probe() 266 writel(prescaler, rtcdev->base + PRESCALER_REG); in mpfs_rtc_probe() 267 dev_info(&pdev->dev, "prescaler set to: %lu\n", prescaler); in mpfs_rtc_probe()
|
| /linux-6.15/Documentation/devicetree/bindings/pwm/ |
| H A D | ti,omap-dmtimer-pwm.yaml | 29 ti,prescaler: 31 Legacy clock prescaler for timer. The timer counter is prescaled 32 with 2^n where n is the prescaler.
|
| /linux-6.15/arch/powerpc/kernel/ |
| H A D | udbg_16550.c | 126 unsigned int dll, dlm, divisor, prescaler, speed; in udbg_probe_uart_speed() local 141 prescaler = 4; in udbg_probe_uart_speed() 143 prescaler = 1; in udbg_probe_uart_speed() 149 speed = (clock / prescaler) / (divisor * 16); in udbg_probe_uart_speed()
|
| /linux-6.15/drivers/i2c/busses/ |
| H A D | i2c-mpc.c | 394 u32 prescaler = 1; in mpc_i2c_get_prescaler_8xxx() local 409 prescaler = 1; in mpc_i2c_get_prescaler_8xxx() 413 prescaler = mpc_i2c_get_sec_cfg_8xxx() ? 3 : 2; in mpc_i2c_get_prescaler_8xxx() 416 prescaler = 2; in mpc_i2c_get_prescaler_8xxx() 419 return prescaler; in mpc_i2c_get_prescaler_8xxx() 426 u32 prescaler = mpc_i2c_get_prescaler_8xxx(); in mpc_i2c_get_fdr_8xxx() local 432 *real_clk = fsl_get_sys_freq() / prescaler / (16 * 3072); in mpc_i2c_get_fdr_8xxx() 436 divider = fsl_get_sys_freq() / clock / prescaler; in mpc_i2c_get_fdr_8xxx() 451 *real_clk = fsl_get_sys_freq() / prescaler / div->divider; in mpc_i2c_get_fdr_8xxx()
|
| /linux-6.15/drivers/thermal/st/ |
| H A D | stm_thermal.c | 200 u32 prescaler; in stm_thermal_calibration() local 207 prescaler = 0; in stm_thermal_calibration() 210 while (prescaler <= clk_freq) in stm_thermal_calibration() 211 prescaler++; in stm_thermal_calibration() 220 value |= (prescaler << HSREF_CLK_DIV_POS); in stm_thermal_calibration()
|
| /linux-6.15/Documentation/devicetree/bindings/mfd/ |
| H A D | st,stm32-timers.yaml | 12 by a programmable prescaler, break input feature, PWM outputs and 15 driven by a programmable prescaler and PWM outputs. 17 programmable prescaler.
|
| /linux-6.15/arch/arm/mach-omap2/ |
| H A D | vc.c | 474 u32 prescaler; in omap4_calc_volt_ramp() local 483 prescaler = 0; in omap4_calc_volt_ramp() 490 prescaler++; in omap4_calc_volt_ramp() 496 prescaler++; in omap4_calc_volt_ramp() 502 prescaler++; in omap4_calc_volt_ramp() 514 return (prescaler << OMAP4430_RAMP_UP_PRESCAL_SHIFT) | in omap4_calc_volt_ramp()
|
| /linux-6.15/drivers/mmc/host/ |
| H A D | mxcmmc.c | 789 int prescaler = 0; in mxcmci_set_clk_rate() local 792 while (prescaler <= 0x800) { in mxcmci_set_clk_rate() 798 if (prescaler) in mxcmci_set_clk_rate() 799 x /= (prescaler * 2); in mxcmci_set_clk_rate() 807 if (prescaler == 0) in mxcmci_set_clk_rate() 808 prescaler = 1; in mxcmci_set_clk_rate() 810 prescaler <<= 1; in mxcmci_set_clk_rate() 813 mxcmci_writew(host, (prescaler << 4) | divider, MMC_REG_CLK_RATE); in mxcmci_set_clk_rate() 816 prescaler, divider, clk_in, clk_ios); in mxcmci_set_clk_rate()
|
| /linux-6.15/drivers/usb/serial/ |
| H A D | keyspan.c | 49 u8 *prescaler, int portnum); 53 u8 *prescaler, int portnum); 57 u8 *prescaler, int portnum); 61 u8 *prescaler, int portnum); 1975 if (prescaler) { in keyspan_usa19w_calc_baud() 1976 *prescaler = best_prescaler; in keyspan_usa19w_calc_baud() 2080 msg.prescaler = 10; in keyspan_usa26_send_setup() 2350 msg.prescaler = 10; in keyspan_usa49_send_setup() 2481 u8 prescaler; in keyspan_usa90_send_setup() local 2516 &msg.baudHi, &msg.baudLo, &prescaler, 0); in keyspan_usa90_send_setup() [all …]
|
| /linux-6.15/drivers/iio/frequency/ |
| H A D | adf4350.c | 145 u32 div_gcd, prescaler, chspc; in adf4350_set_freq() local 153 prescaler = ADF4350_REG1_PRESCALER; in adf4350_set_freq() 156 prescaler = 0; in adf4350_set_freq() 210 1 << st->r4_rf_div_sel, prescaler ? "8/9" : "4/5", in adf4350_set_freq() 218 prescaler; in adf4350_set_freq()
|
| /linux-6.15/drivers/counter/ |
| H A D | stm32-timer-cnt.c | 245 struct counter_count *count, u64 *prescaler) in stm32_count_prescaler_read() argument 252 *prescaler = psc + 1; in stm32_count_prescaler_read() 258 struct counter_count *count, u64 prescaler) in stm32_count_prescaler_write() argument 263 if (!prescaler || prescaler > MAX_TIM_PSC + 1) in stm32_count_prescaler_write() 266 psc = prescaler - 1; in stm32_count_prescaler_write()
|
| /linux-6.15/drivers/iio/trigger/ |
| H A D | stm32-timer-trigger.c | 125 int prescaler = 0, ret; in stm32_timer_start() local 140 prescaler++; in stm32_timer_start() 142 do_div(div, (prescaler + 1)); in stm32_timer_start() 146 if (prescaler > MAX_TIM_PSC) { in stm32_timer_start() 164 regmap_write(priv->regmap, TIM_PSC, prescaler); in stm32_timer_start()
|