Commit 24ac4fa4 authored by Gjorgji Rosikopulos's avatar Gjorgji Rosikopulos Committed by Greg Kroah-Hartman

greybus: camera: Add support for configure streams flag in gb interface

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: default avatarGjorgji Rosikopulos <grosikopulos@mm-sol.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent b29906af
......@@ -10,6 +10,11 @@
#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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment