From patchwork Tue Jun 14 10:13:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 12880886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F5FBC43334 for ; Tue, 14 Jun 2022 10:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sUFUTOtWcY/1y40ys/Ez1gREzf89QVKNxbH2kaZQ7GM=; b=g4EbbMosuHE6h0 pjrCo7ZOq+3rdOxhqgoM14vKtPeQ5UbtHV5QWAidyY6GDwQn52NvFfuCpG2dgiFaNmQfp+ybcE/U9 I1ZWUnWkRVqcEfKuP9fg5p8eQJ49n3yy80Dw7J41DsLhpllRXHeYHySCXMtZPgGQuP6ZXGhgv+7Dh /PiBUP3OaQXSf7MP17z/2bs8t5DhDCmVxzIt5LPyiVhi30hrT8ddFipDYny+T1wbc70PRGuL/K9AM Xsv5ZTHG/FrniLrb1oJBrBh3+Z8cIk129FTDvrYCyFy3gyLcYsqXlJFkDiEV2t78LnuhmqpVuE8cq ydS0NyrvHBpFtdBNnwcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o13Z7-008xYI-Cn; Tue, 14 Jun 2022 10:14:29 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o13Yo-008xQg-QJ for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 10:14:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1655201650; x=1686737650; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Ru6Hs1IZbuBJ7mwIdfAMjY/hLuzXXJRVVCdFdhzK58c=; b=vekiN8nfmum0lZSU5OGh4D3En59gW5fcEh++l1H49h7J0RieQxW+8NMs gcYDgDx5Di0sLDbTayql+ZVeSNNdBDZ7MGRIPGJtNV5rfGfV+F6tIEJz+ Msm5TpZAC6UGCCEuV0bDqQMYcsWa3rm/hGzcZ2/NEsPGi37d5wbneAekx ZmsgPteWhgO9luU/Q9oeKjb+lE0B99CKXwlTR4kBN6ttknic4n8EDBkRN ua3g4uX1gXL1/kCx9l/cCWPicMLrv9D7gDPvmb8P3oxmQKDy43k36S0lv 0tN80zz9mtmA8IbbGBD9UYYhSqXhB4ljPPyOOcLVwpEeAcrx1Tg10l7es Q==; X-IronPort-AV: E=Sophos;i="5.91,299,1647327600"; d="scan'208";a="177866867" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jun 2022 03:14:07 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 14 Jun 2022 03:14:06 -0700 Received: from rob-ult-m19940.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 14 Jun 2022 03:14:03 -0700 From: Codrin Ciubotariu To: , , Subject: [RESEND 0/3] i2c: at91: Fixes and updates Date: Tue, 14 Jun 2022 13:13:44 +0300 Message-ID: <20220614101347.16910-1-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220614_031410_878954_1205E009 X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, wsa@kernel.org, mhoffman@lightlink.com, ludovic.desroches@microchip.com, khali@linux-fr.org, andrew@sanpeople.com, Codrin Ciubotariu , peda@axentia.se Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Resend due to the fact that the i2c list no longer accepts replys on the old patch-set. Comments not addressed yet. The first patch is mostly a prerequisite for the second one. It only moves the i2c_recover_bus() out of the actual transfer function. This helps the second patch disable the controller before using GPIO recovery. The second patch will keep the controller enabled when a transfer occurs. Before using GPIO recovery, the controller must be disabled, to ignore potential glitches. However, the controller must be enabled for HW recovery (bus CLEAR command). The third and last patch adds advanced digital filtering support for SAMA5D4. The TWI IP found in SAMA5D4 supports advanced digital filtering, even if, at the moment of this patch, the SAMA5D4 datasheet does not mention it. Codrin Ciubotariu (3): i2c: at91: move i2c_recover_bus() outside of at91_do_twi_transfer() i2c: at91: keep the controller disabled when it is not used i2c: at91: add advanced digital filtering support for SAMA5D4 drivers/i2c/busses/i2c-at91-core.c | 1 + drivers/i2c/busses/i2c-at91-master.c | 53 ++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 10 deletions(-)