Commit 8c7df021 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'asoc/topic/max98090' into asoc-next

parents 406554fe 959b6250
Loading
Loading
Loading
Loading
+16 −29
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@
#include <sound/max98090.h>
#include "max98090.h"

#include <linux/version.h>

#define DEBUG
#define EXTMIC_METHOD
#define EXTMIC_METHOD_TEST
@@ -1703,9 +1701,8 @@ static int max98090_dai_set_fmt(struct snd_soc_dai *codec_dai,
		 * seen for the case of TDM mode. The remaining cases have
		 * normal logic.
		 */
		if (max98090->tdm_slots > 1) {
		if (max98090->tdm_slots > 1)
			regval ^= M98090_BCI_MASK;
		}

		snd_soc_write(codec,
			M98090_REG_INTERFACE_FORMAT, regval);
@@ -2059,17 +2056,14 @@ static irqreturn_t max98090_interrupt(int irq, void *data)
	if (!active)
		return IRQ_NONE;

	if (active & M98090_CLD_MASK) {
	if (active & M98090_CLD_MASK)
		dev_err(codec->dev, "M98090_CLD_MASK\n");
	}

	if (active & M98090_SLD_MASK) {
	if (active & M98090_SLD_MASK)
		dev_dbg(codec->dev, "M98090_SLD_MASK\n");
	}

	if (active & M98090_ULK_MASK) {
	if (active & M98090_ULK_MASK)
		dev_err(codec->dev, "M98090_ULK_MASK\n");
	}

	if (active & M98090_JDET_MASK) {
		dev_dbg(codec->dev, "M98090_JDET_MASK\n");
@@ -2080,13 +2074,11 @@ static irqreturn_t max98090_interrupt(int irq, void *data)
			msecs_to_jiffies(100));
	}

	if (active & M98090_DRCACT_MASK) {
	if (active & M98090_DRCACT_MASK)
		dev_dbg(codec->dev, "M98090_DRCACT_MASK\n");
	}

	if (active & M98090_DRCCLP_MASK) {
	if (active & M98090_DRCCLP_MASK)
		dev_err(codec->dev, "M98090_DRCCLP_MASK\n");
	}

	return IRQ_HANDLED;
}
@@ -2324,7 +2316,7 @@ static int max98090_i2c_probe(struct i2c_client *i2c,
	max98090->pdata = i2c->dev.platform_data;
	max98090->irq = i2c->irq;

	max98090->regmap = regmap_init_i2c(i2c, &max98090_regmap);
	max98090->regmap = devm_regmap_init_i2c(i2c, &max98090_regmap);
	if (IS_ERR(max98090->regmap)) {
		ret = PTR_ERR(max98090->regmap);
		dev_err(&i2c->dev, "Failed to allocate regmap: %d\n", ret);
@@ -2334,18 +2326,13 @@ static int max98090_i2c_probe(struct i2c_client *i2c,
	ret = snd_soc_register_codec(&i2c->dev,
			&soc_codec_dev_max98090, max98090_dai,
			ARRAY_SIZE(max98090_dai));
	if (ret < 0)
		regmap_exit(max98090->regmap);

err_enable:
	return ret;
}

static int max98090_i2c_remove(struct i2c_client *client)
{
	struct max98090_priv *max98090 = dev_get_drvdata(&client->dev);
	snd_soc_unregister_codec(&client->dev);
	regmap_exit(max98090->regmap);
	return 0;
}

@@ -2369,7 +2356,7 @@ static int max98090_runtime_suspend(struct device *dev)
	return 0;
}

static struct dev_pm_ops max98090_pm = {
static const struct dev_pm_ops max98090_pm = {
	SET_RUNTIME_PM_OPS(max98090_runtime_suspend,
		max98090_runtime_resume, NULL)
};