mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: <akpm@linux-foundation.org>, <mingo@redhat.com>,
	<tglx@linutronix.de>, <hpa@zytor.com>
Cc: <x86@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-wireless@vger.kernel.org>, <allen.kao@atheros.com>,
	<roman.gezikov@atheros.com>, <joonas.viskari@atheros.com>,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>
Subject: [RFC 2/2] x86: add Atheros ar1520 platform support for mrst
Date: Fri, 6 May 2011 15:09:40 -0700	[thread overview]
Message-ID: <1304719780-27347-3-git-send-email-lrodriguez@atheros.com> (raw)
In-Reply-To: <1304719780-27347-1-git-send-email-lrodriguez@atheros.com>

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


  parent reply	other threads:[~2011-05-06 22:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 22:09 [RFC 0/2] x86: Add support for Atheros AR1520 GPS devices Luis R. Rodriguez
2011-05-06 22:09 ` [RFC 1/2] misc: add Atheros ar1520 GPS support Luis R. Rodriguez
2011-05-06 22:15   ` Randy Dunlap
2011-05-06 22:26   ` Alan Cox
2011-05-06 23:31     ` Luis R. Rodriguez
2011-05-06 22:09 ` Luis R. Rodriguez [this message]
2011-05-06 22:28   ` [RFC 2/2] x86: add Atheros ar1520 platform support for mrst Alan Cox
2011-05-06 23:27     ` Luis R. Rodriguez
2011-05-07  0:38 ` [RFC 0/2] x86: Add support for Atheros AR1520 GPS devices Greg KH
2011-05-07  4:32   ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304719780-27347-3-git-send-email-lrodriguez@atheros.com \
    --to=lrodriguez@atheros.com \
    --cc=akpm@linux-foundation.org \
    --cc=allen.kao@atheros.com \
    --cc=hpa@zytor.com \
    --cc=joonas.viskari@atheros.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=roman.gezikov@atheros.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®