From nobody Sat Feb 7 09:46:34 2026 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 0758B274FE3; Tue, 27 Jan 2026 21:04:04 +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=1769547845; cv=none; b=M0nw+h//gqRoqFfGvmcLgMaWgdAc40LE2VYfQozZjxyY/BfRs3srkP+H67sW5R78GGPxbKpczNukP1ZZA7/EP+5VwmiXZtqZroTftyybtaYv5Fv28SD5MvqTf4CQjfFzpg5Lxqhs4ceW/TQNb3IOZ+/odJmOOx5TOUqo5dcK0ec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769547845; c=relaxed/simple; bh=2f258ZKMGjMDX6rVeyYTKnl8hXsCenCR77UWDe3H8b8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Rsnl/pkZaqysy6GSR2tEjt5+9y/EqKpNxsGCOzP9sg95Kh81qd6iwvLuAfOMGWc+VE2x4M0LT+jK/KgH3eScVxtIWip3Mk9819sX/zox4iKbbHd5CIosuUpkSQn95c3bGO4UGZHBbLOG3Le8EoINaGYmS/nIAfSJqMFmc8wlB4I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p+N9NKKW; 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="p+N9NKKW" Received: by smtp.kernel.org (Postfix) with ESMTPS id A026EC2BC87; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769547844; bh=2f258ZKMGjMDX6rVeyYTKnl8hXsCenCR77UWDe3H8b8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=p+N9NKKWL+cxS6luMRys+V2zGZago5/o/xnC2XxtwYcTUUaL2LN30OxxK8aaaqgeg AQT2n+47rGDlz3ZhvFceYlL5hf6c0/82Uf8WIWT281kKlV2smdizdE31K8tJajSqy2 PrMR56heVIzOYbUMmJOdtCXjTAK6/DzTAqTm/ntl34jl4cIMzB3vHMJocKaFdObVKc rQhpCh+bnpAEjdNNyLs8a5xIxLUS5H691LE+myMrLfVU9BiqzeR3snbZ+1dX1x1bNQ wMExWqoI+BceO+D6OgWnJASUjvYKTeHw9VX+lLK3/3A6njhvbHbKMsJUq7howS9KGe qrOtG4ja4FH5g== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 919AFD2FED9; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Tue, 27 Jan 2026 21:03:55 +0000 Subject: [PATCH v6 1/7] dt-bindings: i2c: xiic: make clocks optional Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-i2c-xiic-v6-1-e82e2f6f657c@nexthop.ai> References: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> In-Reply-To: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , info@mocean-labs.com Cc: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdurrahman Hussain X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769547843; l=759; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=Jp8L32rGkddXyWP1kCRtOWV6Txgpa0+B9TbjL9V4o78=; b=u1JsuQG6Ngsrd05YJZA+2pdIjEIfAGdmj2WXnu48Z6ITIo+Hh2iL+m05kDLxkG7cwOBA1vGBk I6GaIzZE4xDDKR18UK7oEOuDBzvE3o8QBxTX0ojRs1UnNdigFm7Llq4 X-Developer-Key: i=abdurrahman@nexthop.ai; a=ed25519; pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg= X-Endpoint-Received: by B4 Relay for abdurrahman@nexthop.ai/20260119 with auth_id=608 X-Original-From: Abdurrahman Hussain Reply-To: abdurrahman@nexthop.ai From: Abdurrahman Hussain The xiic driver is designed to operate without explicit clock configuration when clocks are not specified in the firmware. Signed-off-by: Abdurrahman Hussain --- Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml= b/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml index 658ae92fa86d..cc500130f41f 100644 --- a/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml +++ b/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml @@ -43,7 +43,6 @@ required: - compatible - reg - interrupts - - clocks =20 unevaluatedProperties: false =20 --=20 2.52.0 From nobody Sat Feb 7 09:46:34 2026 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 0750A23A9B0; Tue, 27 Jan 2026 21:04:04 +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=1769547845; cv=none; b=hSCcsk+8IxP5ZGUIDn9dXhqttI8AaX6Wqx0MgtX6DlT1Pc7m8PGt0HD9ZCF4Ri41SE/e/vm8NRRbIiVSqmZfkoFrj2NOAAoTctid4ezF7c6w47M7SVhIDl9Zx1U7EDGnkp3wbofaS7jxsF+GJ4fyQYHOAa3oPun7qP9A8JPPs+A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769547845; c=relaxed/simple; bh=bRJsBVhV2cTCTGqXXoRRmJ1NBnZdJqFem9P0ZfHUxu4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tfR8FN4pcB7FNM+HhYpIqLb1IpNgjyH6f/vz4p9sWUaS2jU99AEKy3AcKDisGThcVHd08dL3bIPvA30LJ8RGrSPD+LsIWIQv/pLsy5kgV+rVavFbU6kKk4ni/TVYoUglF6TyuhbgF1H2Q3mgHcTu5uOntu56691EUwVT+PAueO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NhcEuMeR; 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="NhcEuMeR" Received: by smtp.kernel.org (Postfix) with ESMTPS id B3F2FC2BCB0; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769547844; bh=bRJsBVhV2cTCTGqXXoRRmJ1NBnZdJqFem9P0ZfHUxu4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=NhcEuMeRBr9AO6D1JYMO064Q3vTHWgc7mLHuWxvsISIW+Vx5wqfKVdojFu38d/UuY fLtO9LagFmLeHwhsUTGR6TPb0s+SnIO4WIhwpqnSYWupBPNYQanYRXnqFlFRV0DRex Xnqp4l14h9sazkCyvFmWspRI+aPEs2yu3k0WFVPAd+XgAy8SAPrqVo+EJzxjNapjMc c9ilocuOQePi0joqrzs+/edeRlHRoUmaukYue0xcEY8AUPgPIsZz1kh4hzkSIzd92K jFCg0NffPDOEh5MnbgktlrNtwMN3YTNloq9MBFYYww4MhYviAzWjWQsEgNw9CezXGT kCtEXXymy2u8Q== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4A29D2FEE6; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Tue, 27 Jan 2026 21:03:56 +0000 Subject: [PATCH v6 2/7] i2c: xiic: make the clock optional Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-i2c-xiic-v6-2-e82e2f6f657c@nexthop.ai> References: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> In-Reply-To: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , info@mocean-labs.com Cc: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdurrahman Hussain X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769547843; l=1430; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=MFPKI1awSXPDHMhgBtmEFE5/b9Lhx4gVN3sZslxmYUc=; b=+FtBJZg8geOC7XQNZZg6dApeNX1NUbt+C210icp/0ttg9ATCBS02Ux5PPYQlE0WcbPTnx3R3t 47XJchi0O30CWbi/IEzFJdUXMuB2GAQVBQWdfWu+bd+wOGA0X0BU8bW X-Developer-Key: i=abdurrahman@nexthop.ai; a=ed25519; pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg= X-Endpoint-Received: by B4 Relay for abdurrahman@nexthop.ai/20260119 with auth_id=608 X-Original-From: Abdurrahman Hussain Reply-To: abdurrahman@nexthop.ai From: Abdurrahman Hussain The xiic driver is designed to operate without explicit clock configuration when clocks are not specified in the firmware. This functionality is already implemented in xiic_setclk(), which performs an early return when either i2c_clk or input_clk are zero: This condition is satisfied when clocks are missing, as clk_get_rate(NULL) returns zero, allowing the driver to rely on hardware-configured timing. Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 28015d77599d..16202fb89271 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1423,6 +1423,7 @@ MODULE_DEVICE_TABLE(of, xiic_of_match); =20 static int xiic_i2c_probe(struct platform_device *pdev) { + struct device *dev =3D &pdev->dev; struct xiic_i2c *i2c; struct xiic_i2c_platform_data *pdata; const struct of_device_id *match; @@ -1464,7 +1465,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) mutex_init(&i2c->lock); spin_lock_init(&i2c->atomic_lock); =20 - i2c->clk =3D devm_clk_get_enabled(&pdev->dev, NULL); + i2c->clk =3D devm_clk_get_optional_enabled(dev, NULL); if (IS_ERR(i2c->clk)) return dev_err_probe(&pdev->dev, PTR_ERR(i2c->clk), "failed to enable input clock.\n"); --=20 2.52.0 From nobody Sat Feb 7 09:46:34 2026 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 14CD328469E; Tue, 27 Jan 2026 21:04:05 +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=1769547845; cv=none; b=fB8BfCKXHuwxfUrY5kwwMp45e5WPzD4ElRcZmmKzaQLX32F+RLlBZYqAahze8DqgYwTC6X+XnJTNj70pvjngXCSBZh6XWZ/Yi89MQffb4VPc81l2jdwVEIc9oYE/O8cWQBuZ/9ebCfhBZm3NGUUYV1X43I+0B7zgZvA8JtHRPck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769547845; c=relaxed/simple; bh=LBhfTj6Pula0hCiSt84yg2QYd+/y3z0gTPRsmOA4c4w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ab+uDJzFY3HEf+N4zFDUAH0q/0ZudQ6YWO8Y7aSC0JgVUHOdhx3xBtlof/bAFHBZAay50Ui7zOoKostsQFo9gqbYPNpb48oPDnBaUi5vuBpITREaGJ5S/42dhGY1APNsIA/WOQsQ3M67YqUQFFupFNxHEfR5ukyhBMBUK6sd5es= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uttGjcor; 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="uttGjcor" Received: by smtp.kernel.org (Postfix) with ESMTPS id D19BFC116C6; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769547844; bh=LBhfTj6Pula0hCiSt84yg2QYd+/y3z0gTPRsmOA4c4w=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=uttGjcorI9b3iEz3+2j2LGb7zXoHWwyt/Kh+NWFsq7X4af+bJ0kVKtNQSntEb0bCo 8a03L+SRsr5lDrsiAMeEJHjLTzrrUlK8L7mn5PsMr4g7gdyN4QnBdu8a4DCpVJrQi6 /nSMml5ikNqZnZR0/rm5zLI0YEt28LvPzT8Znh4jwHS7YTgCRuH6YDVHxJmJyWXWrX bNoF5Yof7NjXo0XKsXC+91QSeEhG8gVv9cRjPRyBCwxQ8PefDUVC0s3j4Eiv1MFcfS kF5rQ6ib5vtt+2wK6+uOiOnVzcGA1/98ad2kNAQIb+vFxtG4Via/dCtRyzJaBVAo+D tVJosHVzmxFsg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6256D2FEE4; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Tue, 27 Jan 2026 21:03:57 +0000 Subject: [PATCH v6 3/7] i2c: xiic: switch to devres managed APIs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-i2c-xiic-v6-3-e82e2f6f657c@nexthop.ai> References: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> In-Reply-To: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , info@mocean-labs.com Cc: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdurrahman Hussain X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769547843; l=2628; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=yRa/CRG2cqtMW/1r2zBVnG3RPQKHNft2Yt/Y6AX+WfM=; b=B+mb2ftUoC0mMyYyAJGCA/r0RND13DFshhEDrNIFqgYwvbrXsW5252wRoWApiMaSulPUMu5RC pn8m/62rcKBD1AIYqs2iRnGse5tvRiQrsLPVs+5YzI9H1JmJ1jTBZ8S X-Developer-Key: i=abdurrahman@nexthop.ai; a=ed25519; pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg= X-Endpoint-Received: by B4 Relay for abdurrahman@nexthop.ai/20260119 with auth_id=608 X-Original-From: Abdurrahman Hussain Reply-To: abdurrahman@nexthop.ai From: Abdurrahman Hussain Simplify the error code paths by switching to devres managed helper functions. Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 16202fb89271..973463a3a7f9 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1462,7 +1462,10 @@ static int xiic_i2c_probe(struct platform_device *pd= ev) snprintf(i2c->adap.name, sizeof(i2c->adap.name), DRIVER_NAME " %s", pdev->name); =20 - mutex_init(&i2c->lock); + ret =3D devm_mutex_init(dev, &i2c->lock); + if (ret) + return ret; + spin_lock_init(&i2c->atomic_lock); =20 i2c->clk =3D devm_clk_get_optional_enabled(dev, NULL); @@ -1473,8 +1476,9 @@ static int xiic_i2c_probe(struct platform_device *pde= v) i2c->dev =3D &pdev->dev; pm_runtime_set_autosuspend_delay(i2c->dev, XIIC_PM_TIMEOUT); pm_runtime_use_autosuspend(i2c->dev); - pm_runtime_set_active(i2c->dev); - pm_runtime_enable(i2c->dev); + ret =3D devm_pm_runtime_set_active_enabled(dev); + if (ret) + return ret; =20 /* SCL frequency configuration */ i2c->input_clk =3D clk_get_rate(i2c->clk); @@ -1490,7 +1494,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) =20 if (ret < 0) { dev_err_probe(&pdev->dev, ret, "Cannot claim IRQ\n"); - goto err_pm_disable; + return ret; } =20 i2c->singlemaster =3D @@ -1509,16 +1513,14 @@ static int xiic_i2c_probe(struct platform_device *p= dev) i2c->endianness =3D BIG; =20 ret =3D xiic_reinit(i2c); - if (ret < 0) { - dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n"); - goto err_pm_disable; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n"); =20 /* add i2c adapter to i2c tree */ ret =3D i2c_add_adapter(&i2c->adap); if (ret) { xiic_deinit(i2c); - goto err_pm_disable; + return ret; } =20 if (pdata) { @@ -1530,12 +1532,6 @@ static int xiic_i2c_probe(struct platform_device *pd= ev) dev_dbg(&pdev->dev, "mmio %08lx irq %d scl clock frequency %d\n", (unsigned long)res->start, irq, i2c->i2c_clk); =20 - return 0; - -err_pm_disable: - pm_runtime_disable(&pdev->dev); - pm_runtime_set_suspended(&pdev->dev); - return ret; } =20 @@ -1556,8 +1552,6 @@ static void xiic_i2c_remove(struct platform_device *p= dev) xiic_deinit(i2c); =20 pm_runtime_put_sync(i2c->dev); - pm_runtime_disable(&pdev->dev); - pm_runtime_set_suspended(&pdev->dev); pm_runtime_dont_use_autosuspend(&pdev->dev); } =20 --=20 2.52.0 From nobody Sat Feb 7 09:46:34 2026 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 31A1B29AAEA; Tue, 27 Jan 2026 21:04:05 +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=1769547845; cv=none; b=iZmWQJLmwqQvVOnvBrq0fHtmR9SEWY6fG/y830Vx2kS0B8BIpXqdISnBmSsPRDE3Mt2xFSQl66vrA+XEDCH4rpGUqf9QJ0SNIoGBxPVs/Vq5NNimkONNqkYwKffQQoPP7QWgmILC0rxU7K+l6fmucg++/eBo6eboFGRiUveAhx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769547845; c=relaxed/simple; bh=ej605a6zZQZZe+X66wSrKgUfMRVc5y1sH/aNDWf2N4k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jJ29mgs3HctGtj4uP1Psq85iYuEVkSTY29ni7K45O6X0Gw1OygGaVQbU9aA6uzPWQ8lpDd0ZGonekLUVEoHD5tGC+hD0RcZKB0cv0ztzsuAt8MUJpxEchWCr9DOvcHH5EFOpfVD8QP9wa7QgzKiRHy+cu2DpZ9llV9/YyuCBJq4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=f25Meu4n; 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="f25Meu4n" Received: by smtp.kernel.org (Postfix) with ESMTPS id E0B74C2BC86; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769547845; bh=ej605a6zZQZZe+X66wSrKgUfMRVc5y1sH/aNDWf2N4k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=f25Meu4nr+5YbAu4+qzKe8WUc1TowwvU+G6BBXoUovPmHcU/LPbnZ4tCzhZ5JpnBY V0VpEfsPWUWMOBwAQFmIR6CJqOa4eGzKCljqx2p+3amsci2W9Zf7y6hzE74Jt9/DPJ QGaB7C3kMaL8S8eTL7hT5/yKfREPISNd8O7YtmX4sVz1Zdr+8ij3ftyhwOPB6Ki3N3 TV+cLJBOQs1TmsmPWW9MUsVxGJnswb0Bsi0PxMHwBUIbZVVwT7O//+6VYfg7JPJuNV tefCmjWfdAUTsuDzuWRx9MukPNI9VXv4Hsx4xESQVTcu6lmvuEDZdVGGJ/xFB/MygV bDlqbjrhEeVbA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D95FBD2FED9; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Tue, 27 Jan 2026 21:03:58 +0000 Subject: [PATCH v6 4/7] i2c: xiic: remove duplicate error message Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-i2c-xiic-v6-4-e82e2f6f657c@nexthop.ai> References: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> In-Reply-To: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , info@mocean-labs.com Cc: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdurrahman Hussain X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769547843; l=855; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=Qad9qP9qV5p3BTdOEhFWMpn1MKAqkOhCBKD6rPKS91w=; b=ThzdzrdD6qPaVI7taYTjp+E/HSOKbCSYkPxLortCjGK6CmUoYpzD3fy8kMQzm7PAsyZdrdBhX JnuCOlzBG7yBNneuRnAhm1sUftr4ZhPT4xj9Pl26/gyeB02DvulZL3w X-Developer-Key: i=abdurrahman@nexthop.ai; a=ed25519; pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg= X-Endpoint-Received: by B4 Relay for abdurrahman@nexthop.ai/20260119 with auth_id=608 X-Original-From: Abdurrahman Hussain Reply-To: abdurrahman@nexthop.ai From: Abdurrahman Hussain The devm_request_threaded_irq() already prints an error message. Remove the duplicate. Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 973463a3a7f9..95242d39f554 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1491,11 +1491,8 @@ static int xiic_i2c_probe(struct platform_device *pd= ev) ret =3D devm_request_threaded_irq(&pdev->dev, irq, NULL, xiic_process, IRQF_ONESHOT, pdev->name, i2c); - - if (ret < 0) { - dev_err_probe(&pdev->dev, ret, "Cannot claim IRQ\n"); + if (ret) return ret; - } =20 i2c->singlemaster =3D of_property_read_bool(pdev->dev.of_node, "single-master"); --=20 2.52.0 From nobody Sat Feb 7 09:46:34 2026 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 319AE29AAE3; Tue, 27 Jan 2026 21:04:05 +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=1769547845; cv=none; b=H0HcX+nJQiYw3xWwkXDz+ygMgWyKDnDL1FowFHu150yuAEEM96+/FH01PIuz/7b5a4CrQd5clULkBv6Y+2rpUZ4GnAXITpJhCG1fLlDl/C1u3a5DQwcKYMRUos+qPd9ItFnP05PAl9vKjrMZsSKI04jZjkBtl0g2KYoxn1FGGeg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769547845; c=relaxed/simple; bh=0mC+GzegM3NUd5rZ8m6lJrPIK5v+NNpTjHvceYgA79I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=u6BRlDdFINJqnNyiBk1lSUUU5PlQvUFsBoemtPafA4Wha1QRnAfROp283oY6jdWmZ42f8KiE+4OgWfuVbQwhn3bKdHvysNwThNRYxDMDkNgTKoyGlgsIFyBbdg/QUnqoyQHZVf2LYNU/9wFaphS1PTCoBZqhWo6TLiMPsRZ+5FU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l/8NXCub; 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="l/8NXCub" Received: by smtp.kernel.org (Postfix) with ESMTPS id 0727AC2BCB3; Tue, 27 Jan 2026 21:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769547845; bh=0mC+GzegM3NUd5rZ8m6lJrPIK5v+NNpTjHvceYgA79I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=l/8NXCub5YbVJsI13yDNSioZhbp/JeIZiHAIsGfTkq7+QdSpe0oWiw0pJ3AZVA8J3 nXh0JJY1MzPeC67ppIlo1cCbe8fheKluFGLDTXa2bR5SiwK5JO9T6dKHMJ3vaPYXEm jmp73NPUYY1VmhCM+3qfS1breJS5aUYioCmaFnL3OV0lq7vxefzaMyWro95kmO+QR4 ofomzSnNs4Wq1hQJdBzwKhhUvrzLuoPRsxEDDx6a6ut1INw2UztnhCF3+acveSks1W myF3IHj7v4zp0T4n9Kt/znSc/x8g34eBM7nLetNfyWUQZi7VrSACqD1Q849XlBxSiD odiy06O0ltudA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E956BD2FEDF; Tue, 27 Jan 2026 21:04:04 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Tue, 27 Jan 2026 21:03:59 +0000 Subject: [PATCH v6 5/7] i2c: xiic: switch to generic device property accessors Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-i2c-xiic-v6-5-e82e2f6f657c@nexthop.ai> References: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> In-Reply-To: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , info@mocean-labs.com Cc: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdurrahman Hussain X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769547843; l=2930; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=8LQGUBdxo4/y/3bZnRryJsF+5KUiwALWt7Kxrp3rDYo=; b=XBa7Y31qCX7MFBy9/EyxDvq+kUlW7UNEvsZ8Med6ED00xLT7N2SVnYOlLYJMjCIUY12ZUI7vU /PX9jssSgdXDmpAIk05nBUKIqMj6jmesKN23jag5CNyWaNI0RicDMdZ X-Developer-Key: i=abdurrahman@nexthop.ai; a=ed25519; pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg= X-Endpoint-Received: by B4 Relay for abdurrahman@nexthop.ai/20260119 with auth_id=608 X-Original-From: Abdurrahman Hussain Reply-To: abdurrahman@nexthop.ai From: Abdurrahman Hussain Use generic device property accessors. Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 95242d39f554..73fc8f8cb5d4 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -1408,7 +1407,6 @@ static const struct i2c_adapter xiic_adapter =3D { .algo =3D &xiic_algorithm, }; =20 -#if defined(CONFIG_OF) static const struct xiic_version_data xiic_2_00 =3D { .quirks =3D DYNAMIC_MODE_READ_BROKEN_BIT, }; @@ -1419,14 +1417,13 @@ static const struct of_device_id xiic_of_match[] = =3D { {}, }; MODULE_DEVICE_TABLE(of, xiic_of_match); -#endif =20 static int xiic_i2c_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; struct xiic_i2c *i2c; struct xiic_i2c_platform_data *pdata; - const struct of_device_id *match; + const struct xiic_version_data *data; struct resource *res; int ret, irq; u8 i; @@ -1436,12 +1433,9 @@ static int xiic_i2c_probe(struct platform_device *pd= ev) if (!i2c) return -ENOMEM; =20 - match =3D of_match_node(xiic_of_match, pdev->dev.of_node); - if (match && match->data) { - const struct xiic_version_data *data =3D match->data; - + data =3D device_get_match_data(dev); + if (data) i2c->quirks =3D data->quirks; - } =20 i2c->base =3D devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c->base)) @@ -1458,7 +1452,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) i2c->adap =3D xiic_adapter; i2c_set_adapdata(&i2c->adap, i2c); i2c->adap.dev.parent =3D &pdev->dev; - i2c->adap.dev.of_node =3D pdev->dev.of_node; + device_set_node(&i2c->adap.dev, dev_fwnode(dev)); snprintf(i2c->adap.name, sizeof(i2c->adap.name), DRIVER_NAME " %s", pdev->name); =20 @@ -1482,8 +1476,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) =20 /* SCL frequency configuration */ i2c->input_clk =3D clk_get_rate(i2c->clk); - ret =3D of_property_read_u32(pdev->dev.of_node, "clock-frequency", - &i2c->i2c_clk); + ret =3D device_property_read_u32(dev, "clock-frequency", &i2c->i2c_clk); /* If clock-frequency not specified in DT, do not configure in SW */ if (ret || i2c->i2c_clk > I2C_MAX_FAST_MODE_PLUS_FREQ) i2c->i2c_clk =3D 0; @@ -1494,8 +1487,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) if (ret) return ret; =20 - i2c->singlemaster =3D - of_property_read_bool(pdev->dev.of_node, "single-master"); + i2c->singlemaster =3D device_property_read_bool(dev, "single-master"); =20 /* * Detect endianness --=20 2.52.0 From nobody Sat Feb 7 09:46:34 2026 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 374E829ACDD; Tue, 27 Jan 2026 21:04:05 +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=1769547845; cv=none; b=WD9wK5k31wEys8KyJg5ybQq3CWjvwChbDga8cX3hejIQ4Yyh4+d1ciW3/TfKGBFbX9zGu1VBxsqBtFWDl3f7Izvi0H4GtWcPQNx91T9r8tJ7NZwn8pYI6Lsfc9AtiJZIW8p3voUscFG11DWjBPn+IAFjU5EjQmkIgJs1dBabHI8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769547845; c=relaxed/simple; bh=kwaRImWYg42K+aY7Yj1EEUa3493meF935J1y+7q5aNE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KAA1y57itqkfTKIjLu7KirkoBKaIJ4Z704NG5vrg3YtETBMl42vGPruVlvLzKdTqTOAvG3Cqey7XX9201VEAJ+ir235+yk2p3I4xpA/0XFFGAiGTGGPoOV3v/SP4n+JDcGpILxczy7/21+unY7xdyIHKdrvnx3g6FYuNtEkCYTE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TfAJv4nE; 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="TfAJv4nE" Received: by smtp.kernel.org (Postfix) with ESMTPS id 135ACC2BCB4; Tue, 27 Jan 2026 21:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769547845; bh=kwaRImWYg42K+aY7Yj1EEUa3493meF935J1y+7q5aNE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=TfAJv4nE8fTdYoW+MBJT9fGm1hbbZpzBrbP6dLgoAULCsZZ2FDkOJWrmwO2xrqTb1 5kLF01mS4GjhpiGfK2LP1hugMKIRmmSgruXg0EqDBR6Qcp08QO+B5x9Lz5gJndFzDS p7VbRY/IpCZd6t1debSIAGzRs9TaxfmFqcniOo2kX7UtgFH86KvQzZatX0E02O0dlz Zb3ft1L+wssR+UUsaERgFSOr60/mxnkSZbezsUkXSOHmn6o4xtR9bGELHWLS1qgFQj SGopLXiMveQpGRPKoHPeHMDxnhikw/d/56Y494KMYcBDvn19NDNDv9ZUdjPACOQaHS jBtIK6GwzV0mA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 075D2D2FEE7; Tue, 27 Jan 2026 21:04:05 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Tue, 27 Jan 2026 21:04:00 +0000 Subject: [PATCH v6 6/7] i2c: xiic: cosmetic cleanup Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-i2c-xiic-v6-6-e82e2f6f657c@nexthop.ai> References: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> In-Reply-To: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , info@mocean-labs.com Cc: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdurrahman Hussain X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769547843; l=3827; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=uxPAvhcYc0WHWa8oXBzw81pLyTuN4OEMllhdK256H4Y=; b=scx2LdHzGKyO8yUxss6cyX1RD42DlSed1OoAXRJwY7xdnvX8eHklSmU53jl+9+gNj8Y9gk92e z8Eo+TVPOmfBu04dXea51qo0CSR3jb/SI6/VAEbdz3NDQXY8JmNkKE/ X-Developer-Key: i=abdurrahman@nexthop.ai; a=ed25519; pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg= X-Endpoint-Received: by B4 Relay for abdurrahman@nexthop.ai/20260119 with auth_id=608 X-Original-From: Abdurrahman Hussain Reply-To: abdurrahman@nexthop.ai From: Abdurrahman Hussain Re-use dev pointer instead of referencing &pdev->dev everywhere. Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 73fc8f8cb5d4..9b763d8dbe84 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1429,7 +1429,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) u8 i; u32 sr; =20 - i2c =3D devm_kzalloc(&pdev->dev, sizeof(*i2c), GFP_KERNEL); + i2c =3D devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL); if (!i2c) return -ENOMEM; =20 @@ -1445,13 +1445,13 @@ static int xiic_i2c_probe(struct platform_device *p= dev) if (irq < 0) return irq; =20 - pdata =3D dev_get_platdata(&pdev->dev); + pdata =3D dev_get_platdata(dev); =20 /* hook up driver to tree */ platform_set_drvdata(pdev, i2c); i2c->adap =3D xiic_adapter; i2c_set_adapdata(&i2c->adap, i2c); - i2c->adap.dev.parent =3D &pdev->dev; + i2c->adap.dev.parent =3D dev; device_set_node(&i2c->adap.dev, dev_fwnode(dev)); snprintf(i2c->adap.name, sizeof(i2c->adap.name), DRIVER_NAME " %s", pdev->name); @@ -1464,12 +1464,13 @@ static int xiic_i2c_probe(struct platform_device *p= dev) =20 i2c->clk =3D devm_clk_get_optional_enabled(dev, NULL); if (IS_ERR(i2c->clk)) - return dev_err_probe(&pdev->dev, PTR_ERR(i2c->clk), + return dev_err_probe(dev, PTR_ERR(i2c->clk), "failed to enable input clock.\n"); =20 - i2c->dev =3D &pdev->dev; - pm_runtime_set_autosuspend_delay(i2c->dev, XIIC_PM_TIMEOUT); - pm_runtime_use_autosuspend(i2c->dev); + i2c->dev =3D dev; + + pm_runtime_set_autosuspend_delay(dev, XIIC_PM_TIMEOUT); + pm_runtime_use_autosuspend(dev); ret =3D devm_pm_runtime_set_active_enabled(dev); if (ret) return ret; @@ -1481,9 +1482,8 @@ static int xiic_i2c_probe(struct platform_device *pde= v) if (ret || i2c->i2c_clk > I2C_MAX_FAST_MODE_PLUS_FREQ) i2c->i2c_clk =3D 0; =20 - ret =3D devm_request_threaded_irq(&pdev->dev, irq, NULL, - xiic_process, IRQF_ONESHOT, - pdev->name, i2c); + ret =3D devm_request_threaded_irq(dev, irq, NULL, xiic_process, + IRQF_ONESHOT, pdev->name, i2c); if (ret) return ret; =20 @@ -1503,7 +1503,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) =20 ret =3D xiic_reinit(i2c); if (ret) - return dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n"); + return dev_err_probe(dev, ret, "Cannot xiic_reinit\n"); =20 /* add i2c adapter to i2c tree */ ret =3D i2c_add_adapter(&i2c->adap); @@ -1518,7 +1518,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) i2c_new_client_device(&i2c->adap, pdata->devices + i); } =20 - dev_dbg(&pdev->dev, "mmio %08lx irq %d scl clock frequency %d\n", + dev_dbg(dev, "mmio %08lx irq %d scl clock frequency %d\n", (unsigned long)res->start, irq, i2c->i2c_clk); =20 return ret; @@ -1526,22 +1526,22 @@ static int xiic_i2c_probe(struct platform_device *p= dev) =20 static void xiic_i2c_remove(struct platform_device *pdev) { + struct device *dev =3D &pdev->dev; struct xiic_i2c *i2c =3D platform_get_drvdata(pdev); int ret; =20 /* remove adapter & data */ i2c_del_adapter(&i2c->adap); =20 - ret =3D pm_runtime_get_sync(i2c->dev); - - if (ret < 0) - dev_warn(&pdev->dev, "Failed to activate device for removal (%pe)\n", + ret =3D pm_runtime_get_sync(dev); + if (ret) + dev_warn(dev, "Failed to activate device for removal (%pe)\n", ERR_PTR(ret)); else xiic_deinit(i2c); =20 - pm_runtime_put_sync(i2c->dev); - pm_runtime_dont_use_autosuspend(&pdev->dev); + pm_runtime_put_sync(dev); + pm_runtime_dont_use_autosuspend(dev); } =20 static const struct dev_pm_ops xiic_dev_pm_ops =3D { --=20 2.52.0 From nobody Sat Feb 7 09:46:34 2026 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 49D5F29BDB0; Tue, 27 Jan 2026 21:04:05 +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=1769547845; cv=none; b=EWpYnCcXvSKZ1N7L+kcYV3ebWs6vIgbCFxwanJ0pBqiS03buiF78yLb4cPnUK73gtZjWVA75MGoy8yToGOXyfjACBi9MCRb4cY4XQeZZGEsIyJWhVhZMtyTYG2d4zf9EpHnqRQL//8eUXMLvmdMRXihd0o5676EFRX1gD8ov97g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769547845; c=relaxed/simple; bh=eZPY6w3BtKVgEbAI10QJgfb0N2mPTbsUo8V2C9rWc5I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ESRKGUcmtqBFMRY9HwH+7AT2lqn/KzZCbVkt1hS1Qbxg4yYgd5Rlz0bhclvtGF7aHk8hpmgWg933/u0ymuNmZ9gE11EmJUwBavcdtiII7QQPJ+D5WWKWQdTbsAPmlwje10Qk2d/7lRk4+JxxSRuGSXqtIgGJbzCmlEgAtNUOKDQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fwbcEu6G; 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="fwbcEu6G" Received: by smtp.kernel.org (Postfix) with ESMTPS id 29053C2BC9E; Tue, 27 Jan 2026 21:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769547845; bh=eZPY6w3BtKVgEbAI10QJgfb0N2mPTbsUo8V2C9rWc5I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=fwbcEu6GBHbP4+8pyD1D3gPJ65gHZgC8DHwPIAtWGR0QSlU/eD3/xOsBvQxhhGMnm EFRWYvb5LGp3cVSWUrvSE2sjOUKmIcKZDtqFT9d4ixF0SfgiUlEKuV8+eVDRAA+YTw A19LMbOhuimjn5Vq1UrbBHPQ3w0IrOeAD9jhxL4teteKT54110XhnW+6MwOTaQfjeJ Zhemqhieirl/AOP9zp7miI5q59eowHOmNzzOwia4UxrLUgo5TvJUARxtsCXALX+Gcc XI1hE5x8ir8/Rw4JYjdlc14e3uqXesVKjpL2dpfUT1tFoEDKWBiZIUZKuS8DGi1QqR 4jjHZvxguR42A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C5B6D2FEE4; Tue, 27 Jan 2026 21:04:05 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Tue, 27 Jan 2026 21:04:01 +0000 Subject: [PATCH v6 7/7] i2c xiic: cosmetic: use resource format specifier in debug log Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-i2c-xiic-v6-7-e82e2f6f657c@nexthop.ai> References: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> In-Reply-To: <20260127-i2c-xiic-v6-0-e82e2f6f657c@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , info@mocean-labs.com Cc: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdurrahman Hussain X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769547844; l=796; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=J/OOC66/6Sfkv45zHVfl6G0fbEDSnRoOH90Sob9a/M4=; b=z1VOfeSfINJ+Sstk8oOzEEhkqTiF6gN4ilY61XZnUqvtY+JdfITXn0FrwNvt7w5NXQLoEP46x gWmqDw/yDK5CjuOytBGF9I+DiHWVDhrQtAD84j7KCtB7BKY/N1qjOQ1 X-Developer-Key: i=abdurrahman@nexthop.ai; a=ed25519; pk=S+ysnf+NwMcBdHBlyKIUEAtaFGSIhQwcJcgcXhq0osg= X-Endpoint-Received: by B4 Relay for abdurrahman@nexthop.ai/20260119 with auth_id=608 X-Original-From: Abdurrahman Hussain Reply-To: abdurrahman@nexthop.ai From: Abdurrahman Hussain Use standard resource format specifier %pR in debug log. Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 9b763d8dbe84..75b43f469861 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1518,8 +1518,8 @@ static int xiic_i2c_probe(struct platform_device *pde= v) i2c_new_client_device(&i2c->adap, pdata->devices + i); } =20 - dev_dbg(dev, "mmio %08lx irq %d scl clock frequency %d\n", - (unsigned long)res->start, irq, i2c->i2c_clk); + dev_dbg(dev, "mmio %pR irq %d scl clock frequency %d\n", + res, irq, i2c->i2c_clk); =20 return ret; } --=20 2.52.0