Searched defs:div (Results 26 - 50 of 135) sorted by relevance

123456

/drivers/media/dvb/frontends/
H A Dzl10036.c187 u32 div, foffset; local
189 div = (frequency + _FR/2) / _FR;
190 state->frequency = div * _FR;
194 buf[0] = (div >> 8) & 0x7f;
195 buf[1] = (div >> 0) & 0xff;
197 deb_info("%s: ftodo=%u fpriv=%u ferr=%d div=%u\n", __func__,
198 frequency, state->frequency, foffset, div);
400 { 0x04, 0x00 }, /* 2/3: div=0x400 - arbitrary value */
H A Dzl10039.c186 u32 div; local
195 div = (c->frequency * 1000) / 126387;
201 buf[0] = (div >> 8) & 0x7f;
202 buf[1] = (div >> 0) & 0xff;
H A Ddvb-pll.c542 u32 div; local
560 div = (frequency + desc->iffreq +
562 buf[0] = div >> 8;
563 buf[1] = div & 0xff;
571 printk("pll: %s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n",
572 desc->name, div, buf[0], buf[1], buf[2], buf[3]);
575 return (div * desc->entries[i].stepsize) - desc->iffreq;
H A Dtda10071.c645 u8 mode, rolloff, pilot, inversion, div; local
739 div = 14;
741 div = 4;
743 ret = tda10071_wr_reg(priv, 0x81, div);
747 ret = tda10071_wr_reg(priv, 0xe3, div);
/drivers/media/dvb/ttpci/
H A Dbudget-patch.c271 u32 div = (p->frequency + 479500) / 125; local
285 buf[0] = (div >> 8) & 0x7f;
286 buf[1] = div & 0xff;
287 buf[2] = ((div & 0x18000) >> 10) | 0x95;
310 u32 div; local
314 div = p->frequency / 125;
315 data[0] = (div >> 8) & 0x7f;
316 data[1] = div & 0xff;
H A Dav7110_v4l.c163 u32 div; local
171 div = freq + 614;
173 buf[0] = (div >> 8) & 0x7f;
174 buf[1] = div & 0xff;
193 u32 div; local
196 div = (freq + 38900000 + 31250) / 62500;
198 data[0] = (div >> 8) & 0x7f;
199 data[1] = div & 0xff;
H A Dbudget.c210 u32 div = (c->frequency + 479500) / 125; local
224 buf[0] = (div >> 8) & 0x7f;
225 buf[1] = div & 0xff;
226 buf[2] = ((div & 0x18000) >> 10) | 0x95;
249 u32 div; local
253 div = (c->frequency + 35937500 + 31250) / 62500;
255 data[0] = (div >> 8) & 0x7f;
256 data[1] = div & 0xff;
257 data[2] = 0x85 | ((div >> 10) & 0x60);
278 u32 div; local
335 u32 div; local
359 u32 div; local
[all...]
/drivers/misc/
H A Datmel_pwm.c193 * @div: from 1..255, the linear divisor to use
196 * clock will run with a period of (2^prescale * div) / MCK, or twice as
200 int pwm_clk_alloc(unsigned prescale, unsigned div) argument
204 u32 val = (prescale << 8) | div;
207 if (prescale >= 10 || div == 0 || div > 255)
/drivers/net/wireless/iwlegacy/
H A D4965-debug.c648 struct stats_div *div, *accum_div, *delta_div, *max_div; local
665 div = &il->_4965.stats.general.common.div;
668 accum_div = &il->_4965.accum_stats.general.common.div;
673 delta_div = &il->_4965.delta_stats.general.common.div;
674 max_div = &il->_4965.max_delta.general.common.div;
717 le32_to_cpu(div->tx_on_a), accum_div->tx_on_a,
721 le32_to_cpu(div->tx_on_b), accum_div->tx_on_b,
725 le32_to_cpu(div->exec_time), accum_div->exec_time,
729 le32_to_cpu(div
[all...]
/drivers/ssb/
H A Ddriver_chipcommon.c453 u32 baud_base, div; local
465 div = 1;
470 div = 48;
482 div = 1;
502 div = chipco_read32(cc, SSB_CHIPCO_CLKDIV)
507 div = 48;
516 baud_base /= div;
/drivers/i2c/busses/
H A Di2c-imx.c250 unsigned int div; local
255 div = (i2c_clk_rate + rate - 1) / rate;
256 if (div < i2c_clk_div[0][0])
258 else if (div > i2c_clk_div[ARRAY_SIZE(i2c_clk_div) - 1][0])
261 for (i = 0; i2c_clk_div[i][0] < div; i++);
278 __func__, i2c_clk_rate, div);
/drivers/media/common/tuners/
H A Dtea5761.c128 unsigned int div, frq; local
130 div = ((buffer[2] & 0x3f) << 8) | buffer[3];
132 frq = 1000 * (div * 32768 / 1000 + FREQ_OFFSET + 225) / 4; /* Freq in KHz */
135 frq / 1000, frq % 1000, div);
146 unsigned div; local
166 div = (1000 * (frq * 4 / 16 + 700 + 225) ) >> 15;
167 buffer[1] = (div >> 8) & 0x3f;
168 buffer[2] = div & 0xff;
/drivers/mmc/host/
H A Dsdhci-s3c.c145 int div; local
161 for (div = 1; div < 256; div *= 2) {
162 if ((rate / div) <= wanted)
167 src, rate, wanted, rate / div);
169 return (wanted - (rate / div));
/drivers/net/ethernet/ti/
H A Ddavinci_mdio.c98 u32 mdio_in, div, mdio_out_khz, access_time; local
101 div = (mdio_in / data->pdata.bus_freq) - 1;
102 if (div > CONTROL_MAX_DIV)
103 div = CONTROL_MAX_DIV;
106 __raw_writel(div | CONTROL_ENABLE, &data->regs->control);
114 mdio_out_khz = mdio_in / (1000 * (div + 1));
/drivers/net/wireless/ath/ath5k/
H A Dmac80211-ops.c657 unsigned int div = common->clockrate * 1000; local
665 ah->survey.channel_time += cc->cycles / div;
666 ah->survey.channel_time_busy += cc->rx_busy / div;
667 ah->survey.channel_time_rx += cc->rx_frame / div;
668 ah->survey.channel_time_tx += cc->tx_frame / div;
/drivers/spi/
H A Dspi-au1550.c120 u32 div, brg; local
122 for (div = 0; div < 4; div++) {
123 brg = mainclk_hz / speed_hz / (4 << div);
127 break; /* set lowest brg (div is == 0) */
130 break; /* we have valid brg and div */
132 if (div == 4) {
133 div = 3; /* speed_hz too small */
134 brg = (63 + 1); /* set highest brg and div */
[all...]
H A Dspi-s3c24xx.c131 unsigned int div; local
163 div = DIV_ROUND_UP(clk, hz * 2) - 1;
165 if (div > 255)
166 div = 255;
169 div, hz, clk / (2 * (div + 1)));
172 cs->sppre = div;
/drivers/staging/rts5139/
H A Drts51x_card.c394 u8 mcu_cnt, div, max_div, ssc_depth; local
414 div = CLK_DIV_1;
415 while ((N < min_N) && (div < max_div)) {
417 div++;
419 RTS51X_DEBUGP("N = %d, div = %d\n", N, div);
472 if (div == CLK_DIV_2) {
479 } else if (div == CLK_DIV_4) {
498 (div << 4) | mcu_cnt);
528 u8 sel, div, mcu_cn local
[all...]
/drivers/video/
H A Dnuc900fb.c68 * calculate divider for lcd div
74 unsigned long long div; local
77 /* div = (clk * pixclk)/10^12 */
78 div = (unsigned long long)clk * pixclk;
79 div >>= 12;
80 do_div(div, 625 * 625UL * 625);
82 dev_dbg(fbi->dev, "pixclk %ld, divisor is %lld\n", pixclk, div);
84 return div;
H A Dsh_mipi_dsi.c136 u32 tmp, top, bottom, delay, div; local
344 div = 1; /* HSbyteCLK is calculation base
348 div = 2;
352 top = ((pdata->lane * top / div) - 10) << 16;
356 bottom = (pdata->lane * bottom / div) - 12;
360 if ((pdata->lane / div) > bpp) {
/drivers/gpu/drm/nouveau/
H A Dnv50_pm.c392 calc_div(u32 src, u32 target, int *div) argument
395 for (*div = 0; *div <= 7; (*div)++) {
397 clk1 = clk0 << (*div ? 1 : 0);
405 (*div)--;
/drivers/hwmon/
H A Dadm9240.c82 static inline int SCALE(long val, int mul, int div) argument
85 return (val * mul - div / 2) / div;
87 return (val * mul + div / 2) / div;
110 static inline unsigned int FAN_FROM_REG(u8 reg, u8 div) argument
118 return SCALE(1350000, 1, reg * div);
342 /* write new fan div, callers must hold data->update_lock */
H A Dgl518sm.c94 static inline u8 FAN_TO_REG(long rpm, int div) argument
99 rpmdiv = SENSORS_LIMIT(rpm, 1, 960000) * div;
102 #define FAN_FROM_REG(val, div) ((val) == 0 ? 0 : (480000 / ((val) * (div))))
H A Dlm80.c78 static inline unsigned char FAN_TO_REG(unsigned rpm, unsigned div) argument
83 return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
86 #define FAN_FROM_REG(val, div) ((val) == 0 ? -1 : \
87 (val) == 255 ? 0 : 1350000/((div) * (val)))
H A Dmax6650.c405 unsigned long div; local
408 err = kstrtoul(buf, 10, &div);
413 switch (div) {

Completed in 489 milliseconds

123456