lkml.org 
[lkml]   [2020]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 09/13] soundwire: intel: add CLK_STOP_BUS_RESET support
From
Date



>> + } else if (clock_stop_quirks & SDW_INTEL_CLK_STOP_BUS_RESET) {
>> + ret = sdw_cdns_clock_stop(cdns, true);
>> + if (ret < 0) {
>> + dev_err(dev, "cannot enable clock stop on suspend\n");
>> + return ret;
>> + }
>> +
>> + ret = sdw_cdns_enable_interrupt(cdns, false);
>> + if (ret < 0) {
>> + dev_err(dev, "cannot disable interrupts on suspend\n");
>> + return ret;
>> + }
>> +
>> + ret = intel_link_power_down(sdw);
>> + if (ret) {
>> + dev_err(dev, "Link power down failed: %d", ret);
>> + return ret;
>> + }
>
> no cleanup on all the error cases here?

See above the 'else if' test, the clock stop on suspend will be followed
by a bus reset on resume. this is essentially a complete bus restart.

The only open here is whether we should actually return an error while
suspending, or just log the error and squelch it. We decided to return
the status so that the pm_runtime suspend does not proceed: the state
remains active which is easier to detect than a single line in a dmesg log.

\
 
 \ /
  Last update: 2020-08-17 16:31    [W:0.567 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site