All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Lauss <manuel.lauss@googlemail.com>
To: alsa-devel@vger.kernel.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-input@vger.kernel.org, Manuel Lauss <manuel.lauss@googlemail.com>
Subject: [PATCH RFC 2/3] input: wm97xx: set GPIOs with AC97 GPIO busops if implemented
Date: Tue, 15 Jun 2010 17:55:46 +0200	[thread overview]
Message-ID: <1276617347-3522-3-git-send-email-manuel.lauss@googlemail.com> (raw)
In-Reply-To: <1276617347-3522-1-git-send-email-manuel.lauss@googlemail.com>

If the AC97 controller implements the ->setgpio callback, use it.
Some codecs (i.e. WM9712) only accept GPIO data through AC97 slot 12.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
---
 drivers/input/touchscreen/wm97xx-core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index cbfef1e..4f7b38c 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -206,7 +206,10 @@ void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
 		reg &= ~gpio;
 
 	if (wm->id == WM9712_ID2 && wm->variant != WM97xx_WM1613)
-		wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg << 1);
+		reg <<= 1;
+
+	if (wm->ac97->bus->ops->setgpio)
+		wm->ac97->bus->ops->setgpio(wm->ac97, reg);
 	else
 		wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg);
 	mutex_unlock(&wm->codec_mutex);
-- 
1.7.1


  parent reply	other threads:[~2010-06-15 15:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 15:55 [PATCH RFC 0/3] WM97xx AC97 GPIO support Manuel Lauss
2010-06-15 15:55 ` [PATCH RFC 1/3] sound: ac97: Add GPIO manipulation hooks Manuel Lauss
2010-06-15 15:55 ` Manuel Lauss
2010-06-15 16:02   ` Mark Brown
2010-06-15 16:13     ` Manuel Lauss
2010-06-15 16:13     ` Manuel Lauss
2010-06-16  7:55     ` Takashi Iwai
2010-06-16  7:55     ` Takashi Iwai
2010-06-16  8:00       ` Manuel Lauss
2010-06-16 12:52         ` Mark Brown
2010-06-16 12:52         ` Mark Brown
2010-06-16  8:00       ` Manuel Lauss
2010-06-15 16:02   ` Mark Brown
2010-06-15 15:55 ` Manuel Lauss [this message]
2010-06-15 16:08   ` [PATCH RFC 2/3] input: wm97xx: set GPIOs with AC97 GPIO busops if implemented Mark Brown
2010-06-15 16:08   ` Mark Brown
2010-06-15 16:17     ` Manuel Lauss
2010-06-15 16:17     ` Manuel Lauss
2010-06-15 16:27       ` Mark Brown
2010-06-15 16:27       ` Mark Brown
2010-06-15 15:55 ` Manuel Lauss
2010-06-15 15:55 ` [PATCH RFC 3/3] sound: asoc: au1x: implement AC97 GPIO access Manuel Lauss
2010-06-15 15:55 ` Manuel Lauss

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=1276617347-3522-3-git-send-email-manuel.lauss@googlemail.com \
    --to=manuel.lauss@googlemail.com \
    --cc=alsa-devel@vger.kernel.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-input@vger.kernel.org \
    /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.