[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2enq7ixb5m6nn2hlufsgeh6cqt24l5rmbtceflbtwaep64osxy@ej63czorl2tn>
Date: Thu, 20 Mar 2025 10:01:30 +0100
From: Andi Shyti <andi.shyti@...nel.org>
To: Aryan Srivastava <Aryan.Srivastava@...iedtelesis.co.nz>
Cc: "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
"Markus.Elfring@....de" <Markus.Elfring@....de>, "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "rric@...nel.org" <rric@...nel.org>
Subject: Re: [PATCH v13 3/3] i2c: octeon: add block-mode i2c operations
Hi Aryan,
On Thu, Mar 20, 2025 at 01:36:12AM +0000, Aryan Srivastava wrote:
> On Wed, 2025-03-19 at 23:19 +0100, Andi Shyti wrote:
> > > +static int octeon_i2c_hlc_block_comp_read(struct octeon_i2c *i2c,
> > > struct i2c_msg *msgs)
> > > +{
> > > + int ret;
> > > + u16 len;
> > > + u64 cmd;
> > > +
> > > + octeon_i2c_hlc_enable(i2c);
> > > + octeon_i2c_block_enable(i2c);
> > > +
> > > + /* Write (size - 1) into block control register */
> > > + len = msgs[1].len - 1;
> > > + octeon_i2c_writeq_flush((u64)len, i2c->twsi_base +
> > > OCTEON_REG_BLOCK_CTL(i2c));
> > > +
> > > + /* Prepare core command */
> > > + cmd = SW_TWSI_V | SW_TWSI_R | SW_TWSI_SOVR |
> > > SW_TWSI_OP_7_IA;
> > > + cmd |= (u64)(msgs[0].addr & 0x7full) << SW_TWSI_ADDR_SHIFT;
> > > +
> > > + /* Send core command */
> > > + ret = octeon_i2c_hlc_read_cmd(i2c, msgs[0], cmd);
> > > + if (ret)
> > > + return ret;
> >
> > Do we need to disable the block mode?
> >
> Do you mean, do we need to disable the block mode at all? i.e. have it
> on all the time? Otherwise, it gets disabled at the bottom of this
> func.
yes, but you return earlier, right?
Thanks,
Andi
...
> > > + octeon_i2c_block_disable(i2c);
> > > + return ret;
> > > +}
...
Powered by blists - more mailing lists