From nobody Thu Mar 5 12:58:08 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 C3BDA1F30A9; Fri, 13 Feb 2026 00:15:22 +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=1770941722; cv=none; b=oR5cilXClzw792/2Rxl1IqNYT0Ud/SMXVhMWOZ96XrgYnpM9ZwONSkYTJ+C/7uscrRyfDJGxfqencOAmZP3CADiUU93eAz+A6/aB96DKwzwZ7igYbGVUWaaMs7t4nwpwTSRa71uo39BdQjsegFshwYs+cBlUZuEN1RYxEfNdCZk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770941722; c=relaxed/simple; bh=odmV5niUZmpfJnRwHXoQMD5/apRHKE+2PCyK8AQML/I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OtB/X4rfgKsYJqU60+794YAg1BP0ZuliWkHZ0rr6FROEeX1mWPkOUaT/vzIcAurl5RTmLSX5wLbwPBH3ceNFYxyBjc+lHNdGFSEg+f+qGqyqvviWbm7y1LfkK+dGhlxxtn+r2UqQFSXWNDYmsSmA8ciww8I98vSOQdMOoajY7HA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WfBxamJ/; 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="WfBxamJ/" Received: by smtp.kernel.org (Postfix) with ESMTPS id 7C840C4CEF7; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770941722; bh=odmV5niUZmpfJnRwHXoQMD5/apRHKE+2PCyK8AQML/I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=WfBxamJ/v4rzIhn4fsDBL2srK/hZQamO77VWOl2dssNtaxfNZwa6hdkdXQ4lv6f7O h/i6ZlCQAJrIrfxkS9Clp6Y+b9CY81fq4Wcz++0od31q+ePvk7x933oyE5Ik27666S lI6u7NBOK3SJt9nGDD4e346t+DOsS77tRi0p7h3BzMyGWYI0WvcQ4d8/No5zjSRoq2 pzdtsJYMkSPTMUdOJ84pmI+aRJYsSYMwvvS/hd9H3q/U9aI5+ftD4upcdtwUQTv7IF OcKlMOJutNxNwjC+fMgx5O6WrUNtE7Jh/3rgD4B5DEM6Qf2tDYqH70hCiIhOQMrr4N agJQPU+BHtULw== 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 4BC41EEA86E; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Fri, 13 Feb 2026 00:15:16 +0000 Subject: [PATCH v11 1/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: <20260213-i2c-xiic-v11-1-5d18aea11bde@nexthop.ai> References: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> In-Reply-To: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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=1770941721; l=2992; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=xe5Qq7Si6KCzd0ih/kyZJPCw0i78NqZP8R5Fx1dBPLI=; b=qoaB1lNHbbTdBA5ZFW4APj4o2rrcGUF80x8qghPJ1pqxa0+McQMy5g10+ojZE32jgJTRE4UhV IXoeXoL4uzFAmCBHWCEolwBB3XxjzIcWqcBUbX2CGOUVrj9PwGrEA0z 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. Reviewed-by: Andy Shevchenko Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 28015d77599d..65aa280f6fd9 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; @@ -1461,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_enabled(&pdev->dev, NULL); @@ -1472,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); @@ -1489,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 @@ -1508,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(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 +1533,6 @@ static int xiic_i2c_probe(struct platform_device *pd= ev) (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 static void xiic_i2c_remove(struct platform_device *pdev) @@ -1555,9 +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 static const struct dev_pm_ops xiic_dev_pm_ops =3D { --=20 2.52.0 From nobody Thu Mar 5 12:58:08 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 D8DAC20459A; Fri, 13 Feb 2026 00:15:22 +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=1770941722; cv=none; b=egWodNfchPLPhZqvFjZetdl/lmIMXW+5G20ezJmVIcE15EHLrg6xscpCCPoGpDBnkAHOVtux2rbka4gF7W2lkxOKyKUSFPvp3ud53q6CA0Qv1wpTSg8oSG9y0tgWimPY8n0eNM46VekJqYK7n3hGDQU73TWzkQyIAkZmKNRG72M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770941722; c=relaxed/simple; bh=jRtEYRL116cS46+BRRnEAwVlx/TCGH4biEvlH/E3jhs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ho1EvvvFZYBAqpWOUj61pORdZUy6rOcJN688QGYUDAtskeajtjhvMUI0xRC8UWmq2yo9KqM5svpDLQ8FCHYHBKFDRM/XyPcAt3NyM+TeMNSyyTvgGAJ9gJTeZe/0JRV2UNOQ/l9sbe6M44zmjEKqlK7kQnYPmTajA9y/mJxHp4c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R79jZ199; 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="R79jZ199" Received: by smtp.kernel.org (Postfix) with ESMTPS id 96067C19422; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770941722; bh=jRtEYRL116cS46+BRRnEAwVlx/TCGH4biEvlH/E3jhs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=R79jZ199R60NrZW/zFkZAmS7hgm1H/VaM9Uqy8kJVfgCVWeLjKDVUJjSgZUbCYqjE BYl6jMcqQ3n00NWP3Ni8h2NIiHOi1iTRUfU5lKz79xfnd4UfscsHZTnYlDszY23pdQ 6+yHN/x+5OeQJSsTrhOETHYpz+chEnf9E7h4ak0fk3bM7wRcqGGHIH72BfIUPPzyqC PrXQbQQTZT22gMM+c7C5bcB57c0GpuA8KnDDpgDTjMCHTGfo3aRT8XOisuXpzVFXUU YjuISzPLa/If29oyOO9DPBmgW//YN1ear6bevVRVXJZyi4jNOiwQj7DiTfkD+Z9aQo yJxs3rSnaYjeg== 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 5ABF1EEA853; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Fri, 13 Feb 2026 00:15:17 +0000 Subject: [PATCH v11 2/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: <20260213-i2c-xiic-v11-2-5d18aea11bde@nexthop.ai> References: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> In-Reply-To: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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 , Andrew Lunn , Jonathan Cameron X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1770941721; l=1019; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=RRuL/bQeZiBpUR1djYETZjT+qDSOpjJwtLxb+GfrByQ=; b=tQZ8gIzWOuUdSWIA2TzaWKq9q69SdwtT0IEDY3cSzazRtZNGQE5W0tD8wE+gG42Jcc1okv+2z f9xApkRqye+BeZjV3kayfunZwOXR8d9hnDM1aZc+oWIOaKD36ktZbJ5 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. Reviewed-by: Andy Shevchenko Reviewed-by: Andrew Lunn Reviewed-by: Jonathan Cameron 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 65aa280f6fd9..99286af2a0d7 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 Thu Mar 5 12:58:08 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 D8E0520A5F3; Fri, 13 Feb 2026 00:15:22 +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=1770941722; cv=none; b=SQhLncfY6KcJqhrhGnjCdF8VKzLVD8UmR+lyA5q2jZIJIekLQ6mPLnN4yigcxuj+7B5KPusj/zvHy8YeI4yp3IcD1ZkPvJjoV72fLKv2dcuWvRvQW7+wf3CV2OnYL+d6hnboQ4LjGNAfyx+0p7p06j2RvIjkyMxVEaHeexn0fxE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770941722; c=relaxed/simple; bh=1O5PUHoxxKw2p2akHouHKG8Ft1fJjx6WgY2AUN8BMsk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r0Bfh30TPpalM3g7v3t3ZV/dz8l7gvzQrtADIvEO6qQgy2hJIOi1gzXaxAdAMlYEYFaetDFTWw6YPoHD3VMssmVceBk9FbIYS1usS7E0gAW1r4RhxgePvR3IHyfqsuL8sOAmVuOEW91J/yqgdeUOURpFGGVZLviXbXqjke0UsUw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cGv1/1c1; 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="cGv1/1c1" Received: by smtp.kernel.org (Postfix) with ESMTPS id 99F50C2BCB4; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770941722; bh=1O5PUHoxxKw2p2akHouHKG8Ft1fJjx6WgY2AUN8BMsk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=cGv1/1c1FeTIsd8AhaT60lWIlSAF25jnI+7XzAuNf/cWVzIFPXn9Tjh0vJi48ICan eww5DCdknKbWc7UuL7sVk4ruByDEHMKkgvVtKSOcvMhdRIuWsHWrlOZixRWwwFlEj0 Oia0TJJ8K9+mnoO3fROy/DfpzAq2LLVNC7ufHL0s6oeVrA7wcHbE6GAxP9CWWUtz7f v2kHsv2mcPNtIOGYVeoOhGvdE6HnqISqql+ZQs8omxxVxYQrhK205+E9Oq3dZvwzlR hpTTz8anbTtxTgpngMeXri+i3EDQD50Ahu9ZS5P+f5IYpVv+zOM5f4RrBhSmTKpZ68 i9guB9+VdOj2Q== 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 6AA6CEEA874; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Fri, 13 Feb 2026 00:15:18 +0000 Subject: [PATCH v11 3/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: <20260213-i2c-xiic-v11-3-5d18aea11bde@nexthop.ai> References: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> In-Reply-To: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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=1770941721; l=2990; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=yBdDm5XrgiTYSbdBCd79of4U+CAq6rfP4gVjghqE/40=; b=4lq0ZYKflgaUHW892I78VJy+aDQaESTaz2woz9nszG6HkhZtLaekJ/ITyFI/3mgTPi0MJWowO eQUM07sSzCtCDSkntmEbWyu+81RtnlXFusHnfNQC8mH8WJyMNhZbHpa 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. Reviewed-by: Andy Shevchenko 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 99286af2a0d7..20cee7b6200c 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 Thu Mar 5 12:58:08 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 E621B20DD51; Fri, 13 Feb 2026 00:15:22 +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=1770941723; cv=none; b=ld5MeC7oBAC9LaBqgeoSqxc6e1ue71QBFogVp7KvEqXWE3MqJvHND5HiLOsvJ4S9HXr/mBv8DLRQMoeUW+l6utVbG3+3tyscxYRvpqHwFOeZTtzz6tvyGM6VpgOmFv6pIApLC1YsmsKtC6oJ8PBHRR3/apHY3q7zXr35xIR0Ne8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770941723; c=relaxed/simple; bh=0cagQQWs1EQdChAxlxHuUUZ51gQ+OoWY5PxjVHvtV3E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=f5uRSkCvQ7dWM/1M66xRBTSFACG1w253xbXwAsR01cm7vo7FSlAVJjOD7YMOmO/klhIJFjEzrVsxHXGhsOrcy76gEiyeo1u8LYHYJtGk70BtxoyzBG1fLSwCnFGCHynCRSXs1WlYTtR1g00aYoFZe2dgMpxfSNb24pjVBH6OnKc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dBJgHY44; 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="dBJgHY44" Received: by smtp.kernel.org (Postfix) with ESMTPS id A3D0FC2BCB3; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770941722; bh=0cagQQWs1EQdChAxlxHuUUZ51gQ+OoWY5PxjVHvtV3E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=dBJgHY44dTIuOY9xXALHU9Y/QCqRKAHspXUjwHRr34EaF0+tLS9UWE8A9PreFAjpO i6BL4QzyR407nVAQvGJ/cuaNur5mEI/Vfg3x18glhy66hsmNmTHPfgkdatH8R1UkFd R2W7GTTkbzhrAC4ki0qFWNcRIu+xktyeSuxDWVfGw1QTgesnYgSFkxrY0J0eGkB5Se qqLdoDEz+A1gSfei/kDLBT1BiEJzOcwGlbVMrdA6meoB6xww1v8BAVYTD9xDTfbUp0 /cuHwEu+EaDsqes3AOgKlSt0zf/QjAAnq7z//oWAzoewC44ZTOQNDNGvJFAjmRaMnC 2aOQGCwqkVDYQ== 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 7A4A6EEA872; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Fri, 13 Feb 2026 00:15:19 +0000 Subject: [PATCH v11 4/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: <20260213-i2c-xiic-v11-4-5d18aea11bde@nexthop.ai> References: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> In-Reply-To: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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=1770941721; l=2969; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=4goe1hN23ExSd3bXmlNyi4c8jVT0rjfLxvQAv2IuPoE=; b=UG0j3nVRP5W7SvnQm4//0ani0A3FVvsGWRY67oVUvfCso0Nr4yMGnTlpamwnzNcgayMcWb+rV 6iFLUqzfA9tDd5RRgCfjO4tJxV4JbKRkZ2+2ER1kRMIdW8v0y/iOHjG 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. Reviewed-by: Andy Shevchenko Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 20cee7b6200c..377fa5948c3f 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); @@ -1467,9 +1467,10 @@ static int xiic_i2c_probe(struct platform_device *pd= ev) return dev_err_probe(&pdev->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 @@ -1526,21 +1526,21 @@ 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); - + ret =3D pm_runtime_get_sync(dev); if (ret < 0) - dev_warn(&pdev->dev, "Failed to activate device for removal (%pe)\n", + 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_put_sync(dev); } =20 static const struct dev_pm_ops xiic_dev_pm_ops =3D { --=20 2.52.0 From nobody Thu Mar 5 12:58:08 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 277B6220F38; Fri, 13 Feb 2026 00:15:23 +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=1770941723; cv=none; b=ofZncEOuu3OHr/BcKFLONk7gKWoZvoJoycAhWf7EOZcA7Gg4Yg7aP38jJNeMiI08/62fIFZJvRD0Trvjt1aWPupDesJEdCgvu6VS9UI7oDkCNx50nHZyCzUU5ImbE7vFW5Pt50uVz2ckeYNzl7j3lOiY/NVZJOm7gDg7G3z8b2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770941723; c=relaxed/simple; bh=kbn4C8NgmoBQzHsuwllEDpxc5+yBJkccQL4mCYwFGbQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s4MR4k79/gp0lAkoNqDHJ31Kunf/KTtwQYX8kaquvwtoEDQsk4CaPHAe8gCeq0BHcDMjMqDLG8zNE2isBJIzUjk+6kTeu0bx/RjZUeIvm4LCxVmr8RrZd4vGWpRcrk94/+23VarJiW11Y/km0Iv6pUAjcja1Qf1grp81u/s2mbo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SbZSLlWB; 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="SbZSLlWB" Received: by smtp.kernel.org (Postfix) with ESMTPS id AAC8EC2BCB9; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770941722; bh=kbn4C8NgmoBQzHsuwllEDpxc5+yBJkccQL4mCYwFGbQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=SbZSLlWB+uyZw+umSQ1E7KOTp6lxAGrm9eOjJprTjFaPi3I/n7D9+g6JMVPuURren coNhVEii/mxACikNsM94a3jjGRf6m5nf/uVjwDaRUXEtVxU7bg148E8usVtdUQ3om0 HdccU/9vl9YwuVs0zihcgqjta67Jbjv/iJx7CIWvvNA782toE9Hcox196TGgI2rV19 abaPpM3CmK6bVwbOtbIR7zXdGO4ucAB/6Y6/KzZezSWb0hB6Qm1sIuhSlpqD1vD4Lg dlkZtokY6VX2vtwu7/N85ifQD+HGfjF5q7KFTJibW8vd3As/JAnIfbzK/cLqydwIoK PSTns9qdFFh/Q== 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 8DE75EEA876; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Fri, 13 Feb 2026 00:15:20 +0000 Subject: [PATCH v11 5/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: <20260213-i2c-xiic-v11-5-5d18aea11bde@nexthop.ai> References: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> In-Reply-To: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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=1770941721; l=861; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=58fg1T38jFleb0swh741hN3S1SY1m1FGjswU0Y+gW0c=; b=nMJ+FAm5Y+DoCJAmk4Hyhfjm9uY2Br2aFcy0WDdixEHQkgFc+mbox3jTU66zde0Nb8+Y1TGzV ah8gaUDKVL+B66m71/PXFzLFcOhjIRENGzKBZbGw1Rqt7lMlnzpmwgj 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. Reviewed-by: Andy Shevchenko 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 377fa5948c3f..373c00a93034 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(&pdev->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 0; } --=20 2.52.0 From nobody Thu Mar 5 12:58:08 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 073B92153D8; Fri, 13 Feb 2026 00:15:23 +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=1770941723; cv=none; b=HsVUwGf5ELbTVnTNZTuMz5CS2oHhEN+3G4aGijB3kFBLvndbncRchMyDGDtTE1ZIh5dfjz4oBwxWP9JuzvdQ4vNKMA/B8m8a8sOWzKb83aIqpIkZCRG/MtVrpxisD1fSNdoEwIfRys+PrwV12U6AQpzgC2gdM9/DgTY7bONzitE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770941723; c=relaxed/simple; bh=i0It30sqUuBb6w3dSvN+K4xAmB3+vRycrDLUAHCmoR4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BYP8f8TSIoDxaLjTU1bVnIG3Dr0iuuq3KrKG+ed6Q87OjNx4gjL9TAPW427avqoQkdpjaq3364BqF+tUjk5E5XuLOi5ZozAGKFv0/xPP5WZ+PjSc8z+ReXgJ7iaOQf8JLDPpbisC/7tzdFsRQdMctlZokLJa1bmeY2gEkXaqruQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O7w81c0V; 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="O7w81c0V" Received: by smtp.kernel.org (Postfix) with ESMTPS id B6355C2BCC6; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770941722; bh=i0It30sqUuBb6w3dSvN+K4xAmB3+vRycrDLUAHCmoR4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=O7w81c0VDV7ngVKI/feWUryR8Xc0UgOHb0lphOG17ufO3BtdP9K8bS7JzCcPdMBZU ATTHBx7x9fXidcm9PJWsteQUW/LCNCee9YQfeSTLS+RQ6oqvpq9aSseG2knwZcgx3K j8aFevf7ng/YG6aUSr7MMxqMLSMLxLJKBYyasYUq8fXezAIJCPM/1ae8Y+NOrush2R AGNo5LwAyrTfDRdsJ7o6seBgGVQOjYHirbymgofcQWotfWGOaTtGd8BXCqAHpM7aLo ofR4jHhBOSob/5Z33ENZw/bgi4Ypcs5SYqsMgeN2G9tVFf2zDTSCIxU5pWIFAr38Hx WIDm9WAI2hUog== 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 9EBF8EEA875; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Fri, 13 Feb 2026 00:15:21 +0000 Subject: [PATCH v11 6/7] i2c: xiic: use numbered adapter registration 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: <20260213-i2c-xiic-v11-6-5d18aea11bde@nexthop.ai> References: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> In-Reply-To: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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=1770941721; l=1381; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=OcfhhTnF0WtrdPeWNqGBAVD1c0SVBN7KhRbWFtUKE0E=; b=x96Wn3uuPvc410bLRuXiGYkplzRWuLttTyJI9nXHfMJhzJq0/V8kNe6hltjxFJpDfsYODUu3l 1BQHVyRnVcIC4Q7VgvNexWkyQetdFE+JV1WlmRrA5BzmvIrAve16DsT 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 Switch from i2c_add_adapter() to i2c_add_numbered_adapter() to enable platforms to specify fixed I2C bus numbers via the platform device ID. This allows systems to maintain consistent bus numbering across reboots. On platforms where the device ID is PLATFORM_DEVID_NONE (the default), the adapter falls back to dynamic allocation, preserving backward compatibility. Signed-off-by: Abdurrahman Hussain Reviewed-by: Andy Shevchenko --- 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 373c00a93034..2ad75325154c 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1450,6 +1450,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) /* hook up driver to tree */ platform_set_drvdata(pdev, i2c); i2c->adap =3D xiic_adapter; + i2c->adap.nr =3D pdev->id; i2c_set_adapdata(&i2c->adap, i2c); i2c->adap.dev.parent =3D dev; device_set_node(&i2c->adap.dev, dev_fwnode(dev)); @@ -1506,7 +1507,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) return dev_err_probe(dev, ret, "Cannot xiic_reinit\n"); =20 /* add i2c adapter to i2c tree */ - ret =3D i2c_add_adapter(&i2c->adap); + ret =3D i2c_add_numbered_adapter(&i2c->adap); if (ret) { xiic_deinit(i2c); return ret; --=20 2.52.0 From nobody Thu Mar 5 12:58:08 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 37E62221DB3; Fri, 13 Feb 2026 00:15:23 +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=1770941723; cv=none; b=V09UMHOMpdPbSGMkpazvMD1zKzOY1QiQmn45fY3kaenq80tA1pvFBAj0lmWVhnwZVswWqjOMEPcVcZRLbyWv5eydE0Nxg+pP6UGDoIW0wgm/fGMT3kaZxaD1Ke4vJPRbNdFDvIf7Mo9Ab0nkIiLQZaTv36SinaLURmiJ8xIWvpw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770941723; c=relaxed/simple; bh=ktFNFyYb0Uq2CP/YIDJw0JUiqxN5uUvfLEqzzvmbA3E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ik/S1KstLLKEQzW2+lnUHxtk0zdR7IRgAcvD0QtMM3PPb0LuY12kJgyG6Wvz6r+S8Jf7LFX8z1nwEapM46inQ5P+702vW7/SCZWZBayeuBtNWCyxLPIgo2sVzoQ9dj+mvyvL2Jmaw4O5yGAuyBLzrArOkAsCDLBc2VYT+oZjgZ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CAJLwPxy; 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="CAJLwPxy" Received: by smtp.kernel.org (Postfix) with ESMTPS id CE593C2BC87; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770941722; bh=ktFNFyYb0Uq2CP/YIDJw0JUiqxN5uUvfLEqzzvmbA3E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=CAJLwPxyAGpEnyCJ9X50bSlJsJO3Nrm35GPhgvgTmZYRLKeuBlNlfJEyoBGdf9np2 Dgph9pWF1BoPcs5oNxn34F3caf9t4u2Vn4NT0bq3Rv7fV2tuFvzd8yF98pF6Tx/c/Q ZN3E4fdpcAl3x5sOIO4Mnm9SBDWyHEbyQ1+nPTbVd4sPxXCBkgkxMFZtOf1FY9zXo9 PvI7bEyX4EON++iWHHC30Csd9x4NzbAoI7bubt3zM0nQFa+Jp34iFMoGg8Nhga3Lx2 L0geyFIzswShUKC8ksHIsiMnkRVxvXmXs+WyEul4MwySsn9TZnrUTevowrL3/Aa0OS rCVlNvwb3N8FA== 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 B0C8CEEA870; Fri, 13 Feb 2026 00:15:22 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Fri, 13 Feb 2026 00:15:22 +0000 Subject: [PATCH v11 7/7] i2c: xiic: skip input clock setup on non-OF systems 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: <20260213-i2c-xiic-v11-7-5d18aea11bde@nexthop.ai> References: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> In-Reply-To: <20260213-i2c-xiic-v11-0-5d18aea11bde@nexthop.ai> To: Michal Simek , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley 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=1770941721; l=1203; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=QbeCuGkKnN5h5Ohu93cG+bcDU57NUhxnJ+h/cgz+Owg=; b=ahPuuoyzgNrgiZHMsSNPsEPM2zxawKhDjYIy/l9O0JPv/Ev49NxOdwFTn9/lny7oLo4UvcqxH zT4VbTBiRoXDz5uZTAcdIDQ6cpd7w4vE8i5UWT7nKLNyZeOyhqMxJ2t 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 Currently Linux does not implement ACPI ClockInput() resource to describe clocks, unlike DT. However the xiic driver is happy if something magically enables the clock before the driver probes, and does not turn it off again. The clock should always be considered optional for ACPI. Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 2ad75325154c..e5574f2d97bf 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1463,10 +1463,12 @@ static int xiic_i2c_probe(struct platform_device *p= dev) =20 spin_lock_init(&i2c->atomic_lock); =20 - i2c->clk =3D devm_clk_get_enabled(&pdev->dev, NULL); - if (IS_ERR(i2c->clk)) - return dev_err_probe(&pdev->dev, PTR_ERR(i2c->clk), - "failed to enable input clock.\n"); + if (is_of_node(dev_fwnode(dev))) { + i2c->clk =3D devm_clk_get_enabled(dev, NULL); + if (IS_ERR(i2c->clk)) + return dev_err_probe(dev, PTR_ERR(i2c->clk), + "failed to enable input clock.\n"); + } =20 i2c->dev =3D dev; =20 --=20 2.52.0