Searched refs:cdiv (Results 1 - 3 of 3) sorted by relevance
/linux-4.1.27/drivers/spi/ |
H A D | spi-bcm2835.c | 237 unsigned long spi_hz, clk_hz, cdiv; bcm2835_spi_transfer_one() local 246 cdiv = 2; /* clk_hz/2 is the fastest we can go */ bcm2835_spi_transfer_one() 249 cdiv = DIV_ROUND_UP(clk_hz, spi_hz); bcm2835_spi_transfer_one() 250 cdiv += (cdiv % 2); bcm2835_spi_transfer_one() 252 if (cdiv >= 65536) bcm2835_spi_transfer_one() 253 cdiv = 0; /* 0 is the slowest we can go */ bcm2835_spi_transfer_one() 255 cdiv = 0; /* 0 is the slowest we can go */ bcm2835_spi_transfer_one() 257 spi_used_hz = cdiv ? (clk_hz / cdiv) : (clk_hz / 65536); bcm2835_spi_transfer_one() 258 bcm2835_wr(bs, BCM2835_SPI_CLK, cdiv); bcm2835_spi_transfer_one()
|
/linux-4.1.27/drivers/pwm/ |
H A D | pwm-mxs.c | 38 static const unsigned int cdiv[PERIOD_CDIV_MAX] = { variable 61 c = rate / cdiv[div]; mxs_pwm_config()
|
/linux-4.1.27/drivers/i2c/busses/ |
H A D | i2c-at91.c | 150 * twi_clk = F_MAIN / (2 * (cdiv * (1 << ckdiv) + offset)) 154 int ckdiv, cdiv, div; at91_calc_twi_clock() local 162 cdiv = div >> ckdiv; at91_calc_twi_clock() 168 cdiv = 255; at91_calc_twi_clock() 171 dev->twi_cwgr_reg = (ckdiv << 16) | (cdiv << 8) | cdiv; at91_calc_twi_clock() 172 dev_dbg(dev->dev, "cdiv %d ckdiv %d\n", cdiv, ckdiv); at91_calc_twi_clock()
|
Completed in 124 milliseconds