diff options
author | Jeffrey Carlyle <jcarlyle@google.com> | 2016-05-25 16:38:47 -0700 |
---|---|---|
committer | Jeffrey Carlyle <jcarlyle@google.com> | 2016-05-25 17:20:34 -0700 |
commit | 91a8030f781d27e84661c4a4edf1e108bfc1c594 (patch) | |
tree | 1517143eb0f4e76c054efdc49130dac02c3eec06 /drivers/staging/greybus/svc.c | |
parent | 00606367141cf518e94d8354a02d298475de67e5 (diff) |
greybus: Revert "update UniPro Set Interface Power Mode operation to match spec"
This reverts commit 29fee8c55b59bb6ac59b99a0563c89c514cba42b.
This change and its companion NuttX changes seem to be triggering a
storm of POWERMODEIND switch interrupts on the SVC.
Signed-off-by: Jeffrey Carlyle <jcarlyle@google.com>
Acked-by: Sandeep Patil <sspatil@google.com>
Diffstat (limited to 'drivers/staging/greybus/svc.c')
-rw-r--r-- | drivers/staging/greybus/svc.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index 90094cf1a5eb..78cc0e38828d 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -578,33 +578,23 @@ void gb_svc_route_destroy(struct gb_svc *svc, u8 intf1_id, u8 intf2_id) 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, - struct gb_svc_l2_timer_cfg *local, - struct gb_svc_l2_timer_cfg *remote) + u8 flags, u32 quirks) { struct gb_svc_intf_set_pwrm_request request; struct gb_svc_intf_set_pwrm_response response; int ret; - u16 result_code; request.intf_id = intf_id; request.hs_series = hs_series; request.tx_mode = tx_mode; request.tx_gear = tx_gear; request.tx_nlanes = tx_nlanes; - request.tx_amplitude = tx_amplitude; - request.tx_hs_equalizer = tx_hs_equalizer; request.rx_mode = rx_mode; request.rx_gear = rx_gear; request.rx_nlanes = rx_nlanes; request.flags = flags; request.quirks = cpu_to_le32(quirks); - if (local) - request.local_l2timerdata = *local; - if (remote) - request.remote_l2timerdata = *remote; ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_INTF_SET_PWRM, &request, sizeof(request), @@ -612,13 +602,7 @@ int gb_svc_intf_set_power_mode(struct gb_svc *svc, u8 intf_id, u8 hs_series, if (ret < 0) return ret; - result_code = le16_to_cpu(response.result_code); - if (result_code != GB_SVC_SETPWRM_PWR_LOCAL) { - dev_err(&svc->dev, "set power mode = %d\n", result_code); - return -EIO; - } - - return 0; + return le16_to_cpu(response.result_code); } EXPORT_SYMBOL_GPL(gb_svc_intf_set_power_mode); @@ -942,11 +926,9 @@ static void gb_svc_process_hello_deferred(struct gb_operation *operation) 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, - NULL, NULL); + 0, 0); if (ret) dev_warn(&svc->dev, |