All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Koul, Vinod" <vinod.koul@intel.com>
Cc: alsa-devel@alsa-project.org,
	Harsha Priya <priya.harsha@intel.com>,
	lrg@slimlogic.co.uk
Subject: Re: [PATCH 2/3] ASoC: mfld_machine: Add support for jack detection
Date: Wed, 9 Feb 2011 13:55:06 +0000	[thread overview]
Message-ID: <20110209135506.GD24042@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1297242747-18632-3-git-send-email-vinod.koul@intel.com>

On Wed, Feb 09, 2011 at 02:42:26PM +0530, Koul, Vinod wrote:

> +	sn95031_jack_detection(&jack_data);
> +	/* If american headest, program the gpio control registers */
> +	if (jack_data.micbias_vol >=  MFLD_MV_HP &&
> +		jack_data.micbias_vol <  MFLD_MV_HS)
> +		snd_soc_update_bits(mfld_jack.codec, SN95031_AUDIO_GPIO_CTRL,
> +				BIT(1), BIT(1));
> +	else
> +		snd_soc_update_bits(mfld_jack.codec, SN95031_AUDIO_GPIO_CTRL,
> +				BIT(1), BIT(0));

This looks like the CODEC driver should be exporting gpiolib support -
that'd make it much easier for others to reuse the GPIOs in their
designs (eg, powering external amplifiers).

> +static irqreturn_t snd_mfld_jack_intr_handler(int irq, void *dev)
> +{
> +	struct mfld_mc_private *mc_private = (struct mfld_mc_private *) dev;
> +
> +	memcpy_fromio(&mc_private->interrupt_status,
> +			((void *)(mc_private->int_base)),
> +			sizeof(u8));
> +	return IRQ_WAKE_THREAD;
> +}

Seems like it'd be as easy to do the copy in the main interrupt handler
rather than bothering with having a primary handler but it doesn't
really matter.

  reply	other threads:[~2011-02-09 13:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09  9:12 [PATCH 0/3] add support for jack detection in mid-x86 Koul, Vinod
2011-02-09  9:12 ` [PATCH 1/3] ASoC: sn95031: Add jack support in the codec Koul, Vinod
2011-02-09 12:11   ` Mark Brown
2011-02-09 13:06     ` Koul, Vinod
2011-02-09 13:07       ` Mark Brown
2011-02-09  9:12 ` [PATCH 2/3] ASoC: mfld_machine: Add support for jack detection Koul, Vinod
2011-02-09 13:55   ` Mark Brown [this message]
2011-02-09 14:38     ` Koul, Vinod
2011-02-09 14:39       ` Mark Brown
2011-02-09 14:53         ` Koul, Vinod
2011-02-09  9:12 ` [PATCH 3/3] ASoC: sn95031: Add support for reading mic bias Koul, Vinod
2011-02-09 15:06   ` Mark Brown
2011-02-09 15:09     ` Koul, Vinod
  -- strict thread matches above, loose matches on Subject: below --
2011-02-09 16:14 [PATCH 0/3] add support for jack detection in mid-x86 Koul, Vinod
2011-02-09 16:14 ` [PATCH 2/3] ASoC: mfld_machine: Add support for jack detection Koul, Vinod

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=20110209135506.GD24042@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=priya.harsha@intel.com \
    --cc=vinod.koul@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.