From patchwork Tue Jun 15 15:55:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manuel Lauss X-Patchwork-Id: 106242 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5FFu0OT008821 for ; Tue, 15 Jun 2010 15:56:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752443Ab0FOPz7 (ORCPT ); Tue, 15 Jun 2010 11:55:59 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:63423 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751196Ab0FOPz7 (ORCPT ); Tue, 15 Jun 2010 11:55:59 -0400 Received: by mail-fx0-f46.google.com with SMTP id 10so257696fxm.19 for ; Tue, 15 Jun 2010 08:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=9EQV2GjrQ0rebmGBKNmW5s/HaSmRwDGCmeDzXU4DJus=; b=uS15Hyi3Fb9q8cp3/vQRml5pwhCuks5CDdNXQfzTuJ3m6CkKULidgoHHvbsb9YWmHY indKp92fvRkZYrPCJveONCAR6F/do8jQoOd7EA1ElzCWAYoNJ0DwXSMVD/lLswgvFsJR +s5OiK6ib4+u8PkWB4eG8tis2S8Yn3YRgVm10= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=hrUHifY8l8u697hEL7QBmNCT0xFiASV+pCtDmPsMuwq1rCEjuAKbpVn2ivr8ftf+hg o/4xW3M+kZWJKsHZRfxjLQFlO2vY6JLCdQ1Goxa+1U7KyySsv61waxj8Z8mO+UVxUkMb pTOUyUqxQ6fJv3iLOzIjQzbrbftihiDcQ9qBc= Received: by 10.223.15.216 with SMTP id l24mr7450109faa.92.1276617358092; Tue, 15 Jun 2010 08:55:58 -0700 (PDT) Received: from localhost.localdomain (p5496BAFC.dip.t-dialin.net [84.150.186.252]) by mx.google.com with ESMTPS id p21sm10077036fak.21.2010.06.15.08.55.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 15 Jun 2010 08:55:57 -0700 (PDT) From: Manuel Lauss To: alsa-devel@vger.kernel.org, Mark Brown Cc: linux-input@vger.kernel.org, Manuel Lauss Subject: [PATCH RFC 2/3] input: wm97xx: set GPIOs with AC97 GPIO busops if implemented Date: Tue, 15 Jun 2010 17:55:46 +0200 Message-Id: <1276617347-3522-3-git-send-email-manuel.lauss@googlemail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1276617347-3522-1-git-send-email-manuel.lauss@googlemail.com> References: <1276617347-3522-1-git-send-email-manuel.lauss@googlemail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 15 Jun 2010 15:56:01 +0000 (UTC) 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);