Re: [PATCH v2 3/6] i2c: nomadik: switch from of_device_is_compatible() to of_match_device()

From: Linus Walleij
Date: Wed Oct 09 2024 - 07:23:59 EST


On Wed, Oct 9, 2024 at 12:23 PM Théo Lebrun <theo.lebrun@xxxxxxxxxxx> wrote:

> Compatible-specific behavior is implemented using a if-condition on the
> return value from of_device_is_compatible(), from probe. It does not
> scale well when compatible number increases. Switch to using a match
> table and a call to of_match_device().
>
> We DO NOT attach a .of_match_table field to our amba driver, as we do
> not use the table to match our driver to devices.
>
> Sort probe variable declarations in reverse christmas tree to try and
> introduce some logic into the ordering.
>
> Signed-off-by: Théo Lebrun <theo.lebrun@xxxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij