lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1304719780-27347-3-git-send-email-lrodriguez@atheros.com>
Date:	Fri, 6 May 2011 15:09:40 -0700
From:	"Luis R. Rodriguez" <lrodriguez@...eros.com>
To:	<akpm@...ux-foundation.org>, <mingo@...hat.com>,
	<tglx@...utronix.de>, <hpa@...or.com>
CC:	<x86@...nel.org>, <linux-kernel@...r.kernel.org>,
	<linux-wireless@...r.kernel.org>, <allen.kao@...eros.com>,
	<roman.gezikov@...eros.com>, <joonas.viskari@...eros.com>,
	"Luis R. Rodriguez" <lrodriguez@...eros.com>
Subject: [RFC 2/2] x86: add Atheros ar1520 platform support for mrst

From: Allen Kao <allen.kao@...eros.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@...eros.com>
Cc: Joonas Viskari <joonas.viskari@...eros.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: x86@...nel.org
Signed-off-by: Allen Kao <allen.kao@...eros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@...eros.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