linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: Brendan Higgins <brendanhiggins@google.com>
Cc: linux-input@vger.kernel.org,
	devicetree <devicetree@vger.kernel.org>,
	linux-aspeed <linux-aspeed@lists.ozlabs.org>,
	linux-i2c@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	wsa@kernel.org, rentao.bupt@gmail.com,
	Ryan Chen <ryan_chen@aspeedtech.com>
Subject: Re: [PATCH v3 3/5] i2c: aspeed: Mask IRQ status to relevant bits
Date: Thu, 10 Sep 2020 08:55:38 -0500	[thread overview]
Message-ID: <b092f884-9aa9-5d0b-1a90-36af558e43a8@linux.ibm.com> (raw)
In-Reply-To: <CAFd5g46ghV7ArmM8LnMkGa-Nip_fT934+3cPOkVxS-b5odZXYw@mail.gmail.com>


On 9/10/20 4:00 AM, Brendan Higgins wrote:
> On Wed, Sep 9, 2020 at 1:31 PM Eddie James <eajames@linux.ibm.com> wrote:
>> Mask the IRQ status to only the bits that the driver checks. This
>> prevents excessive driver warnings when operating in slave mode
>> when additional bits are set that the driver doesn't handle.
>>
>> Signed-off-by: Eddie James <eajames@linux.ibm.com>
>> Reviewed-by: Tao Ren <rentao.bupt@gmail.com>
> Sorry, looks like I didn't get my comment in in time.
>
> Looks good in principle. One minor comment below:
>
>> ---
>>   drivers/i2c/busses/i2c-aspeed.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
>> index 31268074c422..724bf30600d6 100644
>> --- a/drivers/i2c/busses/i2c-aspeed.c
>> +++ b/drivers/i2c/busses/i2c-aspeed.c
>> @@ -69,6 +69,7 @@
>>    * These share bit definitions, so use the same values for the enable &
>>    * status bits.
>>    */
>> +#define ASPEED_I2CD_INTR_RECV_MASK                     0xf000ffff
> Could we define ASPEED_I2CD_INTR_RECV_MASK to be ASPEED_I2CD_INTR_ALL ?


That was my original thought... there is another define for that already 
a few lines down though.


Thanks,

Eddie


>
>>   #define ASPEED_I2CD_INTR_SDA_DL_TIMEOUT                        BIT(14)
>>   #define ASPEED_I2CD_INTR_BUS_RECOVER_DONE              BIT(13)
>>   #define ASPEED_I2CD_INTR_SLAVE_MATCH                   BIT(7)
>> @@ -604,6 +605,7 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
>>          writel(irq_received & ~ASPEED_I2CD_INTR_RX_DONE,
>>                 bus->base + ASPEED_I2C_INTR_STS_REG);
>>          readl(bus->base + ASPEED_I2C_INTR_STS_REG);
>> +       irq_received &= ASPEED_I2CD_INTR_RECV_MASK;
>>          irq_remaining = irq_received;
>>
>>   #if IS_ENABLED(CONFIG_I2C_SLAVE)
>> --
>> 2.26.2
>>

  reply	other threads:[~2020-09-10 20:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 20:30 [PATCH v3 0/5] input: misc: Add IBM Operation Panel driver Eddie James
2020-09-09 20:30 ` [PATCH v3 1/5] dt-bindings: input: Add documentation for IBM Operation Panel Eddie James
2020-09-09 20:30 ` [PATCH v3 2/5] input: misc: Add IBM Operation Panel driver Eddie James
2020-09-10  6:13   ` Wolfram Sang
2020-09-13 17:17   ` Dmitry Torokhov
2020-09-09 20:30 ` [PATCH v3 3/5] i2c: aspeed: Mask IRQ status to relevant bits Eddie James
2020-09-10  6:18   ` Wolfram Sang
2020-09-10  6:20     ` Wolfram Sang
2020-09-10  9:00   ` Brendan Higgins
2020-09-10 13:55     ` Eddie James [this message]
2020-09-09 20:30 ` [PATCH v3 4/5] ARM: dts: Aspeed: Tacoma: Add IBM Operation Panel I2C device Eddie James
2020-09-10  2:41   ` Joel Stanley
2020-09-09 20:30 ` [PATCH v3 5/5] ARM: dts: Aspeed: Rainier: " Eddie James
2020-09-10  2:42   ` Joel Stanley

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=b092f884-9aa9-5d0b-1a90-36af558e43a8@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=andrew@aj.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=brendanhiggins@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=joel@jms.id.au \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rentao.bupt@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=ryan_chen@aspeedtech.com \
    --cc=wsa@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).