summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/svc.h
diff options
context:
space:
mode:
authorEli Sennesh <esennesh@leaflabs.com>2016-06-03 11:24:44 -0400
committerGreg Kroah-Hartman <gregkh@google.com>2016-06-09 18:14:00 -0700
commit8c2522d87ab20ba245ddf92e4e8b19a76e5760fd (patch)
treeb8524650818e94f2154a0557ecdbb5b2b0795ff5 /drivers/staging/greybus/svc.h
parent62e04623530c9a4312817438dea4859c549d01c1 (diff)
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. We must make sure to zero the request structure sent across the wire, lest bite us most cruelly, and we fix by changing the Set Power Mode Response structure to use a __u8 rather than a __le16. 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. Could induce error by initializing request struct with random nonsense, and can stop it by initializing request struct with zeroes. Associated Firmware Changes: 1669-1671 on Android N Gerrit for SW-2945 Signed-off-by: Eli Sennesh <esennesh@leaflabs.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/svc.h')
-rw-r--r--drivers/staging/greybus/svc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/greybus/svc.h b/drivers/staging/greybus/svc.h
index 7a78c5bffbe6..dab8fbab2380 100644
--- a/drivers/staging/greybus/svc.h
+++ b/drivers/staging/greybus/svc.h
@@ -79,8 +79,11 @@ int gb_svc_dme_peer_set(struct gb_svc *svc, u8 intf_id, u16 attr, u16 selector,
u32 value);
int gb_svc_intf_set_power_mode(struct gb_svc *svc, u8 intf_id, u8 hs_series,
u8 tx_mode, u8 tx_gear, u8 tx_nlanes,
+ u8 tx_amplitude, u8 tx_hs_equalizer,
u8 rx_mode, u8 rx_gear, u8 rx_nlanes,
- u8 flags, u32 quirks);
+ u8 flags, u32 quirks,
+ struct gb_svc_l2_timer_cfg *local,
+ struct gb_svc_l2_timer_cfg *remote);
int gb_svc_ping(struct gb_svc *svc);
int gb_svc_watchdog_create(struct gb_svc *svc);
void gb_svc_watchdog_destroy(struct gb_svc *svc);