[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACD3sJZ3B93-bb9e=cmyd3awS2JteE1xRsf_-zokttg=Ykef9g@mail.gmail.com>
Date: Thu, 21 Nov 2024 17:21:30 +0800
From: Tyrone Ting <warp5tw@...il.com>
To: Andi Shyti <andi.shyti@...nel.org>
Cc: avifishman70@...il.com, tmaimon77@...il.com, tali.perry1@...il.com,
venture@...gle.com, yuenn@...gle.com, benjaminfair@...gle.com,
andriy.shevchenko@...ux.intel.com, wsa@...nel.org, rand.sec96@...il.com,
wsa+renesas@...g-engineering.com, tali.perry@...oton.com,
Avi.Fishman@...oton.com, tomer.maimon@...oton.com, KWLIU@...oton.com,
JJLIU0@...oton.com, kfting@...oton.com, openbmc@...ts.ozlabs.org,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/4] i2c: npcm: Modify the client address assignment
Hi Andi:
Thank you for your reply.
Andi Shyti <andi.shyti@...nel.org> 於 2024年11月20日 週三 上午6:22寫道:
>
> Hi Tyrone,
>
> Sorry for the late reply!
>
> ...
>
> > > > @@ -2172,7 +2191,6 @@ static int npcm_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
> > > > }
> > > >
> > > > npcm_i2c_init_params(bus);
> > > > - bus->dest_addr = slave_addr;
> > >
> > > We can now get rid of slave_addr. It's just used in
> > > npcm_i2c_master_start_xmit(). Right?
> >
> > Yes, slave_addr is just used as the link
> > https://github.com/torvalds/linux/blob/master/drivers/i2c/busses/i2c-npcm7xx.c#L2182
> > suggests with this patch.
>
> What I mean is that slave_addr now is completely unused. We
> declare it, we initialize it to msg0->addr and it stays like
> this.
>
> What I'm suggesting is to remove it completely.
>
Sorry that I might not describe it clearly in previous discussion
thread. slave_addr is passed to npcm_i2c_master_start_xmit() as
https://github.com/torvalds/linux/blob/master/drivers/i2c/busses/i2c-npcm7xx.c#L2182
suggests. If slave_addr is removed, may I use "(bus->dest_addr &=
~I2C_M_RD)" to replace the slave_addr parameter to
npcm_i2c_master_start_xmit()?
> Andi
Thank you.
Regards,
Tyrone
Powered by blists - more mailing lists