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.

Reply via email to