Skip to content

Commit 325c2e1

Browse files
committed
Merge remote-tracking branch 'soundwire/next' into sound/upstream-20251230
2 parents 6bd177b + dddbe80 commit 325c2e1

30 files changed

+70
-93
lines changed

Documentation/devicetree/bindings/soundwire/qcom,soundwire.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ properties:
2727
- items:
2828
- enum:
2929
- qcom,soundwire-v2.1.0
30+
- qcom,soundwire-v2.2.0
3031
- const: qcom,soundwire-v2.0.0
3132

3233
reg:

drivers/soundwire/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ config SOUNDWIRE_INTEL
4040
select AUXILIARY_BUS
4141
depends on ACPI && SND_SOC
4242
depends on SND_SOC_SOF_HDA_MLINK || !SND_SOC_SOF_HDA_MLINK
43+
depends on SND_HDA_CORE || !SND_HDA_ALIGNED_MMIO
4344
help
4445
SoundWire Intel Master driver.
4546
If you have an Intel platform which has a SoundWire Master then

drivers/soundwire/bus_type.c

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,7 @@ int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env)
7272
return 0;
7373
}
7474

75-
const struct bus_type sdw_bus_type = {
76-
.name = "soundwire",
77-
.match = sdw_bus_match,
78-
};
79-
EXPORT_SYMBOL_GPL(sdw_bus_type);
80-
81-
static int sdw_drv_probe(struct device *dev)
75+
static int sdw_bus_probe(struct device *dev)
8276
{
8377
struct sdw_slave *slave = dev_to_sdw_dev(dev);
8478
struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
@@ -164,11 +158,10 @@ static int sdw_drv_probe(struct device *dev)
164158
return 0;
165159
}
166160

167-
static int sdw_drv_remove(struct device *dev)
161+
static void sdw_bus_remove(struct device *dev)
168162
{
169163
struct sdw_slave *slave = dev_to_sdw_dev(dev);
170164
struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
171-
int ret = 0;
172165

173166
mutex_lock(&slave->sdw_dev_lock);
174167

@@ -177,22 +170,29 @@ static int sdw_drv_remove(struct device *dev)
177170
mutex_unlock(&slave->sdw_dev_lock);
178171

179172
if (drv->remove)
180-
ret = drv->remove(slave);
173+
drv->remove(slave);
181174

182175
ida_free(&slave->bus->slave_ida, slave->index);
183-
184-
return ret;
185176
}
186177

187-
static void sdw_drv_shutdown(struct device *dev)
178+
static void sdw_bus_shutdown(struct device *dev)
188179
{
189180
struct sdw_slave *slave = dev_to_sdw_dev(dev);
190181
struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
191182

192-
if (drv->shutdown)
183+
if (dev->driver && drv->shutdown)
193184
drv->shutdown(slave);
194185
}
195186

