From patchwork Tue Jun 14 10:13:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 12880887 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 23DF5C433EF for ; Tue, 14 Jun 2022 10:15:47 +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:References:In-Reply-To: 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: List-Owner; bh=n8/x4vOktR45gJtS4mzNEHvZkpS2vRqCSOBnl5RhbU0=; b=I3AnBXzncw31+H bLKIcAWSKfhGryZjvzxXYaP3Sn2dvFIR5AMIFs+MQVx+clw6G4lU4AkWy9vPEv02J58XLVwtV8gj0 15cTmLtubtGoHACn+z24nWEQuWLOiDxjOnbITh14lTsHz+8TS7Q1C5gppA1hw9V64D1YwVjygG1zS c1oiqBhmtpQPenBl3MiGBLQUKlMY+Wqx1YO2Zi1EFrceUsapuoI5Ae+y3EFeJ6xaia8g4gf26CGaO dQVSK4pJqw5fXYCJmvEcxn5OuRaKz9uyVopmLHhaYJjn8OLHUZUsfMgfHkjWAXYPhJ3Sv4t9B7efv IvSy7eoVg9gWU8olv53w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o13ZL-008xdm-0C; Tue, 14 Jun 2022 10:14:43 +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 1o13Yp-008xST-M9 for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 10:14:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1655201651; x=1686737651; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pgiEnpbzfxx0xiXD6WVAkT4RHdqsHlan76yu59uc6B8=; b=BejxgrJ7HShSO5ow+qM2AnSmwEZcRjRdi0tw7VpngJgA/0kWPKknEjHb zcxN5E5vf2oWXrdYNQ1XI956DfNuT3nNYgLMAXBuQdsdhZM0jInsvYLVB TGlN8du97LHHSHDToBa5K4oLkgvhj3k+DLl/5rqCg7Yp8+R3uACBbNLj1 iC0sjwGPbOfkQzfoDf7RiW2lNUVDh4+UQY6X7nQL0un4GM6Hs+86k6i69 s4RNO9hPfdAUtwcZNX6CUkt1qPmQY5487Dt0/aVmuQIXLm4pWZAGhmIoS X5Snibc/i8h8MEZ5du8tReM3J7g2X11napL0dkACMGiybdm76HV9fJb2q g==; X-IronPort-AV: E=Sophos;i="5.91,299,1647327600"; d="scan'208";a="99927268" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jun 2022 03:14:10 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) 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:10 -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:07 -0700 From: Codrin Ciubotariu To: , , Subject: [RESEND 1/3] i2c: at91: move i2c_recover_bus() outside of at91_do_twi_transfer() Date: Tue, 14 Jun 2022 13:13:45 +0300 Message-ID: <20220614101347.16910-2-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220614101347.16910-1-codrin.ciubotariu@microchip.com> References: <20220614101347.16910-1-codrin.ciubotariu@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220614_031411_828510_C52BF730 X-CRM114-Status: GOOD ( 11.13 ) 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 This patch doesn't add a functional change, it just separates the recovery from the transfer itself. Signed-off-by: Codrin Ciubotariu --- Removed 'Fixes' tag drivers/i2c/busses/i2c-at91-master.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91-master.c b/drivers/i2c/busses/i2c-at91-master.c index c0c35785a0dc..34df1614bc37 100644 --- a/drivers/i2c/busses/i2c-at91-master.c +++ b/drivers/i2c/busses/i2c-at91-master.c @@ -639,13 +639,6 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev) AT91_TWI_THRCLR | AT91_TWI_LOCKCLR); } - /* - * some faulty I2C slave devices might hold SDA down; - * we can send a bus clear command, hoping that the pins will be - * released - */ - i2c_recover_bus(&dev->adapter); - return ret; } @@ -716,7 +709,17 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num) ret = at91_do_twi_transfer(dev); i2c_put_dma_safe_msg_buf(dma_buf, m_start, !ret); - ret = (ret < 0) ? ret : num; + if (ret < 0) { + /* + * some faulty I2C slave devices might hold SDA down; + * we can send a bus clear command, hoping that the pins will be + * released + */ + i2c_recover_bus(&dev->adapter); + } else { + ret = num; + } + out: pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev); From patchwork Tue Jun 14 10:13:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 12880888 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 49CB0C43334 for ; Tue, 14 Jun 2022 10:16:08 +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:References:In-Reply-To: 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: List-Owner; bh=5m5w7HEXDH0b1uP0HEeRkgynApcOt/K+eicuJBs8bmg=; b=b+CDcMvnVPXvcl dFcqgDZ8Bi8ZjoTQPuVjLE4AxNVvTfX/KFupWMonAm8BYy7WV0gPT39fKh5R+MnEBsV/3eKJ4aFYM rnJP+MG14AZnaMOnQw+uwu5lxV1nCmaz/jy+XDnzBTKk0kdPHz4vGnmBmazlZvcsNGqhoNdq2aSjr Tx5U91NxBCHRpwrz5qN8ZWl6w5jDfSDxSJ71DzsIaUApaDZoTz3Tv0WQJyGfvRkIWlFROSwjKC6TJ bh13iCHud7ROIgRkN+7vJv2VaYTOIwgzqgUGYtADePsng675AaLESn6O6EjusTmPkP8C8C6H6MxQO 6soLLd0wYk103uIVR0MQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o13ZW-008xj3-NY; Tue, 14 Jun 2022 10:14:54 +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 1o13Yt-008xTw-Qk for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 10:14:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1655201656; x=1686737656; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Bm/yjNGr7vqej9BOgwcKSYBI7QKfQf6sfv+L/ygDrJU=; b=T/1+5ayqmRFoLqa0mTpUpDC0gt8gXYoWWj5pzNBBxExjYzkFSw8yvNze KqmnanOj3SFQY/ZO2opm7cZB6rei6y/al8N6n04dxOsto0k9wIycCBiQ7 VI4wCfKsTxEcwfMIfP9OZ/CPyHL4+pz4OlIsl7d6CETdJaxKvDpmiOAop z36sJQHG/EoYlajICcyMVbTJQ2Bze3ZQlm6IgZ6KhoUIp14o1V4SIxV1F T6La1TTRIr/SMHUSK4zf2+809mJhCB/EOdnaiBR4LFrQZslclk+hni6Yu 4smd2EYZ0+YI9mpjXfTyx3C+dSgyMZm1Pu0VnjLQnXNTvltUthM2vzF8d w==; X-IronPort-AV: E=Sophos;i="5.91,299,1647327600"; d="scan'208";a="160219951" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jun 2022 03:14:15 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) 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:14 -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:10 -0700 From: Codrin Ciubotariu To: , , Subject: [RESEND 2/3] i2c: at91: keep the controller disabled when it is not used Date: Tue, 14 Jun 2022 13:13:46 +0300 Message-ID: <20220614101347.16910-3-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220614101347.16910-1-codrin.ciubotariu@microchip.com> References: <20220614101347.16910-1-codrin.ciubotariu@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220614_031415_969199_705E5578 X-CRM114-Status: GOOD ( 16.69 ) 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 The controller (master mode) should be disabled when it is not used, to avoid potential glitches on the bus. The controller must be disabled only when the controller is not running. This fixes an issue on Microchip's SAMA5D4 platform when pinctrl changes the I2C's pin states between GPIO and I2C, done when GPIO recovery is used. Fixes: 813e30e9ab91 ("i2c: New Atmel AT91 bus driver") Signed-off-by: Codrin Ciubotariu --- drivers/i2c/busses/i2c-at91-master.c | 34 ++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91-master.c b/drivers/i2c/busses/i2c-at91-master.c index 34df1614bc37..14c2a4856978 100644 --- a/drivers/i2c/busses/i2c-at91-master.c +++ b/drivers/i2c/busses/i2c-at91-master.c @@ -38,7 +38,7 @@ void at91_init_twi_bus_master(struct at91_twi_dev *dev) /* FIFO should be enabled immediately after the software reset */ if (dev->fifo_size) at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_FIFOEN); - at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_MSEN); + at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_MSDIS); at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_SVDIS); at91_twi_write(dev, AT91_TWI_CWGR, dev->twi_cwgr_reg); @@ -593,7 +593,6 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev) if (time_left == 0) { dev->transfer_status |= at91_twi_read(dev, AT91_TWI_SR); dev_err(dev->dev, "controller timed out\n"); - at91_init_twi_bus(dev); ret = -ETIMEDOUT; goto error; } @@ -642,6 +641,26 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev) return ret; } +static void at91_twi_disable(struct at91_twi_dev *dev) +{ + /* return if previous operation is completed */ + if (!(at91_twi_read(dev, AT91_TWI_SR) & AT91_TWI_TXCOMP)) { + /* wait for previous command to complete before disabling the controller */ + dev_dbg(dev->dev, "wait for command to complete...\n"); + reinit_completion(&dev->cmd_complete); + dev->transfer_status = 0; + at91_twi_write(dev, AT91_TWI_IER, AT91_TWI_TXCOMP); + wait_for_completion_timeout(&dev->cmd_complete, dev->adapter.timeout); + if (!(dev->transfer_status & AT91_TWI_TXCOMP)) { + dev_dbg(dev->dev, "IP still busy, resetting the controller...\n"); + at91_init_twi_bus(dev); + return; + } + } + + at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_MSDIS); +} + static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num) { struct at91_twi_dev *dev = i2c_get_adapdata(adap); @@ -657,6 +676,8 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num) if (ret < 0) goto out; + at91_twi_write(dev, AT91_TWI_CR, AT91_TWI_MSEN); + if (num == 2) { int internal_address = 0; int i; @@ -710,13 +731,22 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num) i2c_put_dma_safe_msg_buf(dma_buf, m_start, !ret); if (ret < 0) { + /* disable controller before using GPIO recovery */ + if (!dev->pdata->has_clear_cmd) + at91_twi_disable(dev); + /* * some faulty I2C slave devices might hold SDA down; * we can send a bus clear command, hoping that the pins will be * released */ i2c_recover_bus(&dev->adapter); + + /* disable controller if not disabled before */ + if (dev->pdata->has_clear_cmd) + at91_twi_disable(dev); } else { + at91_twi_disable(dev); ret = num; } From patchwork Tue Jun 14 10:13:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 12880889 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 6B12FC433EF for ; Tue, 14 Jun 2022 10:16:18 +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:References:In-Reply-To: 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: List-Owner; bh=toIReyWLVRhkb9FoQV+7Gx8hvJlttbSZZZbRFAFJUEg=; b=3toce2+qLPvDkj iVtXGxMmMH1AIJYwPSYRMBjmLH4oNj/iOWgeOscQTYVeABCG8+Gj7KR/d4UlidiJEDWed+99l5nQm jVWwiocpoI+waL+SfSsNUHGfdLij8M2wuZf6Xhl0Dd/l/hgAmdvnz83lDe2Z8X640kqpC949L/mFH UQ2guz7y+TRJx7Kvgo7a9Bia8/a2ZklWmLUg38kcFUl9U364UHFw33jyPI+TwU9T6NmCsccwdhsmU kYSNm7q0MEX8kERVlp/e5hwY0u4m/SDxGrasRgKFlhZwfyvr8/VUoKCgAWk12O+vRar3cexH/bJ3R Ii/QPz6sSeoavSsI6IbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o13Zk-008xpQ-TQ; Tue, 14 Jun 2022 10:15:09 +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 1o13Yx-008xVN-3Z for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 10:14:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1655201659; x=1686737659; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6W4JCf3REfCgtU1YeTx5Cs8TR95mjpKwa6re06enmmY=; b=fwSS4OxUB28pbrbq+gViamSlX7lfMYRva/qhUsrjkGntM/QTKjbD4uTI X4LRJoPTVra1dlSWK6GiEYWjJsOJ9iZo6nYVuCCviLeeIhyPLVNDA3oBv GCdXe1G7uzpK2pBM491DxyN47XtrvsSi72D2Fg4edMYQ1vqczrzAyrSh8 BBQtba/SUyKfNbxpwc0U7D61sdO+HCMPzCO3T7gqDnnVkq2DqmmSiiyEq ISfx3772pF7b1C2EYWSktlKfkxQo+mTmrOmwOpB9jNxSMR3pCi07ZA3A3 C1BAcUROUVQlDdJlqeGNtPxMM5u/gkkMHqmmd78ev99VRKJb9rqKA2hFW w==; X-IronPort-AV: E=Sophos;i="5.91,299,1647327600"; d="scan'208";a="168028816" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jun 2022 03:14:19 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) 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:18 -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:14 -0700 From: Codrin Ciubotariu To: , , Subject: [RESEND 3/3] i2c: at91: add advanced digital filtering support for SAMA5D4 Date: Tue, 14 Jun 2022 13:13:47 +0300 Message-ID: <20220614101347.16910-4-codrin.ciubotariu@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220614101347.16910-1-codrin.ciubotariu@microchip.com> References: <20220614101347.16910-1-codrin.ciubotariu@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220614_031419_208563_A0EB266A X-CRM114-Status: UNSURE ( 8.46 ) 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 I2C/TWI IP variant found in SAMA5D4 supports advanced digital filtering, even though, at the time of this patch, it is not present in Datasheet. Signed-off-by: Codrin Ciubotariu --- drivers/i2c/busses/i2c-at91-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c index 2df9df585131..7549a75a98ef 100644 --- a/drivers/i2c/busses/i2c-at91-core.c +++ b/drivers/i2c/busses/i2c-at91-core.c @@ -120,6 +120,7 @@ static struct at91_twi_pdata sama5d4_config = { .clk_offset = 4, .has_hold_field = true, .has_dig_filtr = true, + .has_adv_dig_filtr = true, }; static struct at91_twi_pdata sama5d2_config = {