Searched refs:rate_hz (Results 1 – 5 of 5) sorted by relevance
| /linux/drivers/pwm/ |
| H A D | pwm_th1520.rs | 64 fn ns_to_cycles(ns: u64, rate_hz: u64) -> u64 { in ns_to_cycles() 67 (match ns.checked_mul(rate_hz) { in ns_to_cycles() 73 fn cycles_to_ns(cycles: u64, rate_hz: u64) -> u64 { in cycles_to_ns() 80 .saturating_add(rate_hz - 1); in cycles_to_ns() 82 numerator / rate_hz in cycles_to_ns() 140 let rate_hz = data.clk.rate().as_hz() as u64; in round_waveform_tohw() localVariable 142 let mut period_cycles = ns_to_cycles(wf.period_length_ns, rate_hz).min(u64::from(u32::MAX)); in round_waveform_tohw() 149 rate_hz in round_waveform_tohw() 156 let mut duty_cycles = ns_to_cycles(wf.duty_length_ns, rate_hz).min(u64::from(u32::MAX)); in round_waveform_tohw() 186 rate_hz in round_waveform_tohw() [all …]
|
| /linux/drivers/hwmon/ |
| H A D | ltc2947-core.c | 964 unsigned long rate_hz; in ltc2947_setup() local 969 rate_hz = clk_get_rate(extclk); in ltc2947_setup() 970 if (rate_hz < LTC2947_CLK_MIN || rate_hz > LTC2947_CLK_MAX) { in ltc2947_setup() 972 rate_hz); in ltc2947_setup() 977 if (rate_hz >= LTC2947_CLK_MIN && rate_hz <= 1000000) in ltc2947_setup() 979 else if (rate_hz > 1000000 && rate_hz <= 2000000) in ltc2947_setup() 981 else if (rate_hz > 2000000 && rate_hz <= 4000000) in ltc2947_setup() 983 else if (rate_hz > 4000000 && rate_hz <= 8000000) in ltc2947_setup() 985 else if (rate_hz > 8000000 && rate_hz <= 16000000) in ltc2947_setup() 987 else if (rate_hz > 16000000 && rate_hz <= LTC2947_CLK_MAX) in ltc2947_setup() [all …]
|
| /linux/drivers/mmc/host/ |
| H A D | sdhci-of-aspeed.c | 162 static int aspeed_sdhci_phase_to_tap(struct device *dev, unsigned long rate_hz, in aspeed_sdhci_phase_to_tap() argument 184 clk_period_ps = div_u64(PICOSECONDS_PER_SECOND, (u64)rate_hz); in aspeed_sdhci_phase_to_tap() 191 tap, phase_deg, rate_hz, ASPEED_SDHCI_NR_TAPS); in aspeed_sdhci_phase_to_tap()
|
| /linux/drivers/spi/ |
| H A D | spi-sn-f-ospi.c | 193 long rate_hz = clk_get_rate(ospi->clk); in f_ospi_config_clk() local 194 u32 div = DIV_ROUND_UP(rate_hz, device_hz); in f_ospi_config_clk() 198 if (rate_hz < device_hz) { in f_ospi_config_clk()
|
| /linux/drivers/misc/ |
| H A D | bh1770glc.c | 1012 unsigned long rate_hz; in bh1770_set_lux_rate() local 1015 ret = kstrtoul(buf, 0, &rate_hz); in bh1770_set_lux_rate() 1020 if (rate_hz >= lux_rates_hz[i]) in bh1770_set_lux_rate()
|