diff options
author | Eli Sennesh <esennesh@leaflabs.com> | 2016-05-16 14:55:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-24 09:02:07 -0700 |
commit | 00606367141cf518e94d8354a02d298475de67e5 (patch) | |
tree | f67b4564d86ba430fc3f23577abded5c8a7c2053 /drivers/staging/greybus/camera.c | |
parent | d7be800f7ae9398055509b3a83d0ea3118e9277f (diff) | |
download | op-kernel-dev-00606367141cf518e94d8354a02d298475de67e5.zip op-kernel-dev-00606367141cf518e94d8354a02d298475de67e5.tar.gz |
greybus: update UniPro Set Interface Power Mode operation to match spec
Bring the gb_svc_intf_set_power_mode() up-to-date with the current Greybus
specification. This largely involves adding more members to the structure
sent across the wire. Also change the camera code to use the new
operation properly, with default values passed for the new necessary
arguments. The correctness of these default values is confirmed via testing
and by asking Rob Johnson.
Testing Done: Took a picture with a camera module, received error code
when passing deliberately incorrect values for new parameters, got proper
-EIO and Greybus result code printed when operation stopped halfway
through.
Associated Firmware Changes: 6810-6812 on Gerrit for SW-1239, 6870 and
5612-5613 on Gerrit for SW-2945
Signed-off-by: Eli Sennesh <esennesh@leaflabs.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/camera.c')
-rw-r--r-- | drivers/staging/greybus/camera.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index dd482bd..654bfcd 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -121,17 +121,23 @@ static int gb_camera_set_intf_power_mode(struct gb_camera *gcam, u8 intf_id, ret = gb_svc_intf_set_power_mode(svc, intf_id, GB_SVC_UNIPRO_HS_SERIES_A, GB_SVC_UNIPRO_FAST_MODE, 2, 2, + GB_SVC_SMALL_AMPLITUDE, + GB_SVC_NO_DE_EMPHASIS, GB_SVC_UNIPRO_FAST_MODE, 2, 2, GB_SVC_PWRM_RXTERMINATION | - GB_SVC_PWRM_TXTERMINATION, 0); + GB_SVC_PWRM_TXTERMINATION, 0, + NULL, NULL); else ret = gb_svc_intf_set_power_mode(svc, intf_id, GB_SVC_UNIPRO_HS_SERIES_A, GB_SVC_UNIPRO_SLOW_AUTO_MODE, 2, 1, + GB_SVC_SMALL_AMPLITUDE, + GB_SVC_NO_DE_EMPHASIS, GB_SVC_UNIPRO_SLOW_AUTO_MODE, 2, 1, - 0, 0); + 0, 0, + NULL, NULL); return ret; } |