187+
const struct bus_type sdw_bus_type = {
188+
.name = "soundwire",
189+
.match = sdw_bus_match,
190+
.probe = sdw_bus_probe,
191+
.remove = sdw_bus_remove,
192+
.shutdown = sdw_bus_shutdown,
193+
};
194+
EXPORT_SYMBOL_GPL(sdw_bus_type);
195+
196196
/**
197197
* __sdw_register_driver() - register a SoundWire Slave driver
198198
* @drv: driver to register
@@ -211,9 +211,6 @@ int __sdw_register_driver(struct sdw_driver *drv, struct module *owner)
211211
}
212212

213213
drv->driver.owner = owner;
214-
drv->driver.probe = sdw_drv_probe;
215-
drv->driver.remove = sdw_drv_remove;
216-
drv->driver.shutdown = sdw_drv_shutdown;
217214
drv->driver.dev_groups = sdw_attr_groups;
218215

219216
return driver_register(&drv->driver);

drivers/soundwire/dmi-quirks.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,28 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
122122
},
123123
.driver_data = (void *)intel_tgl_bios,
124124
},
125+
{
126+
/*
127+
* quirk used for Avell B.ON (OEM rebrand of NUC15 'Bishop County'
128+
* LAPBC510 and LAPBC710)
129+
*/
130+
.matches = {
131+
DMI_MATCH(DMI_SYS_VENDOR, "Avell High Performance"),
132+
DMI_MATCH(DMI_PRODUCT_NAME, "B.ON"),
133+
},
134+
.driver_data = (void *)intel_tgl_bios,
135+
},
136+
{
137+
/*
138+
* quirk used for Avell B.ON (OEM rebrand of NUC15 'Bishop County'
139+
* LAPBC510 and LAPBC710)
140+
*/
141+
.matches = {
142+
DMI_MATCH(DMI_SYS_VENDOR, "Avell High Performance"),
143+
DMI_MATCH(DMI_PRODUCT_NAME, "B.ON"),
144+
},
145+
.driver_data = (void *)intel_tgl_bios,
146+
},
125147
{
126148
/* quirk used for NUC15 'Rooks County' LAPRC510 and LAPRC710 skews */
127149
.matches = {

drivers/soundwire/intel_auxdevice.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ struct wake_capable_part {
5252

5353
static struct wake_capable_part wake_capable_list[] = {
5454
{0x01fa, 0x4243},
55+
{0x01fa, 0x4245},
5556
{0x025d, 0x5682},
5657
{0x025d, 0x700},
5758
{0x025d, 0x711},

drivers/soundwire/qcom.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ static int qcom_swrm_stream_alloc_ports(struct qcom_swrm_ctrl *ctrl,
12281228
struct sdw_port_runtime *p_rt;
12291229
struct sdw_slave *slave;
12301230
unsigned long *port_mask;
1231-
int maxport, pn, nports = 0, ret = 0;
1231+
int maxport, pn, nports = 0;
12321232
unsigned int m_port;
12331233
struct sdw_port_config *pconfig __free(kfree) = kcalloc(ctrl->nports,
12341234
sizeof(*pconfig), GFP_KERNEL);
@@ -1246,7 +1246,8 @@ static int qcom_swrm_stream_alloc_ports(struct qcom_swrm_ctrl *ctrl,
12461246
sconfig.type = stream->type;
12471247
sconfig.bps = 1;
12481248

1249-
mutex_lock(&ctrl->port_lock);
1249+
guard(mutex)(&ctrl->port_lock);
1250+
12501251
list_for_each_entry(m_rt, &stream->master_list, stream_node) {
12511252
/*
12521253
* For streams with multiple masters:
@@ -1272,8 +1273,7 @@ static int qcom_swrm_stream_alloc_ports(struct qcom_swrm_ctrl *ctrl,
12721273

12731274
if (pn > maxport) {
12741275
dev_err(ctrl->dev, "All ports busy\n");
1275-
ret = -EBUSY;
1276-
goto out;
1276+
return -EBUSY;
12771277
}
12781278
set_bit(pn, port_mask);
12791279
pconfig[nports].num = pn;
@@ -1285,10 +1285,8 @@ static int qcom_swrm_stream_alloc_ports(struct qcom_swrm_ctrl *ctrl,
12851285

12861286
sdw_stream_add_master(&ctrl->bus, &sconfig, pconfig,
12871287
nports, stream);
1288-
out:
1289-
mutex_unlock(&ctrl->port_lock);
12901288

1291-
return ret;
1289+
return 0;
12921290
}
12931291

12941292
static int qcom_swrm_hw_params(struct snd_pcm_substream *substream,

include/linux/soundwire/sdw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ struct sdw_master_device {
705705

706706
struct sdw_driver {
707707
int (*probe)(struct sdw_slave *sdw, const struct sdw_device_id *id);
708-
int (*remove)(struct sdw_slave *sdw);
708+
void (*remove)(struct sdw_slave *sdw);
709709
void (*shutdown)(struct sdw_slave *sdw);
710710

711711
const struct sdw_device_id *id_table;

sound/soc/codecs/cs35l56-sdw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ static int cs35l56_sdw_probe(struct sdw_slave *peripheral, const struct sdw_devi
554554
return 0;
555555
}
556556

557-
static int cs35l56_sdw_remove(struct sdw_slave *peripheral)
557+
static void cs35l56_sdw_remove(struct sdw_slave *peripheral)
558558
{
559559
struct cs35l56_private *cs35l56 = dev_get_drvdata(&peripheral->dev);
560560

@@ -566,8 +566,6 @@ static int cs35l56_sdw_remove(struct sdw_slave *peripheral)
566566
sdw_write_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1, 0xFF);
567567

568568
cs35l56_remove(cs35l56);
569-
570-
return 0;
571569
}
572570

573571
static const struct dev_pm_ops cs35l56_sdw_pm = {

sound/soc/codecs/cs42l42-sdw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,14 +585,12 @@ static int cs42l42_sdw_probe(struct sdw_slave *peripheral, const struct sdw_devi
585585
return 0;
586586
}
587587

588-
static int cs42l42_sdw_remove(struct sdw_slave *peripheral)
588+
static void cs42l42_sdw_remove(struct sdw_slave *peripheral)
589589
{
590590
struct cs42l42_private *cs42l42 = dev_get_drvdata(&peripheral->dev);
591591

592592
cs42l42_common_remove(cs42l42);
593593
pm_runtime_disable(cs42l42->dev);
594-
595-
return 0;
596594
}
597595

598596
static const struct dev_pm_ops cs42l42_sdw_pm = {

sound/soc/codecs/max98373-sdw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -839,11 +839,9 @@ static int max98373_sdw_probe(struct sdw_slave *slave,
839839
return max98373_init(slave, regmap);
840840
}
841841

842-
static int max98373_sdw_remove(struct sdw_slave *slave)
842+
static void max98373_sdw_remove(struct sdw_slave *slave)
843843
{
844844
pm_runtime_disable(&slave->dev);
845-
846-
return 0;
847845
}
848846

849847
#if defined(CONFIG_OF)

0 commit comments

Comments
 (0)