On Tue, Jul 23, 2024 at 08:44:43AM -0700, Guenter Roeck wrote: > + if (data->type != max6581) { > + if (of_property_read_bool(node, "resistance-cancellation") && > + chip->valid_conf & MAX6697_CONF_RESISTANCE) { > + confreg |= MAX6697_CONF_RESISTANCE; > + factor = 1; > + } > + } else { > + if (of_property_read_u32(node, "resistance-cancellation", &vals[0])) { > + if (of_property_read_bool(node, "resistance-cancellation")) > + vals[0] = 0xfe; > + else > + vals[0] = 0; > + } > + > + factor = hweight8(vals[0] & 0xfe); It doesn't AND with 0xfe originally.