From patchwork Tue Jul 27 11:15:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 12402541 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 271B5C4338F for ; Tue, 27 Jul 2021 11:18:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EE1BD6054F for ; Tue, 27 Jul 2021 11:18:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EE1BD6054F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=tk9vbMDlWDwAcqVqt1ODP+dLMWVRGezxZI8DitzaNio=; b=3ekkdmCgNOORQH pO/ARUMfePINqoRRn2Kw1B2hVCsHLprKFQ0u+Zjsts/bhABroz7JQFrp4MteEEjbeY7KpVBPz3XM9 gLSiwoPwc3Iw5y1s7kvYKijihfbaVRx+6ourq20GvjVk+Qg0rxXIJR0JQZF2MCz6lbBlIN9/8yS++ r8gfD7iTo+a9Ic76P9kP8lLAvNkqe3x2slYZ0qEuKy7oFzKYA0WaxerTzKtTKQiYybvCwwVmL5BGG vI9ZK4I6ZLhT8bpuu31YG2j/rU2CeYM01Wt4+vZSKQI4AVIB/7M65yNHfBDRKovVmYbeWSHK5sMfb DZeIxmtapETrOqNYFxbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8L4I-00EaXU-Fr; Tue, 27 Jul 2021 11:16:15 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8L4E-00EaWX-9a for linux-arm-kernel@lists.infradead.org; Tue, 27 Jul 2021 11:16:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1627384570; x=1658920570; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=DfQKmyg7ucgYUAgLLQ7ExUKOKdgz4Ph5a423Jvn9x+4=; b=C4FeUIx3oOGLeSXDsAagqoJkAvhrPlZqfCNZ6NzDCnaTPcH74on0q7s9 HSLcebGMqKdUuj6brxjaCPRSJ9No3E1CtS2qVd1XwvsCkBmoZlrPcquwP 73pegaU8l0XK+gxvlEaeQMmAo7C6NFth/uKjUdoDa5LbTM0U3c8a9teUN zub4qfCeCR8YDIaNf7xG6vDRjFvIhBCrluFrxI+K0/0AP1zQ5+GT/JNPa IYRl9BRJs89okNcn6ZHe6dW961tOLAEzh0KV1e5gs0yFk3U5JkJ6VCSp7 An9S4QSFXOWpaWQZBdppEkR5kYGHxUykcxiptCtUIKf+hfMOG+m5stWjL A==; IronPort-SDR: 7BCS3i5wqv4UwHG+CddaiascHKYzEJwHzS908JF1dmdGAASz4kDii7ftXi3mYyoW/4MOc7AB5t cYM23VaNhjzysI2jd2thjvL8Nx9axkaonJRRYZZiASy5gNRZ37GYreskdGyGedhyPoaMNvg0k9 CabawKxrfWNF8IQJClYa1P7I4vK78SYEEQ96wdjtL2fi8rPOs2DCymxlT8DWErcsOK1+eOCDhJ KaUH9S5vzQ14kKmH/OWYr50RFsw15lKCsFTvlqzxq3/OSNEjm+ZUCk3U0Zl5gVMUgyRVLpTuu3 GDXQPrVW7c21jPIpr80gCG+e X-IronPort-AV: E=Sophos;i="5.84,273,1620716400"; d="scan'208";a="63728626" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Jul 2021 04:16:08 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 27 Jul 2021 04:16:08 -0700 Received: from rob-ult-m19940.amer.actel.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 27 Jul 2021 04:16:05 -0700 From: Codrin Ciubotariu To: , , Subject: [PATCH 0/3] i2c: at91: Fixes and updates Date: Tue, 27 Jul 2021 14:15:51 +0300 Message-ID: <20210727111554.1338832-1-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210727_041610_444446_05623334 X-CRM114-Status: GOOD ( 10.96 ) 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patchset adds some fixes and updates, mostly for SAMA5D4, but other platforms will still benefit. 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(-)