greybus: camera: Add support for configure streams flag in gb interface
authorGjorgji Rosikopulos <grosikopulos@mm-sol.com>
Sun, 17 Jan 2016 17:52:20 +0000 (19:52 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Sun, 17 Jan 2016 19:16:46 +0000 (11:16 -0800)
Update gb interface and export flags needed for latest
protocol version. Number of streams also can be changed
based on operation result.
Caller sets input flags, end fucntion return output
flags

Input flags supported:
- GB_CAMERA_IN_FLAG_TEST - Need to be set when operation
is not actually applied.

Output flags supported:
- GB_CAMERA_OUT_FLAG_ADJUSTED - This is result of the operation
if this flag is set, result is adjusted and operation
need to be repeat.

Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Acked-by: Laurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/gb-camera.h

index a1824740ef837801626da3d6b960236e209294c4..50af0573737b08b2a4628b86e39affb56fe3e7e4 100644 (file)
 
 #include <linux/v4l2-mediabus.h>
 
+/* Input flags need to be set from the caller */
+#define GB_CAMERA_IN_FLAG_TEST         (1 << 0)
+/* Output flags returned */
+#define GB_CAMERA_OUT_FLAG_ADJUSTED    (1 << 0)
+
 struct gb_camera_stream {
        unsigned int width;
        unsigned int height;
@@ -21,8 +26,8 @@ struct gb_camera_stream {
 
 struct gb_camera_ops {
        ssize_t (*capabilities)(void *priv, char *buf, size_t len);
-       int (*configure_streams)(void *priv, unsigned int nstreams,
-                               struct gb_camera_stream *streams);
+       int (*configure_streams)(void *priv, unsigned int *nstreams,
+                       unsigned int *flags, struct gb_camera_stream *streams);
        int (*capture)(void *priv, u32 request_id,
                        unsigned int streams, unsigned int num_frames,
                        size_t settings_size, const void *settings);