Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: bardliao@realtek.com, broonie@kernel.org, lgirdwood@gmail.com
Cc: oder_chiou@realtek.com, alsa-devel@alsa-project.org, flove@realtek.com
Subject: Re: [PATCH] ASoC: rt286: Set cbj_en for ACPI devices
Date: Wed, 10 Sep 2014 08:32:59 +0200	[thread overview]
Message-ID: <540FF09B.4080608@metafoo.de> (raw)
In-Reply-To: <1410313233-585-1-git-send-email-bardliao@realtek.com>

On 09/10/2014 03:40 AM, bardliao@realtek.com wrote:
[...]
> +	/* enable jack combo mode on supported devices */
> +	acpiid = acpi_match_device(dev->driver->acpi_match_table, dev);
> +	if (acpiid) {
> +		for (mach = rt286_jack_combo; mach->acpi_id; mach++) {
> +			if (!strcmp(mach->acpi_id, acpiid->id))
> +				rt286->pdata.cbj_en =
> +					rt286_jack_combo->jack_combo;
> +
> +		}
> +	}

Don't invent your own mechanism for this. Use the driver_data field from the 
acpi_device_id table.

> +
>   	regmap_write(rt286->regmap, RT286_SET_AUDIO_POWER, AC_PWRST_D3);
>
>   	for (i = 0; i < RT286_POWER_REG_LEN; i++)
>

  reply	other threads:[~2014-09-10  6:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10  1:40 [PATCH] ASoC: rt286: Set cbj_en for ACPI devices bardliao
2014-09-10  6:32 ` Lars-Peter Clausen [this message]
2014-09-10 10:00 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=540FF09B.4080608@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox