All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Brandt <Chris.Brandt@renesas.com>,
	 Andi Shyti <andi.shyti@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Magnus Damm <magnus.damm@gmail.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	 "linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	 "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	 "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	 Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	 Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH 4/5] i2c: riic: Pass register offsets and chip details as OF data
Date: Fri, 8 Mar 2024 20:59:35 +0000	[thread overview]
Message-ID: <CA+V-a8uVCwww7MGVYe_0194SDJ5wsxjwRCAwLLQq+KF7nMVTiA@mail.gmail.com> (raw)
In-Reply-To: <OSAPR01MB158788EB1E8959BA8455E5FD86272@OSAPR01MB1587.jpnprd01.prod.outlook.com>

>On Fri, Mar 8, 2024 at 6:15 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
>
>
> > Subject: Re: [PATCH 4/5] i2c: riic: Pass register offsets and chip details as OF data
> >
> > Hi Biju,
> >
> > On Fri, Mar 8, 2024 at 5:36 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > >
> > > Hi Prabhakar,
> > >
> > > Thanks for the patch.
> > >
> > > > -----Original Message-----
> > > > From: Prabhakar <prabhakar.csengg@gmail.com>
> > > > Sent: Friday, March 8, 2024 5:27 PM
> > > > Subject: [PATCH 4/5] i2c: riic: Pass register offsets and chip
> > > > details as OF data
> > > >
> > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > >
> > > > 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@bp.renesas.com>
> > > > Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> > > > ---
> > > >  drivers/i2c/busses/i2c-riic.c | 59
> > > > ++++++++++++++++++++++++++---------
> > > >  1 file changed, 44 insertions(+), 15 deletions(-)
> > > >
> > > > diff --git a/drivers/i2c/busses/i2c-riic.c
> > > > b/drivers/i2c/busses/i2c-riic.c index
> > > > 49a12f1ecdf9..3398d639b754 100644
> > > > --- a/drivers/i2c/busses/i2c-riic.c
> > > > +++ b/drivers/i2c/busses/i2c-riic.c
> > > > @@ -46,18 +46,6 @@
> > > >  #include <linux/pm_runtime.h>
> > > >  #include <linux/reset.h>
> > > >
> > > > -#define RIIC_ICCR1   0x00
> > > > -#define RIIC_ICCR2   0x04
> > > > -#define RIIC_ICMR1   0x08
> > > > -#define RIIC_ICMR3   0x10
> > > > -#define RIIC_ICSER   0x18
> > > > -#define RIIC_ICIER   0x1c
> > > > -#define RIIC_ICSR2   0x24
> > > > -#define RIIC_ICBRL   0x34
> > > > -#define RIIC_ICBRH   0x38
> > > > -#define RIIC_ICDRT   0x3c
> > > > -#define RIIC_ICDRR   0x40
> > > > -
> > > >  #define ICCR1_ICE    0x80
> > > >  #define ICCR1_IICRST 0x40
> > > >  #define ICCR1_SOWP   0x10
> > > > @@ -87,6 +75,13 @@
> > > >
> > > >  #define RIIC_INIT_MSG        -1
> > > >
> > > > +#define RIIC_RZ_A_TYPE       0
> > >
> > > > +
> > > > +struct riic_of_data {
> > > > +     u8 family;
> > >
> > > Do you need family as compatible have this information?
> > >
> > Yes this is added to future proof it, as the RZ/V2H SoC has some bit differences in the slave address
> > register as compared to RZ/A and RZ/G2L. Comparing the family outside probe is not always preferred
> > hence this is added as part of OF data.
>
> Ok. Got it.
> But the family variable is unused and is wasting memory.
> Simple reg layout is enough for device data??
>
Ok, I'll drop it for the current implementation.

Cheers,
Prabhakar

  reply	other threads:[~2024-03-08 21:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 17:27 [PATCH 0/5] Add RIIC support for Renesas RZ/V2H SoC Prabhakar
2024-03-08 17:27 ` [PATCH 1/5] dt-bindings: i2c: renesas,riic: Update comment for fallback string Prabhakar
2024-03-09 11:58   ` Krzysztof Kozlowski
2024-03-09 23:05     ` Lad, Prabhakar
2024-03-19 21:19       ` Andi Shyti
2024-03-20  9:40         ` Krzysztof Kozlowski
2024-03-14 14:33   ` Geert Uytterhoeven
2024-03-08 17:27 ` [PATCH 2/5] dt-bindings: i2c: renesas,riic: Document R9A09G057 support Prabhakar
2024-03-09 12:00   ` Krzysztof Kozlowski
2024-03-09 23:28     ` Lad, Prabhakar
2024-03-10  8:10       ` Krzysztof Kozlowski
2024-03-11  9:00         ` Geert Uytterhoeven
2024-03-12 11:04           ` Krzysztof Kozlowski
2024-03-12 14:06             ` Geert Uytterhoeven
2024-03-12 15:05               ` Krzysztof Kozlowski
2024-03-10  8:05   ` Biju Das
2024-03-08 17:27 ` [PATCH 3/5] i2c: riic: Introduce helper functions for I2C read/write operations Prabhakar
2024-03-08 19:47   ` Geert Uytterhoeven
2024-03-08 21:00     ` Lad, Prabhakar
2024-03-08 17:27 ` [PATCH 4/5] i2c: riic: Pass register offsets and chip details as OF data Prabhakar
2024-03-08 17:36   ` Biju Das
2024-03-08 18:03     ` Lad, Prabhakar
2024-03-08 18:15       ` Biju Das
2024-03-08 20:59         ` Lad, Prabhakar [this message]
2024-03-08 17:27 ` [PATCH 5/5] i2c: riic: Add support for R9A09G057 SoC Prabhakar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+V-a8uVCwww7MGVYe_0194SDJ5wsxjwRCAwLLQq+KF7nMVTiA@mail.gmail.com \
    --to=prabhakar.csengg@gmail.com \
    --cc=Chris.Brandt@renesas.com \
    --cc=andi.shyti@kernel.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.