Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4307476pxv; Tue, 27 Jul 2021 04:17:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwK7PROl+zbMKHetf9YbRWohI8f57LT91enIi0AkvLGJj0Uwrx/PPhdRuIJJ4yYniPhhAE+ X-Received: by 2002:a02:bb12:: with SMTP id y18mr20718137jan.66.1627384635809; Tue, 27 Jul 2021 04:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627384635; cv=none; d=google.com; s=arc-20160816; b=NVtnfKroJ37Q1afd0qm5UvAMgMwJCrgso4F6MDxjcDfk6kJwcf2Q7veVzENxnYBhts cp8rAOjhxydmNgJz2laogr/QXRLHX4aSuYUNpRbZpQXeLPTM/m6zKcxcOD04/JzZmUV0 iZo39BFs+BkzZltBt89n9lxuo4p0EQlOcD+FxX4C3C7n5zuro1wiWIGqgdS6KTc9b2td 41wozFXorgGfif1iS+/xS6EQBcoK0u54bUKpkhZZp5cFbFnbk5Cu7l8L2jfqJpOQBZoT ONdEcFdH4NGRqUJHcEIJqilGTqdGsDx0BgcjN60x95ffnzY3pI7De7w5fZnfa7Ml5fTF jf5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:dkim-signature; bh=elYma8HARhoMwMouYwB8zZlhgGfOj60zgmqxFZQnpwg=; b=cjzbLTYPd27lPPnHG8+HFx3LIWByiSkZ9jiKLAMwZr/jDaolxnvwIRBZuEW0Lb14tK mcqyKyBJ4IzRJOUJTAH+JrokXc+OFM4QVatFofFBzKSXNAgRrD2PfOV+9FEln1rpiY2R mzVzM1wOVXhj9IW37S3kuoGXpU1iTpPewZZ2mIG99n/2gbnReP1Jb/UKgmFDxS1bh+bw eya584e4xXevIJtEyJTLoYJAb+6/y2ZHtkNqMIvrVyY6MMZ69vMnDexCDFkwtxBOXNSQ YppvB6zptG31OKx1BuDQ35bGT/svoRj5kaeOYIvUDACN8nVdEwb86WE51xHEshf8c0q8 zBJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=IMqwFVLY; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o14si2789453ioo.4.2021.07.27.04.17.02; Tue, 27 Jul 2021 04:17:15 -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=fail header.i=@microchip.com header.s=mchp header.b=IMqwFVLY; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236428AbhG0LQJ (ORCPT + 99 others); Tue, 27 Jul 2021 07:16:09 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:40282 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236318AbhG0LQI (ORCPT ); Tue, 27 Jul 2021 07:16:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1627384569; x=1658920569; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=DfQKmyg7ucgYUAgLLQ7ExUKOKdgz4Ph5a423Jvn9x+4=; b=IMqwFVLYUsU6+dRtlbIt13UknJnONHgcidaUG0KpZCTnLtPHgJ+lVjjs 3BcOZkmL1XowjMV6dc4Yl2xnYYSRxcf2xLrhgFqkcJoHIWaYpbhnpZi07 0v0MEj8R/vw8rYVxea9F16FgJqvRX/Hg6e/gQ+uRzXScziBpdeuXRk9q/ UCccJux2m2EZY3gWDK4WHMkkfIoZj+Z8lHKu8PRz1nzgWh52zk7yvjLsm K9O19j5ey7zq0s9zAhlKH3Q6LQMznT2KkrmlMy64nzpxPkkpp89hPE0Rl sfENDvFjviH93p+QHNz7VZtc1C2v3L3Tc5sbfrvd61GlbOjxoarq7zotq w==; 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: , , CC: , , , , , , , "Codrin Ciubotariu" 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) -- 2.30.2