Searched refs:scale (Results 51 - 75 of 327) sorted by relevance

1234567891011>>

/linux-master/mm/
H A Dvmpressure.c123 unsigned long scale = scanned + reclaimed; local
140 pressure = scale - (reclaimed * scale / scanned);
141 pressure = pressure * 100 / scale;
/linux-master/drivers/iio/pressure/
H A Dmprls0025pa.h63 * @scale: pressure scale
64 * @scale2: pressure scale, decimal number
83 int scale; member in struct:mpr_data
H A Dmprls0025pa.c45 * pressure = (press_cnt - outputmin) * scale + pmin
55 * * scale - (pmax - pmin) / (outputmax - outputmin)
58 * pressure = (raw + offset) * scale
62 * * offset - (-1 * outputmin) - pmin / scale
311 *val = data->scale;
333 s64 scale, offset; local
409 scale = div_s64(((s64)(data->pmax - data->pmin)) * NANO,
411 data->scale = div_s64_rem(scale, NANO, &data->scale2);
413 * multiply with NANO before dividing by scale an
[all...]
/linux-master/drivers/iio/light/
H A Dlv0104cs.c42 u8 scale; member in struct:lv0104cs_private
167 regval |= lv0104cs_scales[lv0104cs->scale].regval;
200 switch (lv0104cs->scale) {
253 *val = lv0104cs_scales[lv0104cs->scale].val;
254 *val2 = lv0104cs_scales[lv0104cs->scale].val2;
339 lv0104cs->scale = i;
495 lv0104cs->scale = LV0104CS_SCALE_1X;
/linux-master/drivers/gpu/drm/i2c/
H A Dch7006_drv.c235 if (~mode->valid_scales & 1<<priv->scale ||
257 priv->scale_property = drm_property_create_range(dev, 0, "scale", 0, 2);
278 priv->scale);
353 priv->scale = val;
457 priv->scale = 1;
480 priv->scale = ch7006_scale;
482 ch7006_err(client, "Invalid scale setting \"%d\".\n",
538 module_param_named(scale, ch7006_scale, int, 0600);
539 MODULE_PARM_DESC(scale, "Default scale
[all...]
H A Dch7006_mode.c106 subc, scale, scale_mask, norm_mask, e_hd, e_vd) { \
128 .dispmode = bitfs(CH7006_DISPMODE_SCALING_RATIO, scale) | \
135 subc, scale, scale_mask, norm_mask) \
136 __MODE(f, hd, vd, ht, vt, hsynp, vsynp, subc, scale, \
335 uint64_t scale, aspect; local
345 scale = norm->vtotal*fixed1;
346 do_div(scale, mode->vtotal);
351 hpos = round_fixed((norm->hvirtual * aspect - mode->hdisplay * scale)
357 vpos = max(0, norm->vdisplay - round_fixed(mode->vdisplay*scale)
/linux-master/arch/m68k/math-emu/
H A Dfp_arith.c641 int scale, oldround; local
668 scale = fp_conv_ext2long(src);
672 scale += dest->exp;
674 if (scale >= 0x7fff) {
676 } else if (scale <= 0) {
678 fp_denormalize(dest, -scale);
680 dest->exp = scale;
/linux-master/drivers/iio/adc/
H A Dhx711.c24 /* gain to pulse and scale conversion */
31 int scale; member in struct:hx711_gain_to_scale
36 * .scale depends on AVDD which in turn is known as soon as the regulator
38 * therefore we set .scale in hx711_probe()
65 return hx711_gain_to_scale[i].scale;
69 static int hx711_get_scale_to_gain(int scale) argument
74 if (hx711_gain_to_scale[i].scale == scale)
314 * a scale greater than 1 mV per LSB is not possible
397 hx711_gain_to_scale[i].scale);
[all...]
/linux-master/drivers/iio/common/scmi_sensors/
H A Dscmi_iio.c156 * discouraged in the kernel driver code, to calculate the scale factor (sf)
337 s8 scale; local
342 scale = sensor->sensor_info->axis[ch->scan_index].scale;
343 if (scale < 0) {
345 *val2 = int_pow(10, abs(scale));
348 *val = int_pow(10, scale);
380 s8 exponent, scale; local
392 scale = sensor->sensor_info->axis[0].scale;
[all...]
/linux-master/drivers/media/dvb-frontends/
H A Dmn88472.c84 c->strength.stat[0].scale = FE_SCALE_RELATIVE;
87 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
110 c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
145 c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
168 c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
170 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
184 c->block_error.stat[0].scale = FE_SCALE_COUNTER;
186 c->block_count.stat[0].scale = FE_SCALE_COUNTER;
189 c->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
190 c->block_count.stat[0].scale
[all...]
H A Daf9033.c286 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
288 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
290 c->block_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
292 c->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
294 c->post_bit_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
296 c->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
672 c->strength.stat[0].scale = FE_SCALE_DECIBEL;
676 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
765 c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
768 c->cnr.stat[0].scale
[all...]
H A Drtl2830.c121 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
123 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
125 c->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
127 c->post_bit_count.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
423 c->strength.stat[0].scale = FE_SCALE_RELATIVE;
426 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
465 c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
468 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
483 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
485 c->post_bit_count.stat[0].scale
[all...]
H A Dcxd2820r_t2.c319 c->strength.stat[0].scale = FE_SCALE_RELATIVE;
323 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
345 c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
349 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
371 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
375 c->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
H A Dcxd2820r_t.c294 c->strength.stat[0].scale = FE_SCALE_RELATIVE;
298 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
318 c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
322 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
359 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
363 c->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
H A Dtda10071.c408 c->strength.stat[0].scale = FE_SCALE_DECIBEL;
411 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
421 c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
424 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
478 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
481 c->block_error.stat[0].scale = FE_SCALE_COUNTER;
486 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
488 c->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
491 c->post_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
492 c->block_error.stat[0].scale
[all...]
/linux-master/drivers/iio/dac/
H A Dmcp4728.c300 static void mcp4728_get_scale_avail(enum mcp4728_scale scale, argument
304 *val = data->scales_avail[scale * 2];
305 *val2 = data->scales_avail[scale * 2 + 1];
341 int scale = mcp4728_find_matching_scale(data, val, val2); local
343 if (scale < 0)
344 return scale;
346 switch (scale) {
404 static void mcp4728_init_scale_avail(enum mcp4728_scale scale, int vref_mv, argument
414 data->scales_avail[scale * 2] = value_int;
415 data->scales_avail[scale *
[all...]
/linux-master/drivers/pci/
H A Dof.c727 * @slot_power_limit_scale: pointer where the scale should be stored in PCIe
732 * scale in format used by PCIe Slot Capabilities Register.
741 u8 value, scale; local
750 scale = 0;
753 scale = 3;
756 scale = 2;
760 scale = 1;
764 scale = 0;
768 scale = 0;
772 scale
[all...]
/linux-master/tools/perf/util/
H A Dstat-shadow.c182 return aggr->counts.val * cur->scale;
353 nsecs / (wall_time * evsel->scale));
374 double scale; local
379 scale = 1e-9;
383 scale = 1e-6;
387 scale = 1e-6;
399 val = avg_stats(stats) * scale;
476 double ratio, scale, threshold; local
508 &unit, &scale) >= 0) {
509 ratio *= scale;
[all...]
H A Dpmu.c78 /** @scale: Value to scale read counter values by. */
79 double scale; member in struct:perf_pmu_alias
99 /** @info_loaded: Have the scale, unit and other values been read from disk? */
262 int perf_pmu__convert_scale(const char *scale, char **end, double *sval) argument
285 * scale string is converted correctly.
290 *sval = strtod(scale, end);
304 char scale[128]; local
311 scnprintf(path + len, sizeof(path) - len, "%s/events/%s.scale", pmu->name, alias->name);
320 sret = read(fd, scale, sizeo
[all...]
/linux-master/arch/powerpc/kernel/
H A Dvecemu.c157 static int ctsxs(unsigned int x, int scale, unsigned int *vscrp) argument
165 exp = exp - 127 + scale;
170 if (x + (scale << 23) != 0xcf000000)
179 static unsigned int ctuxs(unsigned int x, int scale, unsigned int *vscrp) argument
188 exp = exp - 127 + scale;
/linux-master/arch/mips/alchemy/common/
H A Dclock.c377 int scale, int maxdiv, unsigned long *rv)
385 if (scale == 2) { /* only div-by-multiple-of-2 possible */
390 div2 = (div1 / scale) - 1; /* value to write to register */
397 div1 = ((div2 + 1) * scale);
403 int scale, int maxdiv)
437 tdv = alchemy_calc_div(req->rate, pr, scale, maxdiv, NULL);
458 for (j = (maxdiv == 4) ? 1 : scale; j <= maxdiv; j += scale) {
464 tdv = alchemy_calc_div(req->rate, pr, scale, maxdiv,
665 /* fg0-2 and fg4-6 share a "scale"
376 alchemy_calc_div(unsigned long rate, unsigned long prate, int scale, int maxdiv, unsigned long *rv) argument
401 alchemy_clk_fgcs_detr(struct clk_hw *hw, struct clk_rate_request *req, int scale, int maxdiv) argument
713 int scale, maxdiv; local
930 int scale = c->dt[2] == 3 ? 1 : 2; /* au1300 check */ local
[all...]
/linux-master/drivers/iio/afe/
H A Diio-rescale.c80 * For IIO_VAL_INT_PLUS_{MICRO,NANO} scale types if either *val
81 * OR *val2 is negative the schan scale is negative, i.e.
95 * If only one of the rescaler elements or the schan scale is
96 * negative, the combined scale is negative.
113 int scale, int scale2, int schan_off,
121 *val = div_s64(tmp, scale) + schan_off;
124 *val = div_s64(rescale->offset, scale) + schan_off;
128 *val = div_s64(tmp, scale) + schan_off;
132 tmp2 = ((s64)scale * 1000000000LL) + scale2;
137 tmp2 = ((s64)scale * 100000
112 rescale_process_offset(struct rescale *rescale, int scale_type, int scale, int scale2, int schan_off, int *val, int *val2) argument
151 int scale, scale2; local
[all...]
/linux-master/tools/iio/
H A Diio_generic_buffer.c95 printf("%05f ", ((float)val + info->offset) * info->scale);
97 printf("%05f ", ((float)input + info->offset) * info->scale);
118 printf("%05f ", ((float)val + info->offset) * info->scale);
120 printf("%05f ", ((float)input + info->offset) * info->scale);
141 printf("%05f ", ((float)val + info->offset) * info->scale);
143 printf("%05f ", ((float)input + info->offset) * info->scale);
165 if (info->scale == 1.0f && info->offset == 0.0f)
169 ((float)val + info->offset) * info->scale);
171 printf("%05f ", ((float)input + info->offset) * info->scale);
/linux-master/drivers/power/supply/
H A Dds2760_battery.c257 int ret, i, start, count, scale[5]; local
328 scale[0] = di->full_active_uAh;
330 scale[i] = scale[i - 1] + di->raw[DS2760_ACTIVE_FULL + 1 + i];
332 di->full_active_uAh = battery_interpolate(scale, di->temp_C / 10);
336 scale[4] = di->raw[DS2760_ACTIVE_EMPTY + 4];
338 scale[i] = scale[i + 1] + di->raw[DS2760_ACTIVE_EMPTY + i];
340 di->empty_uAh = battery_interpolate(scale, di->temp_C / 10);
/linux-master/drivers/thunderbolt/
H A Dusb4.c2147 static unsigned int usb3_bw_to_mbps(u32 bw, u8 scale) argument
2151 uframes = bw * 512UL << scale;
2155 static u32 mbps_to_usb3_bw(unsigned int mbps, u8 scale) argument
2161 return DIV_ROUND_UP(uframes, 512UL << scale);
2168 u32 val, bw, scale; local
2176 ret = tb_port_read(port, &scale, TB_CFG_PORT,
2181 scale &= ADP_USB3_CS_3_SCALE_MASK;
2184 *upstream_bw = usb3_bw_to_mbps(bw, scale);
2187 *downstream_bw = usb3_bw_to_mbps(bw, scale);
2222 u32 val, bw, scale; local
2250 u32 val, ubw, dbw, scale; local
[all...]

Completed in 246 milliseconds

1234567891011>>