summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/greybus_protocols.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@linaro.org>2016-07-15 11:03:44 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-17 10:31:21 +0900
commitd165a618a14c8871f8e14090791298e1b2ef8231 (patch)
tree829005f2d6143a7ec9c913e35e93748dee5402b2 /drivers/staging/greybus/greybus_protocols.h
parent24f9a6e4942d7a8b15a1bac9a96a605a433b9478 (diff)
greybus: camera: Update Configure Streams Response
As camera specification gets updated, and Configure Stream Response payload modified, define here the new response structure. In order to not break non up-to-date camera modules, keep the existing structure and add the _deprecated suffix to it. Add the size of both new and old structure in order to discriminate dynamically which version of Camera Specification the camera module implements and translate deprecated version of configure_streams response in the new one. In order not to break camera functionalities, for testing purposes, hard-code values the APB-A CSI Tx driver still requires for proper interface configuration (lines_per_second and num_lanes) Testing Done: Preview, capture and video recording with white camera module and APB-A with legacy firmware implementations Signed-off-by: Jacopo Mondi <jacopo.mondi@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_protocols.h')
-rw-r--r--drivers/staging/greybus/greybus_protocols.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index 21669093daf5..178ec891e9ad 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -1706,20 +1706,31 @@ struct gb_camera_stream_config_response {
__le16 format;
__u8 virtual_channel;
__u8 data_type[2];
- __u8 padding[3];
+ __le16 max_pkt_size;
+ __u8 padding;
__le32 max_size;
} __packed;
-struct gb_camera_configure_streams_response {
+struct gb_camera_configure_streams_response_deprecated {
__u8 num_streams;
__u8 flags;
-#define GB_CAMERA_CONFIGURE_STREAMS_ADJUSTED 0x01
__u8 num_lanes;
__u8 padding;
__le32 bus_freq;
__le32 lines_per_second;
struct gb_camera_stream_config_response config[0];
} __packed;
+#define GB_CAMERA_CONFIGURE_STREAMS_DEPRECATED_SIZE 12
+
+struct gb_camera_configure_streams_response {
+ __u8 num_streams;
+#define GB_CAMERA_CONFIGURE_STREAMS_ADJUSTED 0x01
+ __u8 flags;
+ __u8 padding[2];
+ __le32 data_rate;
+ struct gb_camera_stream_config_response config[0];
+};
+#define GB_CAMERA_CONFIGURE_STREAMS_SIZE 8
/* Greybus Camera Capture request payload - response has no payload */
struct gb_camera_capture_request {