Re: [PATCH v2 2/6] hwmon: (max6697) Drop platform data support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux