From: Danila Tikhonov <danila@mainlining.org>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Kate Hsuan <hpa@redhat.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Eugene Lepshy <fekz115@gmail.com>,
Vasiliy Doylov <neko@altlinux.org>,
Achill Gilgenast <achill@achill.org>,
Luca Weiss <luca.weiss@fairphone.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
Danila Tikhonov <danila@mainlining.org>
Subject: [PATCH 3/4] drivers: media: i2c: imx471: Add Device Tree matching support
Date: Wed, 05 Aug 2026 22:54:26 +0300 [thread overview]
Message-ID: <20260805-imx471-v1-3-7be79f539ed8@mainlining.org> (raw)
In-Reply-To: <20260805-imx471-v1-0-7be79f539ed8@mainlining.org>
The IMX471 driver currently only supports probing via ACPI. Add OF
device ID table with "sony,imx471" compatible string and <linux/of.h>
header to allow probing on Device Tree based platforms.
Signed-off-by: Danila Tikhonov <danila@mainlining.org>
---
drivers/media/i2c/imx471.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/media/i2c/imx471.c b/drivers/media/i2c/imx471.c
index 3ad123699f14..cc75664f1af4 100644
--- a/drivers/media/i2c/imx471.c
+++ b/drivers/media/i2c/imx471.c
@@ -10,6 +10,7 @@
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <media/v4l2-cci.h>
@@ -941,10 +942,17 @@ static const struct acpi_device_id imx471_acpi_ids[] __maybe_unused = {
};
MODULE_DEVICE_TABLE(acpi, imx471_acpi_ids);
+static const struct of_device_id imx471_of_match[] = {
+ { .compatible = "sony,imx471" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, imx471_of_match);
+
static struct i2c_driver imx471_i2c_driver = {
.driver = {
.name = "imx471",
.acpi_match_table = ACPI_PTR(imx471_acpi_ids),
+ .of_match_table = imx471_of_match,
.pm = pm_sleep_ptr(&imx471_pm_ops),
},
.probe = imx471_probe,
--
2.55.0
next prev parent reply other threads:[~2026-08-05 19:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 19:54 [PATCH 0/4] Add front-facing camera support for Nothing Phone (1) Danila Tikhonov
2026-08-05 19:54 ` [PATCH 1/4] dt-bindings: media: i2c: Add Sony IMX471 CMOS Image Sensor Danila Tikhonov
2026-08-06 10:33 ` Sakari Ailus
2026-08-05 19:54 ` [PATCH 2/4] drivers: media: i2c: imx471: Add vdig and vif power supplies Danila Tikhonov
2026-08-05 19:54 ` Danila Tikhonov [this message]
2026-08-05 20:37 ` [PATCH 3/4] drivers: media: i2c: imx471: Add Device Tree matching support sashiko-bot
2026-08-05 19:54 ` [PATCH 4/4] arm64: dts: qcom: sm7325-nothing-spacewar: Add front camera support Danila Tikhonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260805-imx471-v1-3-7be79f539ed8@mainlining.org \
--to=danila@mainlining.org \
--cc=achill@achill.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fekz115@gmail.com \
--cc=hpa@redhat.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=mchehab@kernel.org \
--cc=neko@altlinux.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox