Re: [PATCH RESEND net-next v6 2/7] net: stmmac: qcom-ethqos: use generic device properties

Andrew Lunn <[email protected]>
Newsgroups dev.linux.lists.sophgo,dev.linux.lists.imx,dev.linux.lists.linux-sunxi,org.infradead.lists.linux-amlogic,org.infradead.lists.linux-riscv,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-mips,org.kernel.vger.linux-renesas-soc,org.kernel.vger.netdev
Message-ID <[email protected]>
On Mon, Jan 12, 2026 at 11:15:41AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <[email protected]>
> 
> In order to drop the dependency on CONFIG_OF, convert all device property
> getters from OF-specific to generic device properties and stop pulling
> in any linux/of.h symbols.

Is the intention to read these properties from ACPI tables?

If so, it would be nice to document these properties in
Documentation/firmware-guide/acpi/dsd.

> -	if (of_property_read_bool(np, "snps,tso"))
> +	if (device_property_present(dev, "snps,tso"))
>  		plat_dat->flags |= STMMAC_FLAG_TSO_EN;

Do you actually need this in the ACPI binding? Is there a reason not
to just hard code it enabled? You don't need to worry about backwards
compatibility here, because this is the first ACPI device.

> -	if (of_device_is_compatible(np, "qcom,qcs404-ethqos"))
> +	if (device_is_compatible(dev, "qcom,qcs404-ethqos"))
>  		plat_dat->flags |= STMMAC_FLAG_RX_CLK_RUNS_IN_LPI;

What is your target hardware? Will qcom,qcs404-ethqos every use ACPI?

Maybe this should actually stay as of_device_is_compatible, to make it
clear this is an device tree only device? There is no need to mess up
the ACPI binding with things which will never actually use ACPI.

   Andrew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.