On 22/09/2020 12:08, Mark Brown wrote:
On 18/09/2020 07:04, Srinivasa Rao Mandadapu wrote:
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-lpaif");
Index is always preferred over name w.r.t device tree bindings, so lets
stick with that for now!
It is? That's not usually the case...
Unless you have any strong reason to lookup resource by name?
Looking things up by name tends to make the DT easier to read (since
things are named).
I agree with you on this and I see the point, but Rob had a very
different opinion about the reg-names bindings to start with.
This topic been discussed in the past with Rob in many instances ex:
https://lore.kernel.org/linux-devicetree/CAL_Jsq+MMunmVWqeW9v2RyzsMKP+=kMzeTHNMG4JDHM7Fy0HBg@xxxxxxxxxxxxxx/
According to him, reg-names seems to be highly discouraged as it came
along for the OMAP folks and was related to the hwmods stuff.
--srini