Re: [PATCH 04/10] regulator: of: switch to using class_find_device_by_fwnode()
Andrew Lunn <[email protected]> Mon, 23 Mar 2026 23:39:03 +0100
| Newsgroups | org.kernel.vger.linux-fpga,dev.linux.lists.driver-core,org.infradead.lists.linux-phy,org.kernel.vger.linux-kernel,org.kernel.vger.linux-leds,org.kernel.vger.linux-spi,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
> If there is a deprecated property you can do: > > error = device_property_read_u32(dev, "prop", &val); > if (error == -ENOENT) > error = device_property_read_u32(dev, "deprecated-prop", &val); It is not as simple as that. There are a lot of optional properties. Say "prop" is optional? And not present. So -ENOENT. We then look for this deprecated property. That should not happen. Using of_property_read_u32(np, "deprecated-prop", &val) actually makes it stand out, it is special somehow, which is good, because it is special. Andrew