Home
last modified time | relevance | path

Searched refs:flt32_val (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/hid/amd-sfh-hid/sfh1_1/
H A Damd_sfh_desc.c135 static int float_to_int(u32 flt32_val) in float_to_int() argument
139 mantissa = flt32_val & GENMASK(22, 0); in float_to_int()
140 sign = (flt32_val & BIT(31)) ? -1 : 1; in float_to_int()
141 exp = (flt32_val & ~BIT(31)) >> 23; in float_to_int()
165 flt32_val = BIT(exp) + (mantissa << shift); in float_to_int()
168 flt32_val = BIT(exp) + (mantissa >> shift); in float_to_int()
173 return (((fraction * 100) >> shift) >= 50) ? sign * (flt32_val + 1) : sign * flt32_val; in float_to_int()