[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191001163910.GA2307@8c859006a84e.ant.amazon.com>
Date: Tue, 1 Oct 2019 11:39:10 -0500
From: Patrick Williams <alpawi@...zon.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC: Patrick Williams <patrick@...cx.xyz>,
Wolfram Sang <wsa@...-dreams.de>,
Jean Delvare <jdelvare@...e.de>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
Max Staudt <max@...as.org>,
Juergen Fitschen <jfi@...-embedded.de>,
Elie Morisse <syniurge@...il.com>,
Ajay Gupta <ajayg@...dia.com>, Stefan Roese <sr@...x.de>,
Florian Fainelli <f.fainelli@...il.com>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Baolin Wang <baolin.wang@...aro.org>,
"Paul Cercueil" <paul@...pouillou.net>,
Enrico Weigelt <info@...ux.net>,
"Allison Randal" <allison@...utok.net>,
<linux-i2c@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] i2c: pxa: migrate to new i2c_slave APIs
Thanks for the review Andy.
On Tue, Oct 01, 2019 at 07:29:13PM +0300, Andy Shevchenko wrote:
>
>
> On Tue, Oct 01, 2019 at 10:59:59AM -0500, Patrick Williams wrote:
> There are quite a few people in the Cc list. I'm not sure they all are
> interested in this. I deliberately dropped few names, sorry, if I was mistaken.
Agree it was kind of a big list. Just chose what was given to me by
get_maintainer.pl. It seems like there isn't a direct identified
maintainer of this file.
>
> > + if (isr & ISR_RWM) {
> > + u8 byte = 0;
> > +
> > + i2c_slave_event(i2c->slave, I2C_SLAVE_READ_REQUESTED,
> > + &byte);
> > + writel(byte, _IDBR(i2c));
> > + } else {
> > + i2c_slave_event(i2c->slave, I2C_SLAVE_WRITE_REQUESTED,
> > + NULL);
> > + }
>
> Hmm... Perhaps
>
> u8 byte = 0;
>
> i2c_slave_event(i2c->slave, I2C_SLAVE_READ_REQUESTED, &byte);
> if (isr & ISR_RWM)
> writel(byte, _IDBR(i2c));
>
The two different paths also require READ_REQUEST vs WRITE_REQUESTED. I
could do a ternary there but it seemed more obvious to just unroll the
logic.
--
- Patrick
Powered by blists - more mailing lists