From nobody Tue Feb 10 16:18:16 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