From patchwork Tue Feb 11 21:41:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 11376969 X-Patchwork-Delegate: paulburton@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B33A492A for ; Tue, 11 Feb 2020 21:47:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 918F7206D7 for ; Tue, 11 Feb 2020 21:47:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=goldelico.com header.i=@goldelico.com header.b="mj7pE4eR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727414AbgBKVrk (ORCPT ); Tue, 11 Feb 2020 16:47:40 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.80]:17771 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726968AbgBKVrk (ORCPT ); Tue, 11 Feb 2020 16:47:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1581457657; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=TdyjL7fnovA7v90cI49fyycJRI+MxjJc1+DrsqTzedE=; b=mj7pE4eRgu4yIPuJIiPmlhNEsQBZUm4e7FvNbFVYeBqpLPM0ZrnNiv6ErqV3jQtTVr nJfPw2yVH8KfWuFlsJVfujEt0dOZ8PxuONXlWBfKF/Xej31yBADofdA4C4uOFhq7Snfb VlMjNQByGkyGkaJjeMOH4dngjEtza7Oz8KaC1Hs4DI0WtfyqMhu5kMlfm6kEpK3f69WJ IZWAtvj7rAf4YuVdPqep2/hvJ2mYI1dCfvklPLoqBQS0lXxvg0jw99rcrTrkRyBobA+J FMwFIgOq0vmgHKmqZ3o+l7KgFAgaYGk8dQMtTHzRfykIInLCqd/FbjWiwe32XoogJps1 imWw== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1OAA2UNf2M0P2mp10IM" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 46.1.12 DYNA|AUTH) with ESMTPSA id U06217w1BLfX0EH (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 11 Feb 2020 22:41:33 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Paul Boddie , Alex Smith , Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , David Airlie , Daniel Vetter , "David S. Miller" , Linus Walleij , "H. Nikolaus Schaller" , Andi Kleen , Krzysztof Kozlowski , Geert Uytterhoeven , Miquel Raynal , =?utf-8?q?Petr_=C5=A0tetiar?= , Richard Fontana , Allison Randal , Stephen Boyd Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-i2c@vger.kernel.org, netdev@vger.kernel.org, linux-gpio@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com Subject: [PATCH 01/14] i2c: jz4780: suppress txabrt reports for i2cdetect Date: Tue, 11 Feb 2020 22:41:18 +0100 Message-Id: <7facef52af9cff6ebe26ff321a7fd4f1ac640f74.1581457290.git.hns@goldelico.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org This suppresses "simple" error reasons ABRT_7B_ADDR_NOACK ABRT_10ADDR1_NOACK ABRT_10ADDR2_NOACK from flooding the console log when running i2cdetect on addresses without a responding slave. Additionally, reading the JZ4780_I2C_TAR in this situation seems to harm the controller state. Signed-off-by: H. Nikolaus Schaller --- drivers/i2c/busses/i2c-jz4780.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c index 16a67a64284a..55b7518435f1 100644 --- a/drivers/i2c/busses/i2c-jz4780.c +++ b/drivers/i2c/busses/i2c-jz4780.c @@ -578,6 +578,9 @@ static void jz4780_i2c_txabrt(struct jz4780_i2c *i2c, int src) { int i; + if (!(src & ~7)) + return; + dev_err(&i2c->adap.dev, "txabrt: 0x%08x\n", src); dev_err(&i2c->adap.dev, "device addr=%x\n", jz4780_i2c_readw(i2c, JZ4780_I2C_TAR));