The MT6365 device tree lists mediatek,mt6359 as a fallback, but slave selection compares only the first compatible string. Consequently the wrapper reports that no PMIC slave was found even though its existing MT6359 support matches the node.
Use ofnode_device_is_compatible() to consider the full compatible list, as the regulator-binding path already does. This allows the Genio 510 and 700 USB supplies to be resolved without changing the device tree's PMIC identity. Signed-off-by: Carlo Caione <[email protected]> --- drivers/power/pmic/mtk-pwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/pmic/mtk-pwrap.c b/drivers/power/pmic/mtk-pwrap.c index 468af1fba04..2e206207136 100644 --- a/drivers/power/pmic/mtk-pwrap.c +++ b/drivers/power/pmic/mtk-pwrap.c @@ -692,7 +692,7 @@ static int mtk_pwrap_find_slave(const struct pwrap_slv_type **slave, ofnode pmic } while (of_match->compatible) { - if (!strcmp(of_match->compatible, pmic_name)) { + if (ofnode_device_is_compatible(pmic_node, of_match->compatible)) { *slave = (struct pwrap_slv_type *)of_match->data; return 0; } -- 2.56.0
