Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2685277pxa; Mon, 24 Aug 2020 23:40:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY8Eqxd6bjeHrV1eFnS9Oo6o9SQBOOjISkDVFy2LxsA44+lq5QSMBVZAhJQexRtWxlILyE X-Received: by 2002:a50:f701:: with SMTP id g1mr9234316edn.54.1598337624835; Mon, 24 Aug 2020 23:40:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598337624; cv=none; d=google.com; s=arc-20160816; b=vi/NLsG/IFT9jlq7CcDiFqaXqErUCyPO2rh0k+dVZWMcAYlmKLNh18C8gLypFR6d+Q h6j3b1eu/ClvYetF6di0BQUItCcV0B7gnEpY7Dxfcyj8lWjy6Kfrs3q+wlE+c+k96TCP x6IWUg0F0l5cp3oohstrVVSTRwX+sn9Ygayx2atQvK4rE23dO86MKcLVeQaltSQYs0P6 XFF0fJg9zRpVYuQrd4sj69c/xolhFj2ha6mhIJvQTOHKWkD9GyviBSDS7tvAdWhKCH1z vfUjYoCLtxxNCdQDiZk/uV76GQ583ky9hJk8k/+S/SrvrDGi7Ae9NtxRrcW64Xnh8Yi5 ruog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1Q9k3xF6hWPOQM3uFwSy2qlWDQ5BGn+QdqRbPCM8EhM=; b=NsecA5YPSyfNG9qYx2SAZlYLD+9n0pDldBYJSJYXQ7hqtfXk0vafcsF6nO+47Y7B0a zm3BuzBCWPUOQ5Jiwov++4cfcRb0A1mhCXbCX0E1QAMdEyZCZe/t4EhW9/Gt2q85iqw8 /DK4P49dDIr004kl2wyLaOHdgaH9eiSOzYlyCJd7j8SS532EOliK7t7aNiXZer2R7xH8 U75lGDRdsOaBUeyR1SYImxZ2DAgEyddJ73rPVPyWJ2My88zrgwr6iDFh+11AfxV3BgIx LsJNs8fJZ7QqFPSrWD+UbVvRG8+o59QJw8tk/NgxVqwBMHeKHH2WUSbzDq3pwdZ3v9R3 ZCNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=d318I0JD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si8549432ejd.365.2020.08.24.23.40.01; Mon, 24 Aug 2020 23:40:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=d318I0JD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729120AbgHYGiZ (ORCPT + 99 others); Tue, 25 Aug 2020 02:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729068AbgHYGiY (ORCPT ); Tue, 25 Aug 2020 02:38:24 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A11D4C061574; Mon, 24 Aug 2020 23:38:24 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id o18so15023714eje.7; Mon, 24 Aug 2020 23:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1Q9k3xF6hWPOQM3uFwSy2qlWDQ5BGn+QdqRbPCM8EhM=; b=d318I0JDAY3KO2OfweXvemxDvpcgVxD/poXqH0o44y89iIIdQ2tKqg8axqlHdT8Acl ZwraWTH8Be+wNIdnhcriuFkqqu+TMMH0QJZ/TUNOpruZNRxE9CT0VlMX/CzWe+IZ+AKh 1i6LQwYPsKVqW8t3f2z5GeVPSUXLalcko0o7M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1Q9k3xF6hWPOQM3uFwSy2qlWDQ5BGn+QdqRbPCM8EhM=; b=AuRsY8/wXh5c6AUTfKei83ZPPLzod9pc+bVP4uAjLRjKsa9+A2UYrbbWStFClXP2nB Rnat2K6phw+OBLcRqDObIKQ9eE/tLRSmitQJyIN2WHOT+9CTzr7CNNp55rMsegDv7c/M FUKrh5x34dkUWmf/PPhJ7xgsCE8YjyYczkSWwPIEcog+qQoQrCGLWZvktTzaq26pgtSY tk4QzY9ghDtUJ2NzuE6KxNBy39Xx9Q/aEPL8ixXeSyLc3ZHmjL9oSbbOfosd0WeIav80 a0YLBsRKze74hckUkkUYAP88RbIwJ1U1PXKUAGLe0VnoW00A0tsCEUr3bZJnT9Op6Pjr Ls4g== X-Gm-Message-State: AOAM533W/91YS/kuRs22kAMSivCsyTmUBV4YCNTze+xnwjDuby7ydhHR rfiXYe3kxDM6PsyDo4jV36RnxHtpUrtMpTjMC6KFnVVk4Ro= X-Received: by 2002:a17:906:4ec3:: with SMTP id i3mr8802552ejv.215.1598337503276; Mon, 24 Aug 2020 23:38:23 -0700 (PDT) MIME-Version: 1.0 References: <20200820161152.22751-1-eajames@linux.ibm.com> <20200820161152.22751-4-eajames@linux.ibm.com> In-Reply-To: <20200820161152.22751-4-eajames@linux.ibm.com> From: Joel Stanley Date: Tue, 25 Aug 2020 06:38:10 +0000 Message-ID: Subject: Re: [PATCH 3/5] i2c: aspeed: Mask IRQ status to relevant bits To: Eddie James Cc: linux-input@vger.kernel.org, devicetree , Linux Kernel Mailing List , linux-aspeed , linux-i2c@vger.kernel.org, Andrew Jeffery , Benjamin Herrenschmidt , Brendan Higgins , dmitry.torokhov@gmail.com, Rob Herring Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Aug 2020 at 16:12, Eddie James 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 > --- > drivers/i2c/busses/i2c-aspeed.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c > index 31268074c422..abf40f2af8b4 100644 > --- a/drivers/i2c/busses/i2c-aspeed.c > +++ b/drivers/i2c/busses/i2c-aspeed.c > @@ -604,6 +604,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 &= 0xf000ffff; > irq_remaining = irq_received; This would defeat the check for irq_remaining. I don't think we want to do this. Can you explain why these bits are being set in slave mode?