From: Allen Kao <allen.kao@xxxxxxxxxxx> 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 <roman.gezikov@xxxxxxxxxxx> Cc: Joonas Viskari <joonas.viskari@xxxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: x86@xxxxxxxxxx Signed-off-by: Allen Kao <allen.kao@xxxxxxxxxxx> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx> --- 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 <linux/spi/spi.h> #include <linux/i2c.h> #include <linux/i2c/pca953x.h> +#include <linux/ar1520.h> #include <linux/gpio_keys.h> #include <linux/input.h> #include <linux/platform_device.h> @@ -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-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html