cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
From: "Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>
To: cip-dev@lists.cip-project.org,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Pavel Machek <pavel@denx.de>
Cc: Biju Das <biju.das.jz@bp.renesas.com>
Subject: [cip-dev] [PATCH 4.19.y-cip 02/40] media: device property: Add a function to test is a fwnode is a graph endpoint
Date: Tue,  9 Mar 2021 16:36:18 +0000	[thread overview]
Message-ID: <20210309163656.20944-3-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw)
In-Reply-To: <20210309163656.20944-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

commit 35694afc92646ac24d7f3ef34a7387876d998fe7 upstream.

Drivers may need to test if a fwnode is a graph endpoint. To avoid
hand-written solutions that wouldn't work for all fwnode types, add a
new fwnode_graph_is_endpoint() function for this purpose. We don't need
to wire it up to different backends for OF and ACPI for now, as the
implementation can simply be based on checkout the presence of a
remote-endpoint property.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[PL: manually applied the changes]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 include/linux/property.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/property.h b/include/linux/property.h
index 216dcfe567df..ec8ebd73b2c4 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -308,6 +308,11 @@ struct fwnode_handle *
 fwnode_graph_get_remote_node(const struct fwnode_handle *fwnode, u32 port,
 			     u32 endpoint);
 
+static inline bool fwnode_graph_is_endpoint(struct fwnode_handle *fwnode)
+{
+	return fwnode_property_present(fwnode, "remote-endpoint");
+}
+
 #define fwnode_graph_for_each_endpoint(fwnode, child)			\
 	for (child = NULL;						\
 	     (child = fwnode_graph_get_next_endpoint(fwnode, child)); )
-- 
2.17.1


[-- Attachment #2: Type: text/plain, Size: 428 bytes --]


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6217): https://lists.cip-project.org/g/cip-dev/message/6217
Mute This Topic: https://lists.cip-project.org/mt/81205338/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/4520388/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-


  parent reply	other threads:[~2021-03-09 16:37 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 16:36 [cip-dev] [PATCH 4.19.y-cip 00/40] Renesas RZ/G2{E,H,M,N} add VIN, CSI2 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 01/40] media: ov5645: Remove unneeded regulator_set_voltage() Lad Prabhakar
2021-03-09 16:36 ` Lad Prabhakar [this message]
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 03/40] media: v4l2-async: Accept endpoints and devices for fwnode matching Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 04/40] media: v4l2-async: Pass notifier pointer to match functions Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 05/40] media: v4l2-async: Log message in case of heterogeneous fwnode match Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 06/40] media: v4l: ctrl: Provide unlocked variant of v4l2_ctrl_grab Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 07/40] media: rcar-vin: fix wrong return value in rvin_set_channel_routing() Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 08/40] media: rcar-csi2: Update V3M and E3 start procedure Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 09/40] media: rcar-vin: Invalidate pipeline if conversion is not possible on input formats Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 10/40] media: rcar-vin: Add support for MEDIA_BUS_FMT_SRGGB8_1X8 format Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 11/40] media: rcar-csi2: " Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 12/40] media: dt-bindings: media: i2c: Add IMX219 CMOS sensor binding Lad Prabhakar
2021-03-09 18:52   ` Pavel Machek
2021-03-10  8:48     ` Lad Prabhakar
2021-03-10  9:38       ` Pavel Machek
2021-03-10 10:24         ` Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 13/40] media: i2c: Add driver for Sony IMX219 sensor Lad Prabhakar
2021-03-09 20:36   ` Pavel Machek
2021-03-10  9:36     ` Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 14/40] media: i2c: imx219: Fix power sequence Lad Prabhakar
2021-03-09 19:42   ` Pavel Machek
2021-03-10  8:49     ` Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 15/40] media: i2c: imx219: Add support for RAW8 bit bayer format Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 16/40] media: i2c: imx219: Add support for cropped 640x480 resolution Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 17/40] media: i2c: imx219: Implement get_selection Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 18/40] media: i2c: imx219: Fix a bug in imx219_enum_frame_size Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 19/40] media: i2c: imx219: Selection compliance fixes Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 20/40] media: i2c: imx219: take lock in imx219_enum_mbus_code/frame_size Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 21/40] arm64: dts: renesas: r8a774c0-cat874: Add support for AISTARVISION MIPI Adapter V2.1 Lad Prabhakar
2021-03-09 20:39   ` Pavel Machek
2021-03-10  9:37     ` Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 22/40] media: dt-bindings: media: rcar_vin: Add r8a774a1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 23/40] media: rcar-vin: Enable support for r8a774a1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 24/40] media: dt-bindings: media: rcar-csi2: Add r8a774a1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 25/40] media: rcar-csi2: Enable support for r8a774a1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 26/40] arm64: dts: renesas: r8a774a1: Add VIN and CSI-2 nodes Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 27/40] media: dt-bindings: rcar-vin: Add R8A774B1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 28/40] media: rcar-vin: Enable support for R8A774B1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 29/40] media: dt-bindings: rcar-csi2: Add R8A774B1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 30/40] media: rcar-csi2: Enable support for R8A774B1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 31/40] arm64: dts: renesas: r8a774b1: Add VIN and CSI-2 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 32/40] media: dt-bindings: media: renesas,vin: Add R8A774E1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 33/40] media: rcar-vin: Enable support for R8A774E1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 34/40] media: dt-bindings: media: renesas,csi2: Add R8A774E1 support Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 35/40] media: rcar-csi2: Enable support for R8A774E1 Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 36/40] arm64: dts: renesas: r8a774e1: Add VIN and CSI-2 nodes Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 37/40] arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Add parent macro for each sensor Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 38/40] arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2H Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 39/40] arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2M Lad Prabhakar
2021-03-09 16:36 ` [cip-dev] [PATCH 4.19.y-cip 40/40] arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2N Lad Prabhakar
2021-03-09 20:48 ` [cip-dev] [PATCH 4.19.y-cip 00/40] Renesas RZ/G2{E,H,M,N} add VIN, CSI2 support Pavel Machek
2021-03-09 23:13 ` Pavel Machek
2021-03-10  8:07 ` Nobuhiro Iwamatsu
2021-03-10  9:41   ` Lad Prabhakar
2021-03-10 10:58   ` Chris Paterson
     [not found]   ` <166AF609ACF1E617.19014@lists.cip-project.org>
2021-03-22 22:11     ` Chris Paterson
2021-03-23  7:31       ` Nobuhiro Iwamatsu
2021-03-23  7:50         ` Chris Paterson

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=20210309163656.20944-3-prabhakar.mahadev-lad.rj@bp.renesas.com \
    --to=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=pavel@denx.de \
    /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).