/drivers/gpu/drm/amd/display/dc/calcs/ |
D | custom_float.c | 33 uint32_t *mantissa, in build_custom_float() argument 49 *mantissa = 0; in build_custom_float() 78 *mantissa = 0; in build_custom_float() 117 *mantissa = dc_fixpt_floor(mantiss); in build_custom_float() 125 uint32_t mantissa, in setup_custom_float() argument 144 if (mantissa & ~mantissa_mask) { in setup_custom_float() 146 mantissa = mantissa_mask; in setup_custom_float() 159 if (mantissa & mask) in setup_custom_float() 187 uint32_t mantissa; in convert_to_custom_float_format() local 192 value, format, &negative, &mantissa, &exponenta) && in convert_to_custom_float_format() [all …]
|
/drivers/iio/light/ |
D | max44009.c | 174 int mantissa; in max44009_lux_raw() local 181 mantissa = ((hi & 0xf) << 4) | (lo & 0xf); in max44009_lux_raw() 191 return exponent * mantissa; in max44009_lux_raw() 301 int mantissa, exp; in max44009_threshold_byte_from_fraction() local 309 mantissa = integral * MAX44009_SCALE_DENOMINATOR; in max44009_threshold_byte_from_fraction() 310 mantissa /= MAX44009_SCALE_NUMERATOR; in max44009_threshold_byte_from_fraction() 313 mantissa += fractional / MAX44009_FRACT_MULT * in max44009_threshold_byte_from_fraction() 316 for (exp = 0; mantissa > 0xff; exp++) in max44009_threshold_byte_from_fraction() 317 mantissa >>= 1; in max44009_threshold_byte_from_fraction() 319 mantissa >>= 4; in max44009_threshold_byte_from_fraction() [all …]
|
D | opt3001.c | 170 u16 mantissa, int *val, int *val2) in opt3001_to_iio_ret() argument 174 lux = 10 * (mantissa << exponent); in opt3001_to_iio_ret() 226 u16 mantissa; in opt3001_get_lux() local 339 mantissa = OPT3001_REG_MANTISSA(opt->result); in opt3001_get_lux() 341 opt3001_to_iio_ret(opt, exponent, mantissa, val, val2); in opt3001_get_lux() 478 u16 mantissa; in opt3001_write_event_value() local 495 mantissa = (((val * 1000) + (val2 / 1000)) / 10) >> exponent; in opt3001_write_event_value() 496 value = (exponent << 12) | mantissa; in opt3001_write_event_value() 501 opt->high_thresh_mantissa = mantissa; in opt3001_write_event_value() 506 opt->low_thresh_mantissa = mantissa; in opt3001_write_event_value()
|
/drivers/hwmon/pmbus/ |
D | zl6100.c | 56 s32 mantissa; in zl6100_l2d() local 60 mantissa = ((s16)((l & 0x7ff) << 5)) >> 5; in zl6100_l2d() 62 val = mantissa; in zl6100_l2d() 80 s16 exponent = 0, mantissa; in zl6100_d2l() local 104 mantissa = DIV_ROUND_CLOSEST(val, 1000); in zl6100_d2l() 107 if (mantissa > 0x3ff) in zl6100_d2l() 108 mantissa = 0x3ff; in zl6100_d2l() 112 mantissa = -mantissa; in zl6100_d2l() 115 return (mantissa & 0x7ff) | ((exponent << 11) & 0xf800); in zl6100_d2l()
|
D | pmbus_core.c | 616 s32 mantissa; in pmbus_reg2data_linear() local 621 mantissa = (u16) sensor->data; in pmbus_reg2data_linear() 624 mantissa = ((s16)((sensor->data & 0x7ff) << 5)) >> 5; in pmbus_reg2data_linear() 627 val = mantissa; in pmbus_reg2data_linear() 744 s16 exponent = 0, mantissa; in pmbus_data2reg_linear() local 796 mantissa = DIV_ROUND_CLOSEST(val, 1000); in pmbus_data2reg_linear() 799 if (mantissa > 0x3ff) in pmbus_data2reg_linear() 800 mantissa = 0x3ff; in pmbus_data2reg_linear() 804 mantissa = -mantissa; in pmbus_data2reg_linear() 807 return (mantissa & 0x7ff) | ((exponent << 11) & 0xf800); in pmbus_data2reg_linear()
|
/drivers/usb/serial/ |
D | pl2303.c | 463 unsigned int baseline, mantissa, exponent; in pl2303_encode_baud_rate_divisor() local 473 mantissa = baseline / baud; in pl2303_encode_baud_rate_divisor() 474 if (mantissa == 0) in pl2303_encode_baud_rate_divisor() 475 mantissa = 1; /* Avoid dividing by zero if baud > 32*12M. */ in pl2303_encode_baud_rate_divisor() 477 while (mantissa >= 512) { in pl2303_encode_baud_rate_divisor() 479 mantissa >>= 2; /* divide by 4 */ in pl2303_encode_baud_rate_divisor() 483 mantissa = 511; in pl2303_encode_baud_rate_divisor() 490 buf[1] = exponent << 1 | mantissa >> 8; in pl2303_encode_baud_rate_divisor() 491 buf[0] = mantissa & 0xff; in pl2303_encode_baud_rate_divisor() 494 baud = (baseline / mantissa) >> (exponent << 1); in pl2303_encode_baud_rate_divisor()
|
/drivers/net/wireless/mediatek/mt76/mt76x0/ |
D | phy.c | 667 u32 mantissa = val << 4; in mt76x0_phy_lin2db() local 671 while (mantissa < BIT(15)) { in mt76x0_phy_lin2db() 672 mantissa <<= 1; in mt76x0_phy_lin2db() 676 while (mantissa > 0xffff) { in mt76x0_phy_lin2db() 677 mantissa >>= 1; in mt76x0_phy_lin2db() 683 if (mantissa <= 47104) in mt76x0_phy_lin2db() 684 data = mantissa + (mantissa >> 3) + (mantissa >> 4) - 38400; in mt76x0_phy_lin2db() 686 data = mantissa - (mantissa >> 3) - (mantissa >> 6) - 23040; in mt76x0_phy_lin2db()
|
/drivers/iio/chemical/ |
D | sps30.c | 163 int mantissa = val & GENMASK(22, 0); in sps30_float_to_int_clamped() local 169 if (!exp && !mantissa) in sps30_float_to_int_clamped() 175 return ((((1 << 23) + mantissa) * 100) >> 23) >> (-exp); in sps30_float_to_int_clamped() 180 val = (1 << exp) + (mantissa >> shift); in sps30_float_to_int_clamped() 184 fraction = mantissa & GENMASK(shift - 1, 0); in sps30_float_to_int_clamped()
|
/drivers/isdn/mISDN/ |
D | dsp_audio.c | 124 int sign, exponent, mantissa; in linear2ulaw() local 135 mantissa = (sample >> (exponent + 3)) & 0x0F; in linear2ulaw() 136 ulawbyte = ~(sign | (exponent << 4) | mantissa); in linear2ulaw()
|
/drivers/md/bcache/ |
D | util.h | 578 unsigned int mantissa = 1 << fract_bits; /* Implicit bit */ in fract_exp_two() local 580 mantissa += x & (mantissa - 1); in fract_exp_two() 583 return mantissa << x >> fract_bits; in fract_exp_two()
|
D | bset.c | 245 unsigned int mantissa:BKEY_MANTISSA_BITS; member 633 f->mantissa = bfloat_mantissa(m, f) - 1; in make_bfloat() 979 if (f->mantissa >= bfloat_mantissa(search, f)) in bset_search_tree()
|
/drivers/iio/proximity/ |
D | isl29501.c | 444 int mantissa; in isl29501_write_ext() local 450 mantissa = corr >> max_exp; in isl29501_write_ext() 452 ret = isl29501_write_coeff(isl29501, i, mantissa); in isl29501_write_ext()
|
/drivers/gpu/drm/amd/display/dc/inc/hw/ |
D | opp.h | 136 uint32_t mantissa; member
|
/drivers/isdn/hardware/mISDN/ |
D | hfcmulti.c | 1828 u_int mantissa; in hfcmulti_dtmf() local 1867 mantissa = w_float & 0x0fff; in hfcmulti_dtmf() 1869 mantissa |= 0xfffff000; in hfcmulti_dtmf() 1872 mantissa ^= 0x1000; in hfcmulti_dtmf() 1873 mantissa <<= (exponent - 1); in hfcmulti_dtmf() 1877 coeff[co << 1] = mantissa; in hfcmulti_dtmf() 1886 mantissa = w_float & 0x0fff; in hfcmulti_dtmf() 1888 mantissa |= 0xfffff000; in hfcmulti_dtmf() 1891 mantissa ^= 0x1000; in hfcmulti_dtmf() 1892 mantissa <<= (exponent - 1); in hfcmulti_dtmf() [all …]
|
/drivers/pcmcia/ |
D | cistpl.c | 33 static const u_char mantissa[] = { variable 44 (mantissa[(((v)>>3)&15)-1] * exponent[(v)&7] / 10) 47 (mantissa[((v)>>3)&15] * exponent[(v)&7] / 10)
|
/drivers/tty/serial/ |
D | stm32-usart.c | 689 u32 usartdiv, mantissa, fraction, oversampling; in stm32_set_termios() local 789 mantissa = (usartdiv / oversampling) << USART_BRR_DIV_M_SHIFT; in stm32_set_termios() 791 writel_relaxed(mantissa | fraction, port->membase + ofs->brr); in stm32_set_termios()
|
/drivers/atm/ |
D | iphase.c | 342 u32 exp, mantissa, cps; 346 mantissa = rate & M_MASK; 349 cps = (1 << M_BITS) | mantissa;
|
/drivers/staging/media/ipu3/ |
D | ipu3-css-params.c | 51 int mantissa = (1 << exponent) * output_width; in imgu_css_scaler_setup_lut() local 78 coeff *= mantissa; in imgu_css_scaler_setup_lut()
|