lkml.org 
[lkml]   [2011]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 2/2] x86: add Atheros ar1520 platform support for mrst
Date
From: Allen Kao <allen.kao@atheros.com>

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@atheros.com>
Cc: Joonas Viskari <joonas.viskari@atheros.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: x86@kernel.org
Signed-off-by: Allen Kao <allen.kao@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
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


\
 
 \ /
  Last update: 2011-05-07 00:13    [W:0.039 / U:3.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site