/* 0x0a is unused */
GREYBUS_PROTOCOL_SPI = 0x0b,
GREYBUS_PROTOCOL_DISPLAY = 0x0c,
- GREYBUS_PROTOCOL_CAMERA = 0x0d,
+ GREYBUS_PROTOCOL_CAMERA_MGMT = 0x0d,
GREYBUS_PROTOCOL_SENSOR = 0x0e,
GREYBUS_PROTOCOL_LIGHTS = 0x0f,
GREYBUS_PROTOCOL_VIBRATOR = 0x10,
GREYBUS_PROTOCOL_AUDIO_DATA = 0x13,
GREYBUS_PROTOCOL_SVC = 0x14,
GREYBUS_PROTOCOL_FIRMWARE = 0x15,
+ GREYBUS_PROTOCOL_CAMERA_DATA = 0x16,
/* ... */
GREYBUS_PROTOCOL_RAW = 0xfe,
GREYBUS_PROTOCOL_VENDOR = 0xff,
#define GB_SDIO_WP 0x04
} __packed;
+/* Camera */
+
+#define GB_CAMERA_VERSION_MAJOR 0x00
+#define GB_CAMERA_VERSION_MINOR 0x01
+
+/* Greybus Camera request types */
+#define GB_CAMERA_TYPE_CAPABILITIES 0x02
+#define GB_CAMERA_TYPE_CONFIGURE_STREAMS 0x03
+#define GB_CAMERA_TYPE_CAPTURE 0x04
+#define GB_CAMERA_TYPE_FLUSH 0x05
+#define GB_CAMERA_TYPE_METADATA 0x06
+
+#define GB_CAMERA_MAX_STREAMS 4
+#define GB_CAMERA_MAX_SETTINGS_SIZE 8192
+
+/* Greybus Camera Configure Streams request payload */
+struct gb_camera_stream_config_request {
+ __le16 width;
+ __le16 height;
+ __le16 format;
+ __le16 padding;
+} __packed;
+
+struct gb_camera_configure_streams_request {
+ __le16 num_streams;
+ __le16 padding;
+ struct gb_camera_stream_config_request config[0];
+} __packed;
+
+/* Greybus Camera Configure Streams response payload */
+struct gb_camera_stream_config_response {
+ __le16 width;
+ __le16 height;
+ __le16 format;
+ __u8 virtual_channel;
+ __u8 data_type[2];
+ __u8 padding[3];
+ __le32 max_size;
+} __packed;
+
+struct gb_camera_configure_streams_response {
+ __le16 num_streams;
+#define GB_CAMERA_CONFIGURE_STREAMS_ADJUSTED 0x01
+ u8 flags;
+ u8 padding;
+ struct gb_camera_stream_config_response config[0];
+} __packed;
+
+/* Greybus Camera Capture request payload - response has no payload */
+struct gb_camera_capture_request {
+ __le32 request_id;
+ u8 streams;
+ u8 padding;
+ __le16 num_frames;
+ u8 settings[0];
+} __packed;
+
+/* Greybus Camera Flush response payload - request has no payload */
+struct gb_camera_flush_response {
+ __le32 request_id;
+} __packed;
+
+/* Greybus Camera Metadata request payload - operation has no response */
+struct gb_camera_metadata_request {
+ __le32 request_id;
+ __le16 frame_number;
+ __u8 stream;
+ __u8 padding;
+ u8 metadata[0];
+} __packed;
+
/* Lights */
#define GB_LIGHTS_VERSION_MAJOR 0x00