Re: [PATCH v2 3/4] i2c: riic: Pass register offsets and chip details as OF data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 15, 2024 at 11:31 AM Prabhakar <prabhakar.csengg@xxxxxxxxx> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
>
> With an increasing number of SoCs reusing this driver, each with slight
> variations in the RIIC IP, it becomes necessary to support passing these
> details as OF data. This approach simplifies the extension of the driver
> for other SoCs.
>
> This patch lays the groundwork for adding support for the Renesas RZ/V2H
> SoC.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> ---
> v1->v2
> - Dropped family from struct riic_of_data
> - Included RIIC_REG_END in enum list as flexible array member
>   in a struct with no named members is not allowed

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

> --- a/drivers/i2c/busses/i2c-riic.c
> +++ b/drivers/i2c/busses/i2c-riic.c
> @@ -453,6 +461,8 @@ static int riic_i2c_probe(struct platform_device *pdev)
>                 }
>         }
>
> +       riic->info = of_device_get_match_data(&pdev->dev);

This is fine, as all in-tree users use DT (Linux does not support
sh7752/sh7753, which seem to use the same RIIC variant as RZ/V2H).

> +
>         adap = &riic->adapter;
>         i2c_set_adapdata(adap, riic);
>         strscpy(adap->name, "Renesas RIIC adapter", sizeof(adap->name));

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux