Hi,

On 5/17/22 14:53, Marek Vasut wrote:
On 5/17/22 14:39, Patrick DELAUNAY wrote:

Hi,

[...]

+static int board_get_regulator_buck3_nvm_uv_av96(int *uv)
+{
+    const void *fdt = gd->fdt_blob;
+    struct udevice *dev;
+    u8 bucks_vout = 0;
+    const char *prop;
+    int len, ret;
+
+    /* Check whether this is Avenger96 board. */
+    prop = fdt_getprop(fdt, 0, "compatible", &len);


This API is not compatible with CONFIG_OF_LIVE

consider replacement with ofnode_read_prop or with of_machine_is_compatible, for example

if (!of_machine_is_compatible(prop, "arrow,stm32mp15xx-avenger96"))
     return -EINVAL;

I explicitly don't want to use of_machine_is_compatible, I need to search for the avenger96 substring in the machine compatible, since the stm32mp15xx can be anything (15{1,3,7}{a,d}) and it might not even have the arrow prefix.


Ok, I check on existing DT and I found only on compatible with "avenger96" string.

arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts:15:

    compatible = "arrow,stm32mp15xx-avenger96", "st,stm32mp15x";

But you can forget my proposal with of_machine_is_compatible, consider:

   prop = ofnode_read_prop(ofnode_root(), "compatible", &len);


But it is just minor remark.


Do you expect this patch for next pull-request for v2022.07 or for next ?


Patrick



Reply via email to