From nobody Sun Feb 8 22:00:56 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 0F61B2765DC; Sun, 1 Feb 2026 02:57:49 +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=1769914670; cv=none; b=C00K/7vrQvUwkkAEpm9ouN8rrHEAciZQQmQN2UDrtS8qy0MFqIqqF5ZqNgAoiUjLMgEp0KbPiRQsw21Ud8MrXqCYbnuO9PHKY2mJ2s/9cttSDoqVyROgtlxCSmF3SLvsk5qcZ/NelbpVvAzgqCX0lvpIvYKXJPhhJpbsxZ11HBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769914670; c=relaxed/simple; bh=wzyK5C+7gEBOnnJZjSZxVGWBnuD0tO8LwZHYRLn2itQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bh3ac3KJxDjVpPajK3suHbMolPzPCsyavsxwkQd6xZM1Hb9GPimZ4Vj1FSecm+CGoSTzmzUuAN+v2CCiW/CpPalIb/XwcgWw6BgUYCxKr/DwusG1OdbPK5GHZV7OqXeZtxRsUCODD2IPua+qQ1xoDGp4d/idITljq9lDkRndAuA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aH+dxqWH; 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="aH+dxqWH" Received: by smtp.kernel.org (Postfix) with ESMTPS id 90538C16AAE; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769914669; bh=wzyK5C+7gEBOnnJZjSZxVGWBnuD0tO8LwZHYRLn2itQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=aH+dxqWHm11+4fFKTK41QTxPFoArW4d8v3DM3TGVAx/XppTfQk/TWclS65gx+puDH gFMxTT8e6o/D1ajrOAuZ1rdp/qx8pbQYPsVZDA+3OqWrFyw8EyFWBT3VSBKQfvjHcV rXeLJy1gCSCeE6TbQY3GcuKiFQId7A3/Q82XHqxK0tCZd+z1XMz0w+xnLvxonL4f6S Uk9FZcdkl9P9VRCxvzMPewIkqYnsVZYMSAl7dv9eYwZW+IoTNENEfjlIhIqO+YGIyV jxkJJQxSRIwSRdNLRcxERaPmdBGmJxg58gzJBQQSX74vdki2EJmy30Cq8So8kON1ao vkVFmwrktvHSA== 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 81666E7C6FA; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Sun, 01 Feb 2026 02:57:45 +0000 Subject: [PATCH v8 1/6] 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: <20260201-i2c-xiic-v8-1-deb2dd158d1a@nexthop.ai> References: <20260201-i2c-xiic-v8-0-deb2dd158d1a@nexthop.ai> In-Reply-To: <20260201-i2c-xiic-v8-0-deb2dd158d1a@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=1769914668; l=2947; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=W8zDDZw4EUzfrNuEoTOo05XNo8J4+DIsLswOSdxs308=; b=p/N6DbFWEE5maPZuVxaN7e+LkBE3NszZh9rGTh5MgaS4i18YtRnzrW6H59VIr4fM7bdUYnBAg Hees6mWVXYcCL7TgXlaSVp/YnM/yOStBi12dnRofnw4HCCSms40lBUQ 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 | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 28015d77599d..16ff83fe280b 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) { @@ -1529,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 @@ -1555,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 Sun Feb 8 22:00:56 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 0F59A1D516C; Sun, 1 Feb 2026 02:57:49 +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=1769914670; cv=none; b=a+tCK3Cq1XoCKNIbCrXHoOtYW8U7psR5shnpgScYlda2XEaLCClQ/pZrlnQ9H9Sm9pm+zLST3291AWLtDiMEIppNs0cRE+IrOEA08x60lyq3LBdruiTOKEq2im+MG3Ef4eOUN/3oolP/VtchLJRY2pM7md5o/aJ1eF01WohD0Qg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769914670; c=relaxed/simple; bh=9NOBASfi7anGmRe6t5aBWM/Ma9uXjL5J+KNCF/CduQY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iyzh/C8arKI7XXPoqG9BO4xLvHVwys3ohBSVmflfyu9imTR1LcQwulPuq2oZmxl+KVrb7PpDXjnDMi2MoUxCv96o/KxyvDVfWB0nvhoQvDBc+bbkz2fjgQXF2fvDJM2gvLD6aHDG7vspch07MhSg3kbu8C7Q6xZPgPAn4dskXWQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ch+UWzhD; 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="ch+UWzhD" Received: by smtp.kernel.org (Postfix) with ESMTPS id 9BEF4C19425; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769914669; bh=9NOBASfi7anGmRe6t5aBWM/Ma9uXjL5J+KNCF/CduQY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ch+UWzhDf78qlanIF0PEOIusqzqNphAaFIjlCi2NblSQR+MqV2393i4H3siKqyzXt iiS6BPmIhAFUnyR6lvvuBdah3V46BzSBOkzNQb/lJ/fHl21g7FRjBv0vr0pX4k54Vy sgQf0xBrp9IN5Sk2kqzoiofBxqm+8OSNOoyqxceF+zd8yYd5q2zxLniqLhH5aipeS6 rj4QJMJR6Lq8o8vc5zxrYTccH7HLR3onvJY4BNji9Q5lYf4PDL3sgIgoAO71RE3bWw 74yIFu2VHqzQOECkbyEU8Xd+eNJdM2HXsC2qjesAbePR4La2cK4xd62tqMpPVxWIbr NszzswvKqu2Sg== 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 8EF03E7C6FF; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Sun, 01 Feb 2026 02:57:46 +0000 Subject: [PATCH v8 2/6] 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: <20260201-i2c-xiic-v8-2-deb2dd158d1a@nexthop.ai> References: <20260201-i2c-xiic-v8-0-deb2dd158d1a@nexthop.ai> In-Reply-To: <20260201-i2c-xiic-v8-0-deb2dd158d1a@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 X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769914669; l=958; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=KsvKdIRhjvHhQgBTA+p4IEJ0A4qmuGyZ80lYOv0Q75M=; b=jd/wtI4XcKWtX0DFlQicF7gbfS0dX94kiSKWbUxeGbFELWapXw+D1Mf9HF8oIMQWf2VZqs7XS 2bWIxV7yXNJAsPTcqZedvHcormUzngmipJfduhLIzyY7yZXQn7Q+v7F 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 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 16ff83fe280b..4cb7c40fb565 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 Sun Feb 8 22:00:56 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 0F6F527703E; Sun, 1 Feb 2026 02:57:49 +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=1769914670; cv=none; b=BAhxgiZ7HH3YWkOHOAfqAgLe7/LpkuFYvDpazHBWtNGKjjhDc/dFBNFxXva8D94nGrsqoGtlGPH6aiY1aYevVAz60tojz5+0uCYJkshWaLoVDF0CYUyMjmDLnHrYLSN0uYzcadGQpoeYWvWK8LePnds3ZI7HXeZggrhCVosVZ5M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769914670; c=relaxed/simple; bh=DPRlDntlu0iKeJf/CMopdHlJpBQ0BaeVB92s+jp4gPI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HruODdmRHjvbHlHevQBDXwbBk2I2ogmOi9wbSPS72nn+4KjkS3LVEbcUwGAF+r3yPtuCpuD6eh6tsI+9nXdlhEJWEwHCWo49Sh/kjBfS9XKX+ouPETLVcY79NI0RvAcxZ287DWYnEchVi8jmTkVqtcVswICfG2iwM6u+T27hhDo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FKxh7iyR; 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="FKxh7iyR" Received: by smtp.kernel.org (Postfix) with ESMTPS id A97CBC2BC86; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769914669; bh=DPRlDntlu0iKeJf/CMopdHlJpBQ0BaeVB92s+jp4gPI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=FKxh7iyR7D9lhg4ns0iWPN8O5qhnKIQOVysEW/62tB+3ecjGl3Ec2ozcVKuLSOXe4 xh3auK7yMw4Eil/gGpOQt6wTpEie5EOog0aXIDs0nBnzirDzlYEic/vgd854OBEi12 E8dynW+49ZVK1JzTUEh6vGSSQCCanUqW7mOw4heIsKYuYy1R+eyaCeTri/tccl9tx+ eJYFTpfYREPSVFuWdoyTygr3A1SPbNIQBtdIL0IwJwqUuq8zuQgPrnSPraux0kXK+/ fb4h4gdKB1d1Q6zx4QEeB+2aa6XtSIPAxWqWCMhcwxKZUtQPJRILJtdd+wzquQTiog eJWetd1lWZ8cQ== 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 9C206E7C700; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Sun, 01 Feb 2026 02:57:47 +0000 Subject: [PATCH v8 3/6] 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: <20260201-i2c-xiic-v8-3-deb2dd158d1a@nexthop.ai> References: <20260201-i2c-xiic-v8-0-deb2dd158d1a@nexthop.ai> In-Reply-To: <20260201-i2c-xiic-v8-0-deb2dd158d1a@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=1769914669; l=2990; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=k0KDwbzoPFBnih9Js9Y0osMzTW9DrweWovD0ZQMqow4=; b=9QK3n4xDxPCCGVQIQogLIXSGJbFaJCFjZelv2gLQLjorQI04tZVschebjQVIAj1k5wS3FlWms NTSxcd4uLpnDCb5YssPHC2xqnWIoY6p0GDQxe0Wl0MDsZ5aXeDOY5VV 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 4cb7c40fb565..60d417a2266e 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 Sun Feb 8 22:00:56 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 0F68D2765E2; Sun, 1 Feb 2026 02:57:49 +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=1769914670; cv=none; b=jEwMSDBaQKVXH4wZ9FKgGHFTbsvUNs0LfFfv7TOtr0vC3htPVoOtpSjXu/2EDoCiWP0yYNMwns7UqFhe+H80FjLN2/XHg+gzJQN5qVGRZ+IU39srtYI1kbiKV1KHqYOcvToLC8voLf4cebkOKOjufUYThO+fKwJBwJRngn6W28A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769914670; c=relaxed/simple; bh=ugDygz0qVdmsbcTdFWbuswSCWn9br13ntREyF3InP/c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y5xUZteQMo56lQ4Zpsul+xUHWRl0JLxI9Iqnk9AhdWeFEUIAp81pIzmQrIZ/Uyxr82kc380BdzGvGmfA5Vs4wQgYdWJeynJBEVUzKHPu9lcfpaBvtlD+5gNw6BIfHQ0quy10kCxY5KBXdv/tp9EQL4mt2zLxSN421VxkavmtQeQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cTbQXrWH; 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="cTbQXrWH" Received: by smtp.kernel.org (Postfix) with ESMTPS id B91BEC2BCB0; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769914669; bh=ugDygz0qVdmsbcTdFWbuswSCWn9br13ntREyF3InP/c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=cTbQXrWHAoH4BjoZXD2ScYs7Cm4oPKg2oFrqWf7ocYHKRh0n+DrDKGD2Yc/764ucq YmI4FXi/HWpNqVVftAjoDT2fa2C37vVDHL8Y+etKmpdkie53VhuASZLlkwfzxorjN0 rxhlqJ3d3lc2qH/MTO/P3y+YEiuQ6y5s7z+oGLFOAkfzKB+uWLM+PUqZTIt7TbDzG1 L45NOBJF81/2kNCLwdKDVXHpgeVBE9p0JIiy0Ufw09qQpVedWz1ndoVSja1SWisFZb cj37LWeNdNIiIn57nJlsXKnK53w8Va8CYkn7Zdhzs3vfdmhcUgxDy5PTQYFFXRmCND dRjPSW4rzyFwg== 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 AB4B2E7C703; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Sun, 01 Feb 2026 02:57:48 +0000 Subject: [PATCH v8 4/6] 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: <20260201-i2c-xiic-v8-4-deb2dd158d1a@nexthop.ai> References: <20260201-i2c-xiic-v8-0-deb2dd158d1a@nexthop.ai> In-Reply-To: <20260201-i2c-xiic-v8-0-deb2dd158d1a@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 , lkp@intel.com X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1769914669; l=3443; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=iFHWDA6KCjNS4YMWFCoKQi1tg6+l2S/4qLGRhTF6eUM=; b=ye36LgLNw0g0MYpneO8TslHgN1/HMwNzGtYIP2WaTO04ZddPsF7ghQUJQ6yn1RBhWPjSrVh3+ NjJ6J6JHXSEDj1UAD3Ik5vnDOx9OE3ILCgojoWwD8ldAl87pUgsx/UR 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 BCC: lkp@intel.com Signed-off-by: Abdurrahman Hussain --- drivers/i2c/busses/i2c-xiic.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 60d417a2266e..9880904be7ed 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 @@ -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 Sun Feb 8 22:00:56 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 357EF2773E5; Sun, 1 Feb 2026 02:57:50 +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=1769914670; cv=none; b=FNfWn5UgBF0cMH3OE0ayFvcfQDoToQ9gTEOWQUznQmGtmYW/bwl28YfyCGDmX3KzPN1T/45SLr5MWcRqlj1HNecx3eD5yoKQ2i1NtPHOT1aV46CqfXxMdKwi6TmjMktYgQlMRrD3QCD/pvF2dshlt0Slf3bQILPBwxBhOIPLDN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769914670; c=relaxed/simple; bh=kMjFZURa0+pQpBkA+HB6v9Ku88nudmFkiQiqSOAUbrg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B5f2TM3duUQc6NoM+sUgQuNrrUHs4wLiZWnpo9/vC0oYIDxyDzyA3GAy76TC8XQNxYAI0gRqWUIY1Iy5o9N0NZvL7dvYUTDNeCzGf7JwuX10X+kpK2mpG6NzIa5hpFKfVKHgJbJZWom22NPDpKHn0fxfMwf5kPSKCm0TYKh3JNU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UDIVeiEx; 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="UDIVeiEx" Received: by smtp.kernel.org (Postfix) with ESMTPS id C1077C2BCB6; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769914669; bh=kMjFZURa0+pQpBkA+HB6v9Ku88nudmFkiQiqSOAUbrg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=UDIVeiExEg1dOp4tvnhvsbG8kaNBEzUSYlsauKYypSrBoVOVq6EAwpOaaf8OZncyc ztS4ycLy103Dxb1Nm7TrEuWJym/nkvF76vXP43UK0dYF1Z0zvUYQeijtqPsiiPbhyf qD1PjjCLeytxF2Yuxv2jVb5be2yewpB/ToCP0h9jLV9axvGn4t2sJ1K/S/wQejERrk RbJxyR1oPqotfmtx56jy54VACdRoMR9rHPthzAtzMoMBNM10NRpl9Ngu/sZX2RA8LJ qXJ+rxFQzrREwqHOiSuI6RvUYtNTVIkHggwVUZNiorPgkJOiXvHa7WF8x27DYQ1PZS +aTDeQwyGgDcA== 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 B8FFEE7C6FD; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Sun, 01 Feb 2026 02:57:49 +0000 Subject: [PATCH v8 5/6] 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: <20260201-i2c-xiic-v8-5-deb2dd158d1a@nexthop.ai> References: <20260201-i2c-xiic-v8-0-deb2dd158d1a@nexthop.ai> In-Reply-To: <20260201-i2c-xiic-v8-0-deb2dd158d1a@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=1769914669; l=856; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=r0phdJQdTs6GZ5RebcyDWbMdSSAKH6LIKg98MD7xqyI=; b=AigRR2fwVephOyiF2MFRtLe83Cakdc3okvQuTxnkty6tS3KjzFzcHHIakLU1MflawVN6CTvr6 GtdVSB3Wmk7CPtf1FRQmUQGGbBZqzrpbdJE86j/IjUTFB4K8eEyLbnN 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 9880904be7ed..b8439b78d1ce 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 From nobody Sun Feb 8 22:00:56 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 39052277CAB; Sun, 1 Feb 2026 02:57:50 +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=1769914670; cv=none; b=j4jggA7x4Z5NAOFMUyMi3YRSL6Utpi7n3Dk1boSNk9VV12gdtneyBGAEU175C1irI31hvZt3bRzYhkUTdvK4sFG1NrwxYL6UYr62mJC9pcdSCdEY0RQ5B0fxRiWbSKpq2OzbGrmrOEYolDI24abm27o9uO9K1V7KKQ3zbV84r2U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769914670; c=relaxed/simple; bh=A8qVLeDBMXcKbF5rH0cEPyooLb9F1EeK5SG34k1Wr1A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jB1L/ZoMFUN+nCjl9Fg1iCy8vFgEq0UAPgcn0LXYsT0AIc+OJf9ocMLCNG/iVauC14MMQuCF3gE2hs9NJ4hiYyAxEtfTFfJkaJNPcEIebG7lJth1CNqQVzsYUIpZGKZEytnJAtJhBUcUCPPAWhR/DjcmWoS+hDDQJ0Kc6zwR3+M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rPEzAQoY; 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="rPEzAQoY" Received: by smtp.kernel.org (Postfix) with ESMTPS id CFAE3C2BCC6; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769914669; bh=A8qVLeDBMXcKbF5rH0cEPyooLb9F1EeK5SG34k1Wr1A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=rPEzAQoYjOhxuo2tI2sSXAhWK9GFjL3Mg8ButKWsj3XSymKBe7nUI2g7s7ekjOULQ 9VM1tUoS68np+QJ825LsdoSwTakuXzk0qd6rrRHvneImZrAll5Eu8XAZ7EWJOf1f1Q W2QRYEbLwQOOAmKedpH5P5/MSuapydbrs1xo/O9QjVDNNdqHs+UOPZmz4EwUP+nIuH 35ATfRPG1LeAl3k4bm1pIetksd94K2xfAWCGil2EotkIkOcSHIpTuUMojZ0NmoS9ZC jxzSk7Tfi1eNtiehERYKMJHWYsz7TXObZoNzESQI9xoMOVQ8PsEhAJJzV6EdwTGnFw v1xdO0fZDwDdw== 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 C66A6E7C704; Sun, 1 Feb 2026 02:57:49 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Sun, 01 Feb 2026 02:57:50 +0000 Subject: [PATCH v8 6/6] 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: <20260201-i2c-xiic-v8-6-deb2dd158d1a@nexthop.ai> References: <20260201-i2c-xiic-v8-0-deb2dd158d1a@nexthop.ai> In-Reply-To: <20260201-i2c-xiic-v8-0-deb2dd158d1a@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=1769914669; l=1114; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=BKvE7ant0Fm54tZZqWG3GDfI7eCUIcrHxeGQX55zS9M=; b=TEcBXJVksU3Zrhk0vDfNaX378FepkQeslTyJbrsuCmswuXtaTlQ1OQ7tcRM1XwOa1NXgysa2p /WEFlYEWYnUDo+9bWHREcTsKuOpk5oDv+I/8FfMcjk+g8G1ccNvF5Hj 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 supports operation without explicit clock configuration when clocks are not specified via firmware, such as when the ACPI tables are missing the description of the clocks. 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 b8439b78d1ce..98befb46ac27 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1462,10 +1462,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(&pdev->dev, PTR_ERR(i2c->clk), + "failed to enable input clock.\n"); + } =20 i2c->dev =3D dev; =20 --=20 2.52.0