From patchwork Fri May 6 22:09:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 763362 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p46MAQdS019068 for ; Fri, 6 May 2011 22:10:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752513Ab1EFWJ4 (ORCPT ); Fri, 6 May 2011 18:09:56 -0400 Received: from mail.atheros.com ([12.19.149.2]:15495 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752084Ab1EFWJu (ORCPT ); Fri, 6 May 2011 18:09:50 -0400 Received: from mail.atheros.com ([10.10.20.108]) by sidewinder.atheros.com for ; Fri, 06 May 2011 15:09:22 -0700 Received: from tux (10.10.11.103) by SC1EXHC-02.global.atheros.com (10.234.20.111) with Microsoft SMTP Server (TLS) id 8.2.213.0; Fri, 6 May 2011 15:09:49 -0700 Received: by tux (sSMTP sendmail emulation); Fri, 06 May 2011 15:09:47 -0700 From: "Luis R. Rodriguez" To: , , , CC: , , , , , , "Luis R. Rodriguez" Subject: [RFC 2/2] x86: add Atheros ar1520 platform support for mrst Date: Fri, 6 May 2011 15:09:40 -0700 Message-ID: <1304719780-27347-3-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.7.4.15.g7811d In-Reply-To: <1304719780-27347-1-git-send-email-lrodriguez@atheros.com> References: <1304719780-27347-1-git-send-email-lrodriguez@atheros.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 06 May 2011 22:10:27 +0000 (UTC) From: Allen Kao This adds platform driver support for Atheros ar1520 GPS device on the Intel Moorestown Low Power Intel Architecture (LPIA) based Moblin Internet Device (MID) platform. Cc: Roman Gezikov Cc: Joonas Viskari Cc: Andrew Morton Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: x86@kernel.org Signed-off-by: Allen Kao Signed-off-by: Luis R. Rodriguez --- arch/x86/platform/mrst/mrst.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 7000e74..e02d92f 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -475,6 +476,22 @@ static void __init *lis331dl_platform_data(void *info) return &intr2nd_pdata; } +static void __init *ar1520_gps_platform_data(void *info) +{ + static struct ar1520_platform_data ar1520_i2c_pdata; + int rts = get_gpio_by_name("gps_rts"); + int wakeup = get_gpio_by_name("gps_wakeup"); + int reset = get_gpio_by_name("gps_reset"); + + if (rts == -1 || wakeup == -1 || reset == -1) + return NULL; + ar1520_i2c_pdata.gps_gpio_rts = rts; + ar1520_i2c_pdata.gps_gpio_wakeup = wakeup; + ar1520_i2c_pdata.gps_gpio_reset = reset; + + return &ar1520_i2c_pdata; +} + static void __init *no_platform_data(void *info) { return NULL; @@ -489,6 +506,7 @@ static const struct devs_id __initconst device_ids[] = { {"i2c_accel", SFI_DEV_TYPE_I2C, 0, &lis331dl_platform_data}, {"pmic_audio", SFI_DEV_TYPE_IPC, 1, &no_platform_data}, {"msic_audio", SFI_DEV_TYPE_IPC, 1, &no_platform_data}, + {"ath1520a", SFI_DEV_TYPE_I2C, 1, &ar1520_gps_platform_data}, {}, };