From: Hugues Fruchet <hugues.fruchet@st.com>
To: Steve Longerbeam <slongerbeam@gmail.com>,
Sakari Ailus <sakari.ailus@iki.fi>,
Hans Verkuil <hverkuil@xs4all.nl>,
"Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring" <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Maxime Ripard <maxime.ripard@bootlin.com>
Cc: devicetree@vger.kernel.org, linux-media@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
Hugues Fruchet <hugues.fruchet@st.com>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Jacopo Mondi <jacopo@jmondi.org>
Subject: [PATCH 2/4] media: v4l2-core: add pixel clock max frequency parallel port property
Date: Thu, 27 Sep 2018 16:46:05 +0200 [thread overview]
Message-ID: <1538059567-8381-3-git-send-email-hugues.fruchet@st.com> (raw)
In-Reply-To: <1538059567-8381-1-git-send-email-hugues.fruchet@st.com>
Add pclk-max-frequency property in parallel port endpoint in order
to inform sensor of the maximum pixel clock frequency admissible
by camera interface that is connected on.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
---
drivers/media/v4l2-core/v4l2-fwnode.c | 3 +++
include/media/v4l2-fwnode.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
index 169bdbb..505338e 100644
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
@@ -158,6 +158,9 @@ static void v4l2_fwnode_endpoint_parse_parallel_bus(
flags |= v ? V4L2_MBUS_DATA_ENABLE_HIGH :
V4L2_MBUS_DATA_ENABLE_LOW;
+ if (!fwnode_property_read_u32(fwnode, "pclk-max-frequency", &v))
+ bus->pclk_max_frequency = v;
+
bus->flags = flags;
}
diff --git a/include/media/v4l2-fwnode.h b/include/media/v4l2-fwnode.h
index 9cccab6..946b48d 100644
--- a/include/media/v4l2-fwnode.h
+++ b/include/media/v4l2-fwnode.h
@@ -52,11 +52,13 @@ struct v4l2_fwnode_bus_mipi_csi2 {
* @flags: media bus (V4L2_MBUS_*) flags
* @bus_width: bus width in bits
* @data_shift: data shift in bits
+ * @max_pclk_frequency: maximum pixel clock in hertz
*/
struct v4l2_fwnode_bus_parallel {
unsigned int flags;
unsigned char bus_width;
unsigned char data_shift;
+ unsigned int pclk_max_frequency;
};
/**
--
2.7.4
next prev parent reply other threads:[~2018-09-27 14:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 14:46 [PATCH 0/4] OV5640: reduce rate according to maximum pixel clock Hugues Fruchet
2018-09-27 14:46 ` [PATCH 1/4] media: ov5640: move parallel port pixel clock divider out of registers set Hugues Fruchet
2018-09-27 14:46 ` Hugues Fruchet [this message]
2018-09-27 14:46 ` [PATCH 3/4] media: dt-bindings: media: Document pclk-max-frequency property Hugues Fruchet
2018-09-27 17:26 ` Maxime Ripard
2018-09-28 7:03 ` Sakari Ailus
2018-10-01 14:53 ` Hugues FRUCHET
2018-09-27 14:46 ` [PATCH 4/4] media: ov5640: reduce rate according to maximum pixel clock frequency Hugues Fruchet
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=1538059567-8381-3-git-send-email-hugues.fruchet@st.com \
--to=hugues.fruchet@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=jacopo@jmondi.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@bootlin.com \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=slongerbeam@gmail.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;
as well as URLs for NNTP newsgroup(s).