From nobody Mon Jan 26 23:07: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 8A6E0349B0A; Mon, 26 Jan 2026 17:08:21 +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=1769447301; cv=none; b=emnW++qlwMT5CXdEOOdF/XlJVJM+Ok+fR6MDd086aPg6oBhjOtxV9QqeVoMnVPKax2JeC2B4QidHf0fvmR3YyYku26pm4LFQOfvi+pGEqgG/LaNnRvEH6hjeQvJ5+U7tN73JIg+v3dEtL8/A6//F2zNjS8vsFFHd+ZVsjNOxsbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769447301; c=relaxed/simple; bh=2f258ZKMGjMDX6rVeyYTKnl8hXsCenCR77UWDe3H8b8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VTroUmophkaRmn9PnOYUdrY9PO5krW2iuUb88ZSC4c+EsmLmM3+MYLkpSNIN94DoF5qAXS0Jfs9esCjPtNtcdkAHci9/LwmacJnRKTOhOxtwNqGbjOdGwgyCKZJUqoi2HLe7whHGOVlSkqyIy9/DicyIQiGudr+5lmqzV4xspsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CAXvlt5n; 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="CAXvlt5n" Received: by smtp.kernel.org (Postfix) with ESMTPS id 320F3C116C6; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769447301; bh=2f258ZKMGjMDX6rVeyYTKnl8hXsCenCR77UWDe3H8b8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=CAXvlt5nIri4w61xbzMTvJtIsULNx3SiGa06J6N4nlnUzCwNYdbcSBbatcd5vrgD1 RAdGSlWOY3EPc2sI1bTAw+UnC20h6U8S+vaSiGTjDaUnIY6AIkAMgtXl+uxEi6scEY ztArCqDe+qQrxeoJHGSzVH1QSyULZ8s98NyfYRoQx9JXnaHepNbFDxi0tfZDM0rFDl 0yFZUnfwj/NjTzVv4eNsoAWUrwAXBlqyOGzeY4OQj/ZC0BSowHgqcCx7waKDQfxE7n kqEbJIBCPtdTWcwYVIVU5SeKNVxAi8RJKhaYTJlWeHkk7fMJXA8osE7FHdMCC5bvQS +c5dH5uJmhESA== 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 20368D19503; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Mon, 26 Jan 2026 17:08:16 +0000 Subject: [PATCH v5 1/6] 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: <20260126-i2c-xiic-v5-1-88a16a28721c@nexthop.ai> References: <20260126-i2c-xiic-v5-0-88a16a28721c@nexthop.ai> In-Reply-To: <20260126-i2c-xiic-v5-0-88a16a28721c@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=1769447300; l=759; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=Jp8L32rGkddXyWP1kCRtOWV6Txgpa0+B9TbjL9V4o78=; b=u6lMnREI4xoLQT48ikHXfh1CX+SaIP94RfXSOXgGbgcPNt2mLRPhh8b4Swa6nuKYUYgIQcLhI spVSC5M2KWRBYyWHhxwbnmMEd81osgmhVWla1QhhLaVWKApEQpujUva 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 Mon Jan 26 23:07: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 8A586349AF1; Mon, 26 Jan 2026 17:08:21 +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=1769447301; cv=none; b=pTPlNojiV3TYmDJwYeVPsyn4Bw+ePXnVcfkzW50coCefh9mTjrd1/EFp0Y+aiGDFL7G5g72GFa82RMOw864FcqanQAFfPnoDwMgRMotjVxqfCxoKJbxkIqN+/xAF+SEmNdcvWpZa5+ne+voOBvZ0iwHYbocckScDd/rK9YdHA14= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769447301; c=relaxed/simple; bh=bRJsBVhV2cTCTGqXXoRRmJ1NBnZdJqFem9P0ZfHUxu4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZxP+1T+F5IoU9X7djqpNcczpsAx3YOkJgLViZljlJyTu3qPpJTcMe2jWoDOuybogoSmdaWfo5bA7TWF28wrOcFPnQfw0ZtRc3kYwD5yE6Ol/fBqddIk37kGIKkIqFzcnX+DJvUWIanqNdueBn7WMig7oKc0nYoWC2vKMP0BUxlo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lWBJnQsy; 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="lWBJnQsy" Received: by smtp.kernel.org (Postfix) with ESMTPS id 41F56C2BC9E; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769447301; bh=bRJsBVhV2cTCTGqXXoRRmJ1NBnZdJqFem9P0ZfHUxu4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=lWBJnQsyizLAvq7vEAg86CzYAK9+d2Ufr0NLYH4z7gGFdkIx5j8wq1wqgOOVW+CF9 QWdP99vGEXVgdcr56w3bYEfCcEnY/Nf04W4RO/PTwbddrcU3Vk1HqSmPzUwplvWatD nlutOR2s3Vcv5ivpQF6Ia0afWz3vIAXSH1tVkq7zZFjW1dl9zjYB7C3CDCGFFWVaTN 1qCJMsSWMrq/KhLBRD1yrop66jzFSoa+xuZY1ff5xrTd8bCSyDROw96/5znq8Jr44F MQ47oM/ksvXjx4FZSuO3r05z17YmN1qaXrbjtXs3VlQW4wmtBJGvPQdSEgrlfWKp3Z Go795pQoVIisw== 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 355EBD19508; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Mon, 26 Jan 2026 17:08:17 +0000 Subject: [PATCH v5 2/6] 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: <20260126-i2c-xiic-v5-2-88a16a28721c@nexthop.ai> References: <20260126-i2c-xiic-v5-0-88a16a28721c@nexthop.ai> In-Reply-To: <20260126-i2c-xiic-v5-0-88a16a28721c@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=1769447300; l=1430; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=MFPKI1awSXPDHMhgBtmEFE5/b9Lhx4gVN3sZslxmYUc=; b=me3Cm2MW3XShsFG9At8DfhsACkQpJ31sietD0gepYjQSWjj8ORC/JDRY9QJnwsgr/rSdWL+3B mlkLkEUrafyCJU6NOK8JFyuUrRMsWU33uU9L1ychEDSU5+4IOQBgdpI 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 Mon Jan 26 23:07: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 7973934846A; Mon, 26 Jan 2026 17:08:21 +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=1769447301; cv=none; b=DXS7bCNXWrvby28YDlrIJZ9brO4cQMpv7jn1Rw4xq7tByqDbZXnuYosbsW61pZuVtY26oq6RYTDu0ywiKwvbOb7fpaGYlReD3CFrq5kc99/WpBpzHDiDAcw9VwUvvO2g8plv9NoXIPl7MKBWTUtexaT8KUFPsXDgeJYOBhk4P28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769447301; c=relaxed/simple; bh=jvF5qeYw9OFf0xTRtcK9799ZYgCLXgUjt2dmGVjzq24=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dfBVkT1R/Na5rLnd2HV3apnaeSvjJBP/CT9Vem0vXkLz/hpp/IWP3UA8K/pc+aqZYRoKINqUi/kILFAOz0gn7wTH09g514Jl6f56foNls8OmxmcjWC2FKW0GgmNhCRZM83mnqhwNPjpGw2Fzy2uutYMw6S0gNm5ezAm/3wV74yE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TXOhV9FO; 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="TXOhV9FO" Received: by smtp.kernel.org (Postfix) with ESMTPS id 4F6C1C2BC86; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769447301; bh=jvF5qeYw9OFf0xTRtcK9799ZYgCLXgUjt2dmGVjzq24=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=TXOhV9FO6hSpWSicbKfiaIwIizJXBKDoijOgSn9BAnwhea+Umo8UwAXi/8uXFRCue myufuXm8px7SZzN5Vjh2kHtq0QUXFgytRkzisruecf0sDvxGU6OovuQe9O3bXNvnfl ktmjdXdF76vubwmBhQSdfNQmvb7CZY8YHR8G6tQd8R5nY0Qpa+vh9gppKNEy5bIktN AZS1SfKf7//f2oyIQMLPr6Abc3+r9kJcsUyh3YLUqfJTRrOhezaHsAPuxsHsu9MMJQ 7Q5rnmG2GtYrPOzOkbBUGx2Dad5H3EuQlmUUUfz6UalHhbssNp1lLvohcdyJZ/Gt8o Lr3kVxS8lMtZw== 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 44907D19507; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Mon, 26 Jan 2026 17:08:18 +0000 Subject: [PATCH v5 3/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: <20260126-i2c-xiic-v5-3-88a16a28721c@nexthop.ai> References: <20260126-i2c-xiic-v5-0-88a16a28721c@nexthop.ai> In-Reply-To: <20260126-i2c-xiic-v5-0-88a16a28721c@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=1769447300; l=2539; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=bfIH49iCAyAlFD23YdabFfBWUt0uWz1DwhgQrI4yMbc=; b=n1SMe1SPbm69jcfaZUcirZWtvrvPY/A6SV+/oJh7eIVDhEolY942jd4n8uJ5ldPItgzJnqqMD 2CK7IUGgSK1B7Og5eDoy2lZO0bQXeUWVQq3VTkE9Tkr/mLwTGUilgTp 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 | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 16202fb89271..a4a8087c1407 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 < 0) + 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 < 0) + 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 @@ -1511,14 +1515,14 @@ static int xiic_i2c_probe(struct platform_device *p= dev) ret =3D xiic_reinit(i2c); if (ret < 0) { dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n"); - goto err_pm_disable; + return ret; } =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 +1534,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 +1554,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 Mon Jan 26 23:07: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 8E2C3349B0D; Mon, 26 Jan 2026 17:08:21 +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=1769447301; cv=none; b=iG0WHeZxBWThv6hFZcYca2Vn45YYNerRd4nT8ZCmp7IHbqJAjJJl6O6V4q1CGl9HhmvamVe8ZyB+tQA+sKXSkruCXVn+jmgW4KcgPLWZBED5uh8rNoqaUJ0iEF4tY8vzLzNeVs1LI+2QS6EHgq9DCWHA6ELyOSDC4x3BaUxbGOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769447301; c=relaxed/simple; bh=OybWCogfBgN8xZ/i/vgh3wMiiMXnvU+ML2P4SNzVv2E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JZMx4oTdwVs49rZFqoDvo477cJckyDQwA4Q9JkzM6Q6+rYVzfKz9PHyIrN0HRhEv0OfDjw18XKNKXW8M7JdShefZt9nrLo3/5pRdMJnqPDDHFgQvUKEYwoog8SszExxi+qpyGzvF0OD2vZdmfZjNOXohD+BCzjZVv8Az9iABwIg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BgXJh0jN; 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="BgXJh0jN" Received: by smtp.kernel.org (Postfix) with ESMTPS id 5D74EC2BCB1; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769447301; bh=OybWCogfBgN8xZ/i/vgh3wMiiMXnvU+ML2P4SNzVv2E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=BgXJh0jNFHyZBMnwZSQNNXMcbKEsjmN8odwDmWldh9wwA7NfX8xjmFSB3mnqysurv t8RpdNGaF8JTq94mXsbgaFgZr3e7ZpWQMDGyQPqWywpDw5B7tsQ7vN5w9zSiS+0SqS tjJcEmnWb5NUSdxbY6SCuFEE7cYnafPydtwbyeQXI5MKfuQPvGYSkkQt0aIHbxIQIE UENi2/lf2igbuT+cMcgLhFNb13ppttl2P6nEo5vu5eMfpHg/S7SPxG6/YJDoT+GElB xZJcOYAQWco8nTHltAKI5+qeyPdShqJL78z+ORckzgvR7wWwhevy1MTS7aK7v7/S4K kO+XRTXELhBhQ== 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 52F89D19502; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Mon, 26 Jan 2026 17:08:19 +0000 Subject: [PATCH v5 4/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: <20260126-i2c-xiic-v5-4-88a16a28721c@nexthop.ai> References: <20260126-i2c-xiic-v5-0-88a16a28721c@nexthop.ai> In-Reply-To: <20260126-i2c-xiic-v5-0-88a16a28721c@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=1769447300; l=800; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=GVZq2HmFuG7CNJnGoqYZGmD0YpSeA59LFKPs+6ye6Uk=; b=BoLKdz1mXkh+9FOaj+7RkXE2H3BzPV3zmnuidek6FzRj3sbPuBJucSaLV3gNgmDBN+gfkXHs+ dFfCjnwL51yCViUTSELre9K3EJxfSiBA3C8S5XYuBJkdp6kiRYlz53D 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index a4a8087c1407..a06597bbf6fc 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1492,10 +1492,8 @@ static int xiic_i2c_probe(struct platform_device *pd= ev) xiic_process, IRQF_ONESHOT, pdev->name, i2c); =20 - if (ret < 0) { - dev_err_probe(&pdev->dev, ret, "Cannot claim IRQ\n"); + if (ret < 0) return ret; - } =20 i2c->singlemaster =3D of_property_read_bool(pdev->dev.of_node, "single-master"); --=20 2.52.0 From nobody Mon Jan 26 23:07: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 A20EE34A3A2; Mon, 26 Jan 2026 17:08:21 +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=1769447301; cv=none; b=TbqNuUK+mvky1m8uhKAy+Q8WGkohGuASSpAbktoPphtX1otu2E13X0P11BhLqObHT65lH2SDp7lkqNLcZh0fzenuLtln9sjPSVTO+/QUOKTOBx+ldG0L4x/lUndJnh24bOYAtPYzgDP0RuQwfM4gkyA+SBTgNZm/G61HUrvia/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769447301; c=relaxed/simple; bh=1+b8lUkKws+4oEsMZXB1wLVI8XlSqyA6yVS7eYU/bSw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BxKHbujg10iL9WDtUDHVIcojkp8Cz0/f6TAGOJWTcAkKXFo37x27zzIgKgDil2UOX2884h1L98S7LEOCTAxeqXZxVRYRVA1R9/WslKdOu9v6e/I3sAzIGVqV7Etm5E+EzcSuyCUtH1CFn6fI87Q/X9jaIhxCtqfJW59tRHyUGFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VCwOQUZO; 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="VCwOQUZO" Received: by smtp.kernel.org (Postfix) with ESMTPS id 6B215C2BCB0; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769447301; bh=1+b8lUkKws+4oEsMZXB1wLVI8XlSqyA6yVS7eYU/bSw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=VCwOQUZOCSYaskgQApsBN5gP4MdATlYA/oybjf3DowqdedzHVWj0KIAJZcMCldJLU ST4kZU9umA62YNIFztewFdK1pqxYrT5WWIo8u6qBpJAuGY6D67rqbx8HSTy1XdTY/C Zur5B0RBbDhQ+eaQAuPaDbiNybLPy+cOwkU8IngSaZfb3ipi6BFvQiYzTBXjKGWWgF 0+BaxO+kWTQz3ySk7o04xI3gENfhe6itwZ8QwLGnY5J987uEGhkwbJwS3YwEH0Hku4 WSZBufgErp31/aRVaoK8ipU/r0/k6XHvcob087BUaHF+RI3/+pgmDK6eHxmUMxnzGq CZjiirO9XzvDg== 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 610AED19509; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Mon, 26 Jan 2026 17:08:20 +0000 Subject: [PATCH v5 5/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: <20260126-i2c-xiic-v5-5-88a16a28721c@nexthop.ai> References: <20260126-i2c-xiic-v5-0-88a16a28721c@nexthop.ai> In-Reply-To: <20260126-i2c-xiic-v5-0-88a16a28721c@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=1769447300; l=3090; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=MTSepaq3p0JGZqPpWg0lyiFNCHgVsT/ZL3hMvZ5oBjc=; b=R8a8v2Vp3MRfWptAIlCRVcI0Vv218LiSEta9mVSRc2ed+hox/w3jYxijOEnm9B75myVfcbkOU psGlDSJ0hwVCUPl6PhDRdKp6/ZDXI5u7P1B03/z6VfyL8qR+knEyBiS 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 | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index a06597bbf6fc..09a4b532d55d 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,21 +1476,18 @@ static int xiic_i2c_probe(struct platform_device *p= dev) =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; =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); =20 if (ret < 0) 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 Mon Jan 26 23:07: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 B732334A786; Mon, 26 Jan 2026 17:08:21 +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=1769447301; cv=none; b=b4DDubHwKqp31pGn79dMykPO/s4H1QMAiPd6vj+5UDByvvCO4UP6F5SFuRjbbDwS9smx+9aZjn7PzOZfk9wC3mDdyUY30W/cYxFG+eWezN8t+JKAE3stmwHP70Us+sG+zWFcwaODl1Be10jTwSub5hrWOxrTrPfTEVw6qKFywaY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769447301; c=relaxed/simple; bh=xfIGFZcaZsuJbvTqczzDf/90UO6uj2TJb2Q5cU8ZhTo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ajuUoTORzlUStjJ7aOIMN54EK5AZO05/sBMymFRv3I4pwqH4BQz/0YlNZOKocHl9uatAQHKuhilYRaLQVkP54LwSuIHlpwbbILBtSe5zNq04e8GezvIIs3PJi6A+bDDSnA+FTRPvxYU847r2mBwcHIkN0DcKiytxWEYH4Rpouuk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QxqJndli; 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="QxqJndli" Received: by smtp.kernel.org (Postfix) with ESMTPS id 76E90C19425; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769447301; bh=xfIGFZcaZsuJbvTqczzDf/90UO6uj2TJb2Q5cU8ZhTo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=QxqJndlicgqS+EvFUdfN+VTMx1sJuIaNcBPmxgcpWYFGl4XQ3v3dADMlpG2U8xYQi 3Pr8MDxRdx24h8ugsXt1WyAv5KczqjWpDTboPQWP86BzroskvvmNKTA6w8fwUrY2Dh 5bBpET5pDh4vYJ9IT9GpZBX6IhgldW3MtdVKdGTzATjuBjEv66hV2KQuej1dbyunls ASgYWzVyYs2rJ01yMie5AvQHcsrlofjsv6z0bxXMJ1HnvnAbDZpG/Q28PPNtvwlF4l uuTs+W2qPjIY73AWqEjnLDFyII872eoalAcJpWclAoE7xj/uGi4PmIiMX9WKBKx3ro DSz5VNJwK05PA== 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 7028AD19503; Mon, 26 Jan 2026 17:08:21 +0000 (UTC) From: Abdurrahman Hussain via B4 Relay Date: Mon, 26 Jan 2026 17:08:21 +0000 Subject: [PATCH v5 6/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: <20260126-i2c-xiic-v5-6-88a16a28721c@nexthop.ai> References: <20260126-i2c-xiic-v5-0-88a16a28721c@nexthop.ai> In-Reply-To: <20260126-i2c-xiic-v5-0-88a16a28721c@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=1769447300; l=2981; i=abdurrahman@nexthop.ai; s=20260119; h=from:subject:message-id; bh=dRi5LhqiOa6vw9BCoKD9I00IfjaOT2QPsZveER4YMII=; b=dFoUopq67JPlGmSSOsHt0HEVWqQZOYbBppg3u2gGPIqyDN571SYelyF1jpp9eE/h0GAEx9pXm gJ7sl9WDorZDvUqUm2+G5nJuIpb60pZsuAuDf9xcBMb1DYQ/77605Yz 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 | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 09a4b532d55d..3537c97e307a 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,12 @@ 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 < 0) return ret; @@ -1503,7 +1503,7 @@ static int xiic_i2c_probe(struct platform_device *pde= v) =20 ret =3D xiic_reinit(i2c); if (ret < 0) { - dev_err_probe(&pdev->dev, ret, "Cannot xiic_reinit\n"); + dev_err_probe(dev, ret, "Cannot xiic_reinit\n"); return ret; } =20 @@ -1528,22 +1528,23 @@ 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); =20 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_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