[alsa-devel] [PATCH] ASoC: add rt298 codec driver

Mark Brown broonie at kernel.org
Thu Jul 9 13:09:22 CEST 2015


On Fri, Jun 26, 2015 at 10:59:49AM +0800, Bard Liao wrote:
> It is the initial version of ALC298 codec driver.

I'll apply this but a few things here which you should look at:

> +static int rt298_probe(struct snd_soc_codec *codec)
> +{
> +	struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec);
> +
> +	rt298->codec = codec;
> +
> +	if (rt298->i2c->irq) {
> +		regmap_update_bits(rt298->regmap,
> +					RT298_IRQ_CTRL, 0x2, 0x2);
> +
> +		INIT_DELAYED_WORK(&rt298->jack_detect_work,
> +					rt298_jack_detect_work);
> +		schedule_delayed_work(&rt298->jack_detect_work,
> +					msecs_to_jiffies(1250));

That seems like an awfully long time to wait to do the first jack
detection.  What's this for?

> +static int rt298_i2c_probe(struct i2c_client *i2c,
> +			   const struct i2c_device_id *id)
> +{
> +	struct rt298_platform_data *pdata = dev_get_platdata(&i2c->dev);
> +	struct rt298_priv *rt298;
> +	struct device *dev = &i2c->dev;
> +	const struct acpi_device_id *acpiid;
> +	int i, ret;
> +
> +	pr_info("%s\n", __func__);

This isn't adding anything, you should remove it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150709/82386ca7/attachment.sig>


More information about the Alsa-devel mailing list