Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1574492

[PATCH] media: add operation to get configuration of "the other side" of the link

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject [PATCH] media: add operation to get configuration of "the other side" of the link
Date 2017-02-06 10:40 +0100
Message-ID <t7NWa-3aZ-3@gated-at.bofh.it> (permalink)
References (5 earlier) <t6TKi-7ml-25@gated-at.bofh.it> <t7gxb-6vY-1@gated-at.bofh.it> <t7h9U-75V-17@gated-at.bofh.it> <t7Co1-4cN-15@gated-at.bofh.it> <t7EJb-5x1-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Normally, link configuration can be determined at probe time... but
Nokia N900 has two cameras, and can switch between them at runtime, so
that mechanism is not suitable here.

Add a hook that tells us link configuration.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index cf778c5..74148b9 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -25,6 +25,7 @@
 #include <media/v4l2-dev.h>
 #include <media/v4l2-fh.h>
 #include <media/v4l2-mediabus.h>
+#include <media/v4l2-of.h>
 
 /* generic v4l2_device notify callback notification values */
 #define V4L2_SUBDEV_IR_RX_NOTIFY		_IOW('v', 0, u32)
@@ -383,6 +384,8 @@ struct v4l2_mbus_frame_desc {
  * @s_rx_buffer: set a host allocated memory buffer for the subdev. The subdev
  *	can adjust @size to a lower value and must not write more data to the
  *	buffer starting at @data than the original value of @size.
+ *
+ * @g_endpoint_config: get link configuration required by this device.
  */
 struct v4l2_subdev_video_ops {
 	int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config);
@@ -415,6 +418,8 @@ struct v4l2_subdev_video_ops {
 			     const struct v4l2_mbus_config *cfg);
 	int (*s_rx_buffer)(struct v4l2_subdev *sd, void *buf,
 			   unsigned int *size);
+	int (*g_endpoint_config)(struct v4l2_subdev *sd,
+			    struct v4l2_of_endpoint *cfg);
 };
 
 /**




-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-03 13:40 +0100
  Re: [PATCH] devicetree: Add video bus switch Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-03 14:10 +0100
    Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-03 22:10 +0100
      Re: [PATCH] devicetree: Add video bus switch Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-03 22:40 +0100
        Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-04 23:00 +0100
          Re: [PATCH] devicetree: Add video bus switch Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-04 23:40 +0100
            Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-05 22:20 +0100
              Re: [PATCH] devicetree: Add video bus switch Sebastian Reichel <sre@kernel.org> - 2017-02-06 00:50 +0100
                [PATCH] media: add operation to get configuration of "the other  side" of the link Pavel Machek <pavel@ucw.cz> - 2017-02-06 10:40 +0100
  Re: [PATCH] devicetree: Add video bus switch Pali Rohár <pali.rohar@gmail.com> - 2017-02-03 14:40 +0100
    Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-03 22:10 +0100
      Re: [PATCH] devicetree: Add video bus switch Sebastian Reichel <sre@kernel.org> - 2017-02-04 02:10 +0100
  Re: [PATCH] devicetree: Add video bus switch Rob Herring <robh@kernel.org> - 2017-02-08 23:20 +0100
    Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-08 23:40 +0100
      Re: [PATCH] devicetree: Add video bus switch Rob Herring <robh@kernel.org> - 2017-02-10 00:20 +0100
        Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-10 21:00 +0100
          Re: [PATCH] devicetree: Add video bus switch Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-10 23:20 +0100
            Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-13 11:00 +0100
              Re: [PATCH] devicetree: Add video bus switch Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-13 11:30 +0100
      Re: [PATCH] devicetree: Add video bus switch Rob Herring <robh@kernel.org> - 2017-02-10 00:20 +0100
    Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-09 00:00 +0100
      Re: [PATCH] devicetree: Add video bus switch Rob Herring <robh@kernel.org> - 2017-02-10 00:20 +0100
        Re: [PATCH] devicetree: Add video bus switch Pavel Machek <pavel@ucw.cz> - 2017-02-10 22:20 +0100

csiph-web