Skip to content

Commit 3b02324

Browse files
committed
Merge remote-tracking branch 'soundwire/next' into sound/upstream-20220314
2 parents 72ceb2d + 266fa94 commit 3b02324

6 files changed

Lines changed: 774 additions & 419 deletions

File tree

Documentation/devicetree/bindings/soundwire/qcom,sdw.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,19 @@ board specific bus parameters.
2222
- interrupts:
2323
Usage: required
2424
Value type: <prop-encoded-array>
25-
Definition: should specify the SoundWire Controller IRQ
25+
Definition: should specify the SoundWire Controller core and optional
26+
wake IRQ
27+
28+
- interrupt-names:
29+
Usage: Optional
30+
Value type: boolean
31+
Value type: <stringlist>
32+
Definition: should be "core" for core and "wakeup" for wake interrupt.
33+
34+
- wakeup-source:
35+
Usage: Optional
36+
Value type: boolean
37+
Definition: should specify if SoundWire Controller is wake up capable.
2638

2739
- clock-names:
2840
Usage: required

drivers/soundwire/bus.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1749,8 +1749,11 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
17491749
continue;
17501750

17511751
if (status[i] == SDW_SLAVE_UNATTACHED &&
1752-
slave->status != SDW_SLAVE_UNATTACHED)
1752+
slave->status != SDW_SLAVE_UNATTACHED) {
1753+
dev_warn(&slave->dev, "Slave %d state check1: UNATTACHED, status was %d\n",
1754+
i, slave->status);
17531755
sdw_modify_slave_status(slave, SDW_SLAVE_UNATTACHED);
1756+
}
17541757
}
17551758

17561759
if (status[0] == SDW_SLAVE_ATTACHED) {
@@ -1785,6 +1788,9 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
17851788
if (slave->status == SDW_SLAVE_UNATTACHED)
17861789
break;
17871790

1791+
dev_warn(&slave->dev, "Slave %d state check2: UNATTACHED, status was %d\n",
1792+
i, slave->status);
1793+
17881794
sdw_modify_slave_status(slave, SDW_SLAVE_UNATTACHED);
17891795
break;
17901796

drivers/soundwire/intel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ static void intel_shim_wake(struct sdw_intel *sdw, bool wake_enable)
448448

449449
/* Clear wake status */
450450
wake_sts = intel_readw(shim, SDW_SHIM_WAKESTS);
451-
wake_sts |= (SDW_SHIM_WAKEEN_ENABLE << link_id);
452-
intel_writew(shim, SDW_SHIM_WAKESTS_STATUS, wake_sts);
451+
wake_sts |= (SDW_SHIM_WAKESTS_STATUS << link_id);
452+
intel_writew(shim, SDW_SHIM_WAKESTS, wake_sts);
453453
}
454454
mutex_unlock(sdw->link_res->shim_lock);
455455
}

drivers/soundwire/intel_init.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ static struct sdw_intel_ctx
180180
if (!res)
181181
return NULL;
182182

183-
if (acpi_bus_get_device(res->handle, &adev))
183+
adev = acpi_fetch_acpi_dev(res->handle);
184+
if (!adev)
184185
return NULL;
185186

186187
if (!res->count)
@@ -294,13 +295,13 @@ static struct sdw_intel_ctx
294295
static int
295296
sdw_intel_startup_controller(struct sdw_intel_ctx *ctx)
296297
{
297-
struct acpi_device *adev;
298+
struct acpi_device *adev = acpi_fetch_acpi_dev(ctx->handle);
298299
struct sdw_intel_link_dev *ldev;
299300
u32 caps;
300301
u32 link_mask;
301302
int i;
302303

303-
if (acpi_bus_get_device(ctx->handle, &adev))
304+
if (!adev)
304305
return -EINVAL;
305306

306307
/* Check SNDWLCAP.LCOUNT */

0 commit comments

Comments
 (0)