Home
last modified time | relevance | path

Searched refs:hz (Results 1 – 25 of 32) sorted by relevance

12

/drivers/spi/
Dspi-s3c24xx.c42 unsigned int hz; member
124 unsigned int hz; in s3c24xx_spi_update_state() local
128 hz = t ? t->speed_hz : spi->max_speed_hz; in s3c24xx_spi_update_state()
130 if (!hz) in s3c24xx_spi_update_state()
131 hz = spi->max_speed_hz; in s3c24xx_spi_update_state()
146 if (cs->hz != hz) { in s3c24xx_spi_update_state()
148 div = DIV_ROUND_UP(clk, hz * 2) - 1; in s3c24xx_spi_update_state()
154 div, hz, clk / (2 * (div + 1))); in s3c24xx_spi_update_state()
156 cs->hz = hz; in s3c24xx_spi_update_state()
192 cs->hz = -1; in s3c24xx_spi_setup()
Dspi-bitbang.c145 u32 hz; in spi_bitbang_setup_transfer() local
149 hz = t->speed_hz; in spi_bitbang_setup_transfer()
152 hz = 0; in spi_bitbang_setup_transfer()
168 if (!hz) in spi_bitbang_setup_transfer()
169 hz = spi->max_speed_hz; in spi_bitbang_setup_transfer()
170 if (hz) { in spi_bitbang_setup_transfer()
171 cs->nsecs = (1000000000/2) / hz; in spi_bitbang_setup_transfer()
Dspi-omap-uwire.c319 unsigned hz; in uwire_setup_transfer() local
352 hz = spi->max_speed_hz; in uwire_setup_transfer()
354 hz = t->speed_hz; in uwire_setup_transfer()
356 if (!hz) { in uwire_setup_transfer()
379 div2 = (rate / div1 + hz - 1) / hz; in uwire_setup_transfer()
385 dev_name(&spi->dev), rate / 10 / 8, hz); in uwire_setup_transfer()
Dspi-sc18is602.c139 static int sc18is602_setup_transfer(struct sc18is602 *hw, u32 hz, u8 mode) in sc18is602_setup_transfer() argument
152 if (hz >= hw->freq / 4) { in sc18is602_setup_transfer()
155 } else if (hz >= hw->freq / 16) { in sc18is602_setup_transfer()
158 } else if (hz >= hw->freq / 64) { in sc18is602_setup_transfer()
Dspi-fsl-espi.c137 u32 hz = 0; in fsl_espi_setup_transfer() local
142 hz = t->speed_hz; in fsl_espi_setup_transfer()
149 if (!hz) in fsl_espi_setup_transfer()
150 hz = spi->max_speed_hz; in fsl_espi_setup_transfer()
176 if ((mpc8xxx_spi->spibrg / hz) > 64) { in fsl_espi_setup_transfer()
178 pm = DIV_ROUND_UP(mpc8xxx_spi->spibrg, hz * 16 * 4); in fsl_espi_setup_transfer()
182 hz, mpc8xxx_spi->spibrg / (4 * 16 * (32 + 1))); in fsl_espi_setup_transfer()
186 pm = DIV_ROUND_UP(mpc8xxx_spi->spibrg, hz * 4); in fsl_espi_setup_transfer()
Dspi-fsl-spi.c228 u32 hz = 0; in fsl_spi_setup_transfer() local
235 hz = t->speed_hz; in fsl_spi_setup_transfer()
242 if (!hz) in fsl_spi_setup_transfer()
243 hz = spi->max_speed_hz; in fsl_spi_setup_transfer()
267 if ((mpc8xxx_spi->spibrg / hz) > 64) { in fsl_spi_setup_transfer()
269 pm = (mpc8xxx_spi->spibrg - 1) / (hz * 64) + 1; in fsl_spi_setup_transfer()
273 hz, mpc8xxx_spi->spibrg / 1024); in fsl_spi_setup_transfer()
277 pm = (mpc8xxx_spi->spibrg - 1) / (hz * 4) + 1; in fsl_spi_setup_transfer()
Dspi-mxs.c77 const unsigned int hz = min(dev->max_speed_hz, t->speed_hz); in mxs_spi_setup_transfer() local
79 if (hz == 0) { in mxs_spi_setup_transfer()
84 if (hz != spi->sck) { in mxs_spi_setup_transfer()
85 mxs_ssp_set_clk_rate(ssp, hz); in mxs_spi_setup_transfer()
91 spi->sck = hz; in mxs_spi_setup_transfer()
Dspi-bcm63xx-hsspi.c125 struct spi_device *spi, int hz) in bcm63xx_hsspi_set_clk() argument
130 reg = DIV_ROUND_UP(2048, DIV_ROUND_UP(bs->speed_hz, hz)); in bcm63xx_hsspi_set_clk()
135 if (hz > HSSPI_MAX_SYNC_CLOCK) in bcm63xx_hsspi_set_clk()
Dspi-au1550.c237 unsigned bpw, hz; in au1550_spi_setupxfer() local
241 hz = spi->max_speed_hz; in au1550_spi_setupxfer()
246 hz = t->speed_hz; in au1550_spi_setupxfer()
249 if (!hz) in au1550_spi_setupxfer()
268 cfg |= au1550_spi_baudcfg(hw, hz); in au1550_spi_setupxfer()
Dspi-davinci.c294 u32 hz = 0, spifmt = 0; in davinci_spi_setup_transfer() local
304 hz = t->speed_hz; in davinci_spi_setup_transfer()
325 if (!hz) in davinci_spi_setup_transfer()
326 hz = spi->max_speed_hz; in davinci_spi_setup_transfer()
330 prescale = davinci_spi_get_prescale(dspi, hz); in davinci_spi_setup_transfer()
Dspi-sirf.c524 int hz = 0; in spi_sirfsoc_setup_transfer() local
532 hz = t && t->speed_hz ? t->speed_hz : spi->max_speed_hz; in spi_sirfsoc_setup_transfer()
534 regval = (sspi->ctrl_freq / (2 * hz)) - 1; in spi_sirfsoc_setup_transfer()
536 dev_err(&spi->dev, "Speed %d not supported\n", hz); in spi_sirfsoc_setup_transfer()
Dspi-oc-tiny.c65 static unsigned int tiny_spi_baud(struct spi_device *spi, unsigned int hz) in tiny_spi_baud() argument
69 return min(DIV_ROUND_UP(hw->freq, hz * 2), (1U << hw->baudwidth)) - 1; in tiny_spi_baud()
/drivers/pwm/
Dpwm-tegra.c71 unsigned long rate, hz; in tegra_pwm_config() local
90 hz = 1000000000ul / period_ns; in tegra_pwm_config()
92 rate = (rate + (hz / 2)) / hz; in tegra_pwm_config()
/drivers/iio/common/st_sensors/
Dst_sensors_core.c53 if (sensor->odr.odr_avl[i].hz == 0) in st_sensors_match_odr()
56 if (sensor->odr.odr_avl[i].hz == odr) { in st_sensors_match_odr()
57 odr_out->hz = sensor->odr.odr_avl[i].hz; in st_sensors_match_odr()
94 sdata->odr = odr_out.hz; in st_sensors_set_odr()
175 sdata->odr = odr_out.hz; in st_sensors_set_enable()
511 if (sdata->sensor->odr.odr_avl[i].hz == 0) in st_sensors_sysfs_sampling_frequency_avail()
515 sdata->sensor->odr.odr_avl[i].hz); in st_sensors_sysfs_sampling_frequency_avail()
/drivers/ssb/
Ddriver_mipscore.c284 unsigned long hz, ns; in ssb_mipscore_init() local
293 hz = ssb_clockspeed(bus); in ssb_mipscore_init()
294 if (!hz) in ssb_mipscore_init()
295 hz = 100000000; in ssb_mipscore_init()
296 ns = 1000000000 / hz; in ssb_mipscore_init()
/drivers/clocksource/
Dmmio.c53 unsigned long hz, int rating, unsigned bits, in clocksource_mmio_init() argument
72 return clocksource_register_hz(&cs->clksrc, hz); in clocksource_mmio_init()
/drivers/gpu/drm/via/
Dvia_verifier.c114 hazard_t hz; member
347 investigate_hazard(uint32_t cmd, hazard_t hz, drm_via_state_t *cur_seq) in investigate_hazard() argument
351 if (cur_seq->unfinished && (cur_seq->unfinished != seqs[hz])) { in investigate_hazard()
357 switch (hz) { in investigate_hazard()
629 hazard_t hz; in via_check_header2() local
696 if ((hz = hz_table[cmd >> 24])) { in via_check_header2()
697 if ((hz_mode = investigate_hazard(cmd, hz, hc_state))) { in via_check_header2()
1100 table[init_table[i].code] = init_table[i].hz; in setup_hazard_table()
/drivers/input/keyboard/
Dlm8323.c456 int div512, perstep, steps, hz, up, kill; in lm8323_pwm_work() local
481 hz = 32768 / 512; in lm8323_pwm_work()
484 hz = 32768 / 16; in lm8323_pwm_work()
487 perstep = (hz * pwm->fade_time) / (steps * 1000); in lm8323_pwm_work()
/drivers/tty/vt/
Dkeyboard.c228 unsigned int *hz = data; in kd_sound_helper() local
233 input_inject_event(handle, EV_SND, SND_TONE, *hz); in kd_sound_helper()
234 if (*hz) in kd_sound_helper()
238 input_inject_event(handle, EV_SND, SND_BELL, *hz ? 1 : 0); in kd_sound_helper()
253 void kd_mksound(unsigned int hz, unsigned int ticks) in kd_mksound() argument
257 input_handler_for_each_handle(&kbd_handler, &hz, kd_sound_helper); in kd_mksound()
259 if (hz && ticks) in kd_mksound()
/drivers/gpu/host1x/
Dintr.c307 u32 hz = clk_get_rate(host->clk); in host1x_intr_start() local
311 err = host1x_hw_intr_init_host_sync(host, DIV_ROUND_UP(hz, 1000000), in host1x_intr_start()
/drivers/video/fbdev/core/
Dfbmon.c707 int num_modes, hz, hscan, pixclock; in fb_get_monitor_limits() local
733 hz = (hscan + vtotal / 2) / vtotal; in fb_get_monitor_limits()
747 if (specs->vfmax == 0 || specs->vfmax < hz) in fb_get_monitor_limits()
748 specs->vfmax = hz; in fb_get_monitor_limits()
750 if (specs->vfmin == 0 || specs->vfmin > hz) in fb_get_monitor_limits()
751 specs->vfmin = hz; in fb_get_monitor_limits()
/drivers/mmc/core/
Dcore.h41 void mmc_set_clock(struct mmc_host *host, unsigned int hz);
Dcore.c1032 static void __mmc_set_clock(struct mmc_host *host, unsigned int hz) in __mmc_set_clock() argument
1034 WARN_ON(hz && hz < host->f_min); in __mmc_set_clock()
1036 if (hz > host->f_max) in __mmc_set_clock()
1037 hz = host->f_max; in __mmc_set_clock()
1039 host->ios.clock = hz; in __mmc_set_clock()
1043 void mmc_set_clock(struct mmc_host *host, unsigned int hz) in mmc_set_clock() argument
1046 __mmc_set_clock(host, hz); in mmc_set_clock()
/drivers/mmc/host/
Dcb710-mmc.c28 static void cb710_mmc_select_clock_divider(struct mmc_host *mmc, int hz) in cb710_mmc_select_clock_divider() argument
46 if (hz >= src_hz >> cb710_clock_divider_log2[divider_idx]) in cb710_mmc_select_clock_divider()
60 hz, src_freq_idx, divider_idx & 7, divider_idx & 8); in cb710_mmc_select_clock_divider()
/drivers/iio/imu/inv_mpu6050/
Dinv_mpu_core.c418 const int hz[] = {188, 98, 42, 20, 10, 5}; in inv_mpu6050_set_lpf() local
427 while ((h < hz[i]) && (i < ARRAY_SIZE(d) - 1)) in inv_mpu6050_set_lpf()

12