On Fri, Oct 30, 2026 at 11:39:35 +0100, Julien Stephan wrote:
[...]
> > 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;
>
> Hi Carlo,
>
> With this change, the pmic_name lookup at the top of the function can be
> dropped:
>
> pmic_name = ofnode_get_property(pmic_node, "compatible", NULL);
> if (!pmic_name) {
> log_err("%s: missing compatible property\n", __func__);
> return -EINVAL;
> }
>
> pmic_name is now only used to check that the compatible property exists,
> and ofnode_device_is_compatible() already handles that case: it returns
> false and we end up returning -ENOENT. The pmic_name declaration can be
> dropped as well.
uh, indeed, missed it.
> Also the "REVISIT" comment above the mediatek,mt6366 compatible entry in
> mtk_pmic_ids can be reworded: this patch fixes half of the issue (the
> limitation of ofnode_get_property())
yes, let me fix both in V2.
Thanks,
--
Carlo Caione