/linux-master/mm/ |
H A D | vmpressure.c | 123 unsigned long scale = scanned + reclaimed; local 140 pressure = scale - (reclaimed * scale / scanned); 141 pressure = pressure * 100 / scale;
|
/linux-master/drivers/iio/pressure/ |
H A D | mprls0025pa.h | 63 * @scale: pressure scale 64 * @scale2: pressure scale, decimal number 83 int scale; member in struct:mpr_data
|
H A D | mprls0025pa.c | 45 * 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 D | lv0104cs.c | 42 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 D | ch7006_drv.c | 235 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 D | ch7006_mode.c | 106 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 D | fp_arith.c | 641 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 D | hx711.c | 24 /* 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 D | scmi_iio.c | 156 * 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 D | mn88472.c | 84 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 D | af9033.c | 286 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 D | rtl2830.c | 121 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 D | cxd2820r_t2.c | 319 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 D | cxd2820r_t.c | 294 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 D | tda10071.c | 408 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 D | mcp4728.c | 300 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 D | of.c | 727 * @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 D | stat-shadow.c | 182 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 D | pmu.c | 78 /** @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 D | vecemu.c | 157 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 D | clock.c | 377 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 D | iio-rescale.c | 80 * 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 D | iio_generic_buffer.c | 95 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 D | ds2760_battery.c | 257 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 D | usb4.c | 2147 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...] |