/drivers/clk/mxs/ |
H A D | clk-frac.c | 43 struct clk_frac *frac = to_clk_frac(hw); local 46 div = readl_relaxed(frac->reg) >> frac->shift; 47 div &= (1 << frac->width) - 1; 49 return (parent_rate >> frac->width) * div; 55 struct clk_frac *frac = to_clk_frac(hw); local 64 tmp <<= frac->width; 71 return (parent_rate >> frac->width) * div; 77 struct clk_frac *frac = to_clk_frac(hw); local 86 tmp <<= frac 114 struct clk_frac *frac; local [all...] |
H A D | clk-ref.c | 59 u8 frac = (readl_relaxed(ref->reg) >> (ref->idx * 8)) & 0x3f; local 62 do_div(tmp, frac); 72 u8 frac; local 76 frac = tmp; 78 if (frac < 18) 79 frac = 18; 80 else if (frac > 35) 81 frac = 35; 85 do_div(tmp, frac); 97 u8 frac, shif local [all...] |
/drivers/clk/spear/ |
H A D | clk-frac-synth.c | 12 #define pr_fmt(fmt) "clk-frac-synth: " fmt 47 struct clk_frac *frac = to_clk_frac(hw); local 48 struct frac_rate_tbl *rtbl = frac->rtbl; 61 struct clk_frac *frac = to_clk_frac(hw); local 65 frac->rtbl_cnt, &unused); 71 struct clk_frac *frac = to_clk_frac(hw); local 75 if (frac->lock) 76 spin_lock_irqsave(frac->lock, flags); 78 val = readl_relaxed(frac->reg); 80 if (frac 98 struct clk_frac *frac = to_clk_frac(hw); local 130 struct clk_frac *frac; local [all...] |
/drivers/media/tuners/ |
H A D | msi001.c | 94 unsigned int n, m, thresh, frac, vco_step, tmp, f_if1; local 210 frac = 1ul * thresh * m / (F_REF * R_REF); 213 tmp = gcd(thresh, frac); 215 frac /= tmp; 220 frac = DIV_ROUND_CLOSEST(frac, tmp); 224 tmp += 1ul * F_REF * R_REF * frac / thresh; 227 dev_dbg(&s->spi->dev, "rf=%u:%u n=%d thresh=%d frac=%d\n", 228 f_rf, tmp, n, thresh, frac); 257 reg |= frac << [all...] |
H A D | fc0011.c | 186 u32 fvco, xin, frac, xdiv, xdivr; local 224 frac = fvco - xdiv * 18000; 225 frac = (frac << 15) / 18000; 226 if (frac >= 16384) 227 frac += 32786; 228 if (!frac) 231 xin = clamp_t(u32, frac, 512, 65024);
|
/drivers/clk/qcom/ |
H A D | clk-rcg2.c | 320 const struct frac_entry *frac; local 328 frac = frac_table_810m; 330 frac = frac_table_675m; 332 for (; frac->num; frac++) { 334 request *= frac->den; 335 request = div_s64(request, frac->num); 345 f.m = frac->num; 346 f.n = frac->den; 366 const struct frac_entry *frac; local 481 const struct frac_entry *frac = frac_table_pixel; local 504 const struct frac_entry *frac = frac_table_pixel; local [all...] |
/drivers/gpu/drm/tegra/ |
H A D | sor.c | 329 u64 active_sym, active_count, frac, approx; local 336 frac = active_sym - active_count; 339 if (frac >= (f / 2)) { 341 frac = f - frac; 346 if (frac != 0) { 347 frac = div_u64(f * f, frac); /* 1/fraction */ 348 if (frac <= (15 * f)) { 349 active_frac = div_u64(frac, [all...] |
/drivers/scsi/ |
H A D | scsi_transport_spi.c | 100 int frac = value % denom; local 103 if (frac == 0) 109 sprintf(dest + result, "%d", frac / denom); 111 frac %= denom; 112 } while (frac);
|
/drivers/hwmon/ |
H A D | adt7462.c | 868 u8 frac = data->temp_frac[attr->index] >> TEMP_FRAC_OFFSET; local 874 250 * frac);
|
/drivers/media/platform/ |
H A D | sh_veu.c | 678 u32 *mant, u32 *frac, u32 *rep) 683 *rep = *mant = *frac = 0; 695 *frac = (fixpoint - (*mant * 4096)) & ~0x07; 697 switch (*frac) { 714 *frac = fixpoint - (*mant * 4096); 716 if (*frac & 0x07) { 721 *frac &= ~0x07; 723 *frac -= 8; /* round down if scaling up */ 725 *frac += 8; /* round up if scaling down */ 732 u32 mant, frac, valu local 676 sh_veu_calc_scale(struct sh_veu_dev *veu, int size_in, int size_out, int crop_out, u32 *mant, u32 *frac, u32 *rep) argument 754 u32 mant, frac, value, rep; local [all...] |
/drivers/staging/lustre/lustre/obdclass/ |
H A D | lprocfs_status.c | 1865 __u64 whole, frac = 0, units; local 1893 frac = simple_strtoull(pbuf, &end, 10); 1916 frac *= mult; 1917 do_div(frac, frac_d); 1918 *val = whole * mult + frac;
|
/drivers/media/dvb-frontends/drx39xyj/ |
H A D | drxj.c | 1214 u32 frac = 0; local 1217 frac = (N * 1000000) / D 1219 frac = (N * (1000000 >> 4)) / (D >> 4) 1223 frac = (((u32) N) * (1000000 >> 4)) / D; 1224 frac <<= 4; 1227 frac += remainder / D; 1230 frac++; 1232 return frac; 6507 /* no need for mult or frac functions */ 6598 /* no need for mult or frac function [all...] |