aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/gb-camera.h
diff options
context:
space:
mode:
authorGjorgji Rosikopulos <grosikopulos@mm-sol.com>2016-01-17 19:52:20 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-17 11:16:46 -0800
commit24ac4fa490bf105c202b843280eb67b2327c337f (patch)
tree57de922f639ea33e71abacf604885c53d68dfa63 /drivers/staging/greybus/gb-camera.h
parentgreybus: firmware: replace colons with underscore in firmware file request (diff)
downloadlinux-dev-24ac4fa490bf105c202b843280eb67b2327c337f.tar.xz
linux-dev-24ac4fa490bf105c202b843280eb67b2327c337f.zip
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: Gjorgji Rosikopulos <grosikopulos@mm-sol.com> Acked-by: Laurent Pinchart <laurent.pinchart@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/gb-camera.h')
-rw-r--r--drivers/staging/greybus/gb-camera.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/greybus/gb-camera.h b/drivers/staging/greybus/gb-camera.h
index a1824740ef83..50af0573737b 100644
--- a/drivers/staging/greybus/gb-camera.h
+++ b/drivers/staging/greybus/gb-camera.h
@@ -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);