[PATCH v6 4/8] iio: adc: at91_adc: convert to device_property_*() APIs

Andy Shevchenko andriy.shevchenko at intel.com
Thu Dec 3 09:57:04 PST 2026


On Thu, Dec 03, 2026 at 07:30:08PM +0200, Abdelnasser Hussein wrote:
> Read the atmel,adc-* properties through device_property_*() in
> at91_adc_probe() and at91_adc_probe_ts(), dropping the local
> device_node.
> 
> Use a local struct device pointer and a propname variable, return the
> actual property-read error with the property name in the message, and
> replace the atmel,adc-use-res string comparison with
> device_property_match_string().

> With the of_* helpers gone, drop <linux/of.h> (<linux/platform_device.h>
> already provides struct of_device_id).

Again the commit message lacks of answer to "why?".

...

>  	st->res = st->caps->high_res_bits;
>  	if (st->caps->low_res_bits &&
> -	    !of_property_read_string(node, "atmel,adc-use-res", &s)
> -	    && !strcmp(s, "lowres"))
> +	    device_property_match_string(dev, "atmel,adc-use-res", "lowres") >= 0)
>  		st->res = st->caps->low_res_bits;


As previous patch this change can be split.

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list