From patchwork Thu Jul 4 22:16:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13724300 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 AEF1FC3814E for ; Thu, 4 Jul 2024 22:18:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ole10ILzMDIbGzbG03hWIpmMjlYwoDjzeuEQC3Dh/BE=; b=SRZ5xCaufSBT7cfVMqgLsusWQY LmXZ28+kvADwzon/RVWlbc9/ObslspC/N8wm2KM7tRLqkF6VkDkszh7SqRPIiESUTwR4oeqkfplj+ KwyhRgGTtCJBkTs8xcl5OdqqYddSrY0K4KeBR3CEFJduu5ukNA4X/RYjAce11ZZsr30outUDJtk99 x/9senWbKj+fFY9gQ3d23xtN7lmza5JPaAzRkb+5zcdGIe4CgyrwRaf0JkaW5QWatXnrq8mkYzlOZ uHarcL/2gttcr34JHDz6DM6rk1bdBM0GAII3rz3W72SJ/puSqg2U0pcK/ftoI4G3uGpb+XVPlFNM+ zztcEXLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPUlv-0000000EU5k-1qqN; Thu, 04 Jul 2024 22:17:47 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPUlX-0000000EU2W-1RlT; Thu, 04 Jul 2024 22:17:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C7D12628F9; Thu, 4 Jul 2024 22:17:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 258D3C3277B; Thu, 4 Jul 2024 22:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720131440; bh=0QQgidXtWp8QZnZvqZ4MSjBn79gM4mDK0CmxsML3CGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aL42qxm2sAAPwRaYZRrNqdU6k6gJSFgnGbM808I+DLcIw3Va42vqXh/P3GxCEIyr6 9WB4H/u2r5xvKR6+bGsFIm3XLoFobSbe4HjYnjjOOqcBbui3+c+fC20WEe9/5qRu4+ Aq7IJjsZMf/6LVD3bAanL0trmopnH62Gmpws4h1n35dgcoLQtliwCOZwyD/Pa6Kx9j oHbSQbG1laNWSNlcnlyZ+xHbhuK465pBgDfNHA64ndG83UeIanyv+OEHJeYNKv6cVl mf8mPS1xylQ+6JuWEF5ziM5Q0vvCGW8u66XZzbtsjjYKZ/6BnJ3u8ASHwb4cuyaBHL gSQC00AyctpiA== From: Lorenzo Bianconi To: linux-i2c@vger.kernel.org Cc: sr@denx.de, andi.shyti@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, lorenzo.bianconi83@gmail.com, upstream@airoha.com, benjamin.larsson@genexis.eu Subject: [PATCH 1/2] i2c: mt7621: Add Airoha EN7581 i2c support Date: Fri, 5 Jul 2024 00:16:14 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240704_151723_442034_B76200B0 X-CRM114-Status: GOOD ( 10.09 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Introduce i2c support to Airoha EN7581 SoC through the i2c-mt7621 driver. Tested-by: Ray Liu Signed-off-by: Lorenzo Bianconi Reviewed-by: AngeloGioacchino Del Regno --- drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index fe6e8a1bb607..4d93c00264fc 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -857,7 +857,7 @@ config I2C_MT65XX config I2C_MT7621 tristate "MT7621/MT7628 I2C Controller" - depends on (RALINK && (SOC_MT7620 || SOC_MT7621)) || COMPILE_TEST + depends on (RALINK && (SOC_MT7620 || SOC_MT7621)) || ARCH_AIROHA || COMPILE_TEST help Say Y here to include support for I2C controller in the MediaTek MT7621/MT7628 SoCs. From patchwork Thu Jul 4 22:16:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13724301 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 C73D7C3271F for ; Thu, 4 Jul 2024 22:18: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oMzII5SrguwkSw5E2H8OwaEsF1/6pk8s3bLM9whhAzs=; b=fseZAvPEwdcW9nMYsbQ1gup5Jx h4qF5/wfoH3STehyUInUAF934VGKIsWvgfBxyKXq08QReM62GGV3eqtOv5iJjhQxqfq/PEa6VIjLF 8GYBjmgwzv0xgzebZqaNXUGQD59SjsTV6GZKMQVeTjb90V9va24M9W/5eU4DQnPjMaJ/Ft3nWY0Wy xZrS3c2MHrPpM3+eK1Dr7G3tJzKlprK4bMk01kt+B3PSWWo/6qtXZzvOA6kNzphrw6TqS5cyhZCSM r7pc1c3EUUwRUZMAN3xRcI+y+Vq6bB/sTMt3VKtBswDeSBozumEeXLEBloVmlqUn8qrxccLCYH8jn 0srJa7cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPUm6-0000000EU7r-4BE3; Thu, 04 Jul 2024 22:17:58 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPUla-0000000EU3N-2F7u; Thu, 04 Jul 2024 22:17:28 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id F3357CE3899; Thu, 4 Jul 2024 22:17:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFF86C3277B; Thu, 4 Jul 2024 22:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720131444; bh=U9kX6F2NynFqke8lVdenBDLDD0kM/a5L5wxCfA/OF3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YVKh5FqVjMkxjqFaASeJTw8Nwe6hJ4n5zXcesQHwii7yTrd5o9zPjOuIrxShRASmi lJcFEg3qzv0EKvS2l1I+59YKcfmeaPeFb41EedD2XWBe39zKrEuGX/VoC92Ehno/Lj +DE4YxXQihhZxeEh0jYxObo6hA9dnObFqNmiAYA4xzCQMJ6gExqJ1dP3pC7N6Gyv/Z ysjk96qGVM5Z/s5HravnF1SxK2sdRqwbXoUueqLCT/N/WLd5FxnllCnot35xW0Zu5h a9ZOhhNunQ/m+MvABdhm2XKIEWgW/KvRmtXSpUISugUMIQP1mzl/5YIUhLFhFr6slU U1d21poUNlLkQ== From: Lorenzo Bianconi To: linux-i2c@vger.kernel.org Cc: sr@denx.de, andi.shyti@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, lorenzo.bianconi83@gmail.com, upstream@airoha.com, benjamin.larsson@genexis.eu Subject: [PATCH 2/2] i2c: mt7621: make device_reset optional Date: Fri, 5 Jul 2024 00:16:15 +0200 Message-ID: <3ea697be239c450cbc622f3e2e9dff8bf17515c0.1720130844.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240704_151726_772227_7C15442B X-CRM114-Status: GOOD ( 10.56 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Rely on device_reset_optional() instead of device_reset() in mtk_i2c_reset routine since Airoha EN7581 reset controller does not implement the reset callback and device reset is not mandatory on this SoC. This will remove the following log: i2c-mt7621 1fbf8000.i2c0: I2C reset failed! Tested-by: Ray Liu Signed-off-by: Lorenzo Bianconi --- drivers/i2c/busses/i2c-mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-mt7621.c b/drivers/i2c/busses/i2c-mt7621.c index 81d46169bc1f..8cd89a2f59df 100644 --- a/drivers/i2c/busses/i2c-mt7621.c +++ b/drivers/i2c/busses/i2c-mt7621.c @@ -85,7 +85,7 @@ static void mtk_i2c_reset(struct mtk_i2c *i2c) { int ret; - ret = device_reset(i2c->adap.dev.parent); + ret = device_reset_optional(i2c->adap.dev.parent); if (ret) dev_err(i2c->dev, "I2C reset failed!\n");