From: Sergey Lebedev <lsa.uz@pm.me>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Sylvain Petinot <sylvain.petinot@foss.st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Dan Scally" <dan.scally@ideasonboard.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Peter Marshall" <pm@petermarshall.ca>,
"George Neacsu" <geocausa@gmail.com>,
"Hao Yao" <hao.yao@intel.com>,
"Fernando Rimoli" <fernandorimoli11@gmail.com>,
"D. Manresa" <dmanresa@gmail.com>,
"Jizhou Tong" <fqwqf@fqwqf.xyz>,
linux-media@vger.kernel.org, platform-driver-x86@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 5/6] media: ipu-bridge: Index the sensor device properties as the endpoint ones
Date: Tue, 10 Nov 2026 19:55:36 +0000 [thread overview]
Message-ID: <20261110195454.48176-6-lsa.uz@pm.me> (raw)
In-Reply-To: <20261110195454.48176-1-lsa.uz@pm.me>
Fill dev_properties through an enum and IPU_BRIDGE_NEXT_PROPERTY(), as
ep_properties already is, so that an entry can be added without
counting slots by hand. No functional change.
Signed-off-by: Sergey Lebedev <lsa.uz@pm.me>
---
New in v4 (Sakari). The series that keeps what the software nodes point
to out of the module image is probably D. Manresa's, recalled on v3; it
changes the same lens-focus line, so whichever lands second needs a
trivial rebase:
https://lore.kernel.org/all/20261026082549.662885-1-dmanresa@gmail.com/
drivers/media/pci/intel/ipu-bridge.c | 19 ++++++++-----------
include/media/ipu-bridge.h | 11 ++++++++++-
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index c99c85b7e6f..2399a3d52b6 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -570,7 +570,7 @@ static void ipu_bridge_create_fwnode_properties(
{
struct ipu_property_names *names = &sensor->prop_names;
struct software_node *nodes = sensor->swnodes;
- unsigned int i = 0;
+ unsigned int i = 0, d = 0;
sensor->prop_names = prop_names;
@@ -612,19 +612,16 @@ static void ipu_bridge_create_fwnode_properties(
SOFTWARE_NODE_REFERENCE(&nodes[SWNODE_SENSOR_ENDPOINT]);
}
- sensor->dev_properties[0] = PROPERTY_ENTRY_U32(
- sensor->prop_names.clock_frequency,
- sensor->mclkspeed);
- sensor->dev_properties[1] = PROPERTY_ENTRY_U32(
- sensor->prop_names.rotation,
- sensor->rotation);
- sensor->dev_properties[2] = PROPERTY_ENTRY_U32(
- sensor->prop_names.orientation,
- sensor->orientation);
+ sensor->dev_properties[IPU_BRIDGE_NEXT_PROPERTY(d, DEV_CLOCK_FREQUENCY)] =
+ PROPERTY_ENTRY_U32(names->clock_frequency, sensor->mclkspeed);
+ sensor->dev_properties[IPU_BRIDGE_NEXT_PROPERTY(d, DEV_ROTATION)] =
+ PROPERTY_ENTRY_U32(names->rotation, sensor->rotation);
+ sensor->dev_properties[IPU_BRIDGE_NEXT_PROPERTY(d, DEV_ORIENTATION)] =
+ PROPERTY_ENTRY_U32(names->orientation, sensor->orientation);
if (sensor->vcm_type) {
sensor->vcm_ref[0] =
SOFTWARE_NODE_REFERENCE(&sensor->swnodes[SWNODE_VCM]);
- sensor->dev_properties[3] =
+ sensor->dev_properties[IPU_BRIDGE_NEXT_PROPERTY(d, DEV_LENS_FOCUS)] =
PROPERTY_ENTRY_REF_ARRAY("lens-focus", sensor->vcm_ref);
}
diff --git a/include/media/ipu-bridge.h b/include/media/ipu-bridge.h
index 3ef94c2b767..284e0d6cc93 100644
--- a/include/media/ipu-bridge.h
+++ b/include/media/ipu-bridge.h
@@ -89,6 +89,15 @@ enum ipu_bridge_ep_props {
IPU_BRIDGE_EP_NUM_ENTRIES
};
+enum ipu_bridge_dev_props {
+ IPU_BRIDGE_DEV_CLOCK_FREQUENCY,
+ IPU_BRIDGE_DEV_ROTATION,
+ IPU_BRIDGE_DEV_ORIENTATION,
+ IPU_BRIDGE_DEV_LENS_FOCUS,
+ IPU_BRIDGE_DEV_NUM_OF,
+ IPU_BRIDGE_DEV_NUM_ENTRIES
+};
+
/*
* Get the index of the next property in a property array, with a given maximum
* value.
@@ -179,7 +188,7 @@ struct ipu_sensor {
struct ipu_property_names prop_names;
struct property_entry ep_properties[IPU_BRIDGE_EP_NUM_ENTRIES];
- struct property_entry dev_properties[5];
+ struct property_entry dev_properties[IPU_BRIDGE_DEV_NUM_ENTRIES];
struct property_entry ipu_properties[3];
struct property_entry ivsc_properties[1];
struct property_entry ivsc_sensor_ep_properties[4];
--
2.54.0
next prev parent reply other threads:[~2026-11-10 19:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 19:54 [PATCH v4 0/6] media: Add the ST VD55G0 global shutter sensor Sergey Lebedev
2026-11-10 19:55 ` [PATCH v4 1/6] dt-bindings: media: i2c: st,vd55g1: Add ST VD55G0 Sergey Lebedev
2026-11-10 19:55 ` [PATCH v4 2/6] media: i2c: Add ST VD55G0 global shutter sensor driver Sergey Lebedev
2026-11-10 19:55 ` [PATCH v4 3/6] platform/x86: int3472: Map the VD55G0 supplies to "vddio" and "vana" Sergey Lebedev
2026-11-10 19:55 ` [PATCH v4 4/6] media: ipu-bridge: Add ST VD55G0 Sergey Lebedev
2026-11-10 19:55 ` Sergey Lebedev [this message]
2026-11-10 19:55 ` [PATCH v4 6/6] media: ipu-bridge: Add the Surface Pro 9 and 11 infrared illuminator Sergey Lebedev
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=20261110195454.48176-6-lsa.uz@pm.me \
--to=lsa.uz@pm.me \
--cc=benjamin.mugnier@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=dan.scally@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=dmanresa@gmail.com \
--cc=fernandorimoli11@gmail.com \
--cc=fqwqf@fqwqf.xyz \
--cc=geocausa@gmail.com \
--cc=hansg@kernel.org \
--cc=hao.yao@intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=pm@petermarshall.ca \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sylvain.petinot@foss.st.com \
/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
all inboxes | Powered by JetHome®