Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752756Ab1EFWJ5 (ORCPT ); Fri, 6 May 2011 18:09:57 -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 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 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2350 Lines: 70 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}, {}, }; -- 1.7.4.15.g7811d -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/