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: 810170 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6BB5405F8 for ; Thu, 4 Jul 2024 22:17:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720131441; cv=none; b=L3CAwYSmhIvXMkoBsGaIrj90uTgL/IWtmfd3w5Sv+yzDA3+yXNCrWxVpZV74x/V7nkNrt6p43Sbr4QpOFjsHr6TWq8VSNkOXVnYgo2cniCnbosQhxtyiikYom3K1oa51bJXbJ/u0xeV1EVTMt94ozSIFub1BjG44yiKOEm2j4yM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720131441; c=relaxed/simple; bh=0QQgidXtWp8QZnZvqZ4MSjBn79gM4mDK0CmxsML3CGM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CuYxfXEqBgRF5NLlTwCN7vAIfFXf6xQHlX3XSmW4jMmu2MbUHP+5e9YU5zeCah74ZOUXXPvC75s4XXo9Tjsn6hDVpp7JnaO7J6Un9kxPYviZxcb/n1LPT0ohzU650I7LRSDDQJvec2Yzv9/NotnhneNWIKl38bRkC1hNmaJh0Fo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aL42qxm2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aL42qxm2" 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: Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 810500 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97D1C405F8 for ; Thu, 4 Jul 2024 22:17:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720131444; cv=none; b=qgOlQ1eonRQwALw5OtpGnoiPoCiEPFpqPA5X9A9YBjb1RAe823AK4Tbq/qOOwAjoy5vfYza+uNwj2YaJcKmdTgZ3woSSloF2HFxP3QTP6CR1BVny8Cqvz4YhApI2tLskF/z/JgxuSSI1C13C1Nx37HZzzYmUYxHllEv1Z2MzlZQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720131444; c=relaxed/simple; bh=U9kX6F2NynFqke8lVdenBDLDD0kM/a5L5wxCfA/OF3c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DZi/9+KKCXrytRuibxzxlcBQCfzbiqmvfK5Bg0tawSnBTsixiX2Dsf/MjAYUWHXBUO0KgNgo4RAoVvM0pJTe5K4bRGWv3ptb8qfi69VcCxFDlq8JILjhY0VAObDtCf0lOzGy2qTpJonHoypAyvM89fL0/JYcHaNVHdO8OuEt4s0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YVKh5FqV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YVKh5FqV" 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: Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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");