Unverified Commit 93f38ef6 authored by Mark Brown's avatar Mark Brown
Browse files

Merge branch 'asoc-5.1' into asoc-5.2

parents 552f2d7e 780f202f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -802,8 +802,13 @@ struct snd_soc_component_driver {
	int probe_order;
	int remove_order;

	/* signal if the module handling the component cannot be removed */
	unsigned int ignore_module_refcount:1;
	/*
	 * signal if the module handling the component should not be removed
	 * if a pcm is open. Setting this would prevent the module
	 * refcount being incremented in probe() but allow it be incremented
	 * when a pcm is opened and decremented when it is closed.
	 */
	unsigned int module_get_upon_open:1;

	/* bits */
	unsigned int idle_bias_on:1;
+11 −0
Original line number Diff line number Diff line
@@ -1635,6 +1635,16 @@ err:
	return ret;
}

static int cs35l35_i2c_remove(struct i2c_client *i2c_client)
{
	struct cs35l35_private *cs35l35 = i2c_get_clientdata(i2c_client);

	regulator_bulk_disable(cs35l35->num_supplies, cs35l35->supplies);
	gpiod_set_value_cansleep(cs35l35->reset_gpio, 0);

	return 0;
}

static const struct of_device_id cs35l35_of_match[] = {
	{.compatible = "cirrus,cs35l35"},
	{},
@@ -1655,6 +1665,7 @@ static struct i2c_driver cs35l35_i2c_driver = {
	},
	.id_table = cs35l35_id,
	.probe = cs35l35_i2c_probe,
	.remove = cs35l35_i2c_remove,
};

module_i2c_driver(cs35l35_i2c_driver);
+11 −0
Original line number Diff line number Diff line
@@ -1854,6 +1854,17 @@ static int hdmi_codec_probe(struct snd_soc_component *component)
	/* Imp: Store the card pointer in hda_codec */
	hdmi->card = dapm->card->snd_card;

	/*
	 * Setup a device_link between card device and HDMI codec device.
	 * The card device is the consumer and the HDMI codec device is
	 * the supplier. With this setting, we can make sure that the audio
	 * domain in display power will be always turned on before operating
	 * on the HDMI audio codec registers.
	 * Let's use the flag DL_FLAG_AUTOREMOVE_CONSUMER. This can make
	 * sure the device link is freed when the machine driver is removed.
	 */
	device_link_add(component->card->dev, &hdev->dev, DL_FLAG_RPM_ACTIVE |
			DL_FLAG_AUTOREMOVE_CONSUMER);
	/*
	 * hdac_device core already sets the state to active and calls
	 * get_noresume. So enable runtime and set the device to suspend.
+1 −1
Original line number Diff line number Diff line
@@ -2588,6 +2588,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,

	rt5682_reset(rt5682->regmap);

	mutex_init(&rt5682->calibrate_mutex);
	rt5682_calibrate(rt5682);

	ret = regmap_multi_reg_write(rt5682->regmap, patch_list,
@@ -2654,7 +2655,6 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
	INIT_DELAYED_WORK(&rt5682->jd_check_work,
				rt5682_jd_check_handler);

	mutex_init(&rt5682->calibrate_mutex);

	if (i2c->irq) {
		ret = devm_request_threaded_irq(&i2c->dev, i2c->irq, NULL,
+8 −1
Original line number Diff line number Diff line
@@ -1462,13 +1462,20 @@ static int skl_platform_soc_probe(struct snd_soc_component *component)
	return 0;
}

static void skl_pcm_remove(struct snd_soc_component *component)
{
	/* remove topology */
	snd_soc_tplg_component_remove(component, SND_SOC_TPLG_INDEX_ALL);
}

static const struct snd_soc_component_driver skl_component  = {
	.name		= "pcm",
	.probe		= skl_platform_soc_probe,
	.remove		= skl_pcm_remove,
	.ops		= &skl_platform_ops,
	.pcm_new	= skl_pcm_new,
	.pcm_free	= skl_pcm_free,
	.ignore_module_refcount = 1, /* do not increase the refcount in core */
	.module_get_upon_open = 1, /* increment refcount when a pcm is opened */
};

int skl_platform_register(struct device *dev)
Loading