Thread (16 messages) 16 messages, 5 authors, 2026-01-14

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

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-01-12 13:45:59
Also in: imx, linux-amlogic, linux-arm-msm, linux-devicetree, linux-mips, linux-renesas-soc, linux-riscv, linux-sunxi, lkml

On Mon, Jan 12, 2026 at 11:15:41AM +0100, Bartosz Golaszewski wrote:
From: Bartosz Golaszewski <brgl@kernel.org>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help