On 8/10/21 2:49 PM, Andy Shevchenko wrote:
The data is encoded a sign-magnitude. sign_extend() works for two's complement numbers.+ data->tol = data->cfg->kohms * (val & GENMASK(6, 0)) * 10 / 8; + if (!(val & BIT(7))) + data->tol *= -1;Shouldn't you simple use corresponding sign_extend*()?