[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260201-i2c-xiic-v8-6-deb2dd158d1a@nexthop.ai>
Date: Sun, 01 Feb 2026 02:57:50 +0000
From: Abdurrahman Hussain via B4 Relay <devnull+abdurrahman.nexthop.ai@...nel.org>
To: Michal Simek <michal.simek@....com>, Andi Shyti <andi.shyti@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Andy Shevchenko <andriy.shevchenko@...el.com>,
linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Abdurrahman Hussain <abdurrahman@...thop.ai>
Subject: [PATCH v8 6/6] i2c: xiic: skip input clock setup on non-OF systems
From: Abdurrahman Hussain <abdurrahman@...thop.ai>
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 <abdurrahman@...thop.ai>
---
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 *pdev)
spin_lock_init(&i2c->atomic_lock);
- i2c->clk = 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 = 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");
+ }
i2c->dev = dev;
--
2.52.0
Powered by blists - more mailing lists