From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: "Paul J . Murphy" <paul.j.murphy@intel.com>,
Daniele Alessandrelli <daniele.alessandrelli@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
Sakari Ailus <sakari.ailus@iki.fi>,
Kieran Bingham <kieran.bingham@ideasonboard.com>
Subject: [PATCH v5 2/2] media: i2c: ov9282: Add ov9281 compatible
Date: Thu, 24 Nov 2022 11:29:59 +0100 [thread overview]
Message-ID: <20221124102959.1605202-3-alexander.stein@ew.tq-group.com> (raw)
In-Reply-To: <20221124102959.1605202-1-alexander.stein@ew.tq-group.com>
According to product brief they are identical from software point of view.
Differences are a different chief ray angle (CRA) and the package.
To distinguish ov9281 & ov9282 in userspace the name has to be explicitly
set. Provide a fixed string using platform data.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
drivers/media/i2c/ov9282.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
index 072144668892..3d31d6f58dab 100644
--- a/drivers/media/i2c/ov9282.c
+++ b/drivers/media/i2c/ov9282.c
@@ -1400,6 +1400,8 @@ static int ov9282_probe(struct i2c_client *client)
/* Initialize subdev */
v4l2_i2c_subdev_init(&ov9282->sd, client, &ov9282_subdev_ops);
+ v4l2_i2c_subdev_set_name(&ov9282->sd, client,
+ device_get_match_data(ov9282->dev), NULL);
ret = ov9282_parse_hw_config(ov9282);
if (ret) {
@@ -1499,7 +1501,8 @@ static const struct dev_pm_ops ov9282_pm_ops = {
};
static const struct of_device_id ov9282_of_match[] = {
- { .compatible = "ovti,ov9282" },
+ { .compatible = "ovti,ov9281", .data = "ov9281" },
+ { .compatible = "ovti,ov9282", .data = "ov9282" },
{ }
};
--
2.34.1
next prev parent reply other threads:[~2022-11-24 10:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 10:29 [PATCH v5 0/2] ov9282: Add ov9281 support Alexander Stein
2022-11-24 10:29 ` [PATCH v5 1/2] media: dt-bindings: media: Add compatible for ov9281 Alexander Stein
2022-11-24 10:29 ` Alexander Stein [this message]
2022-11-28 13:52 ` [PATCH v5 0/2] ov9282: Add ov9281 support Hans Verkuil
2022-11-28 13:58 ` Sakari Ailus
2022-11-28 14:45 ` Dave Stevenson
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=20221124102959.1605202-3-alexander.stein@ew.tq-group.com \
--to=alexander.stein@ew.tq-group.com \
--cc=daniele.alessandrelli@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=paul.j.murphy@intel.com \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@iki.fi \
/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;
as well as URLs for NNTP newsgroup(s).