Created
October 21, 2014 06:55
-
-
Save arodland/518f037e4f24b1984286 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/arm/mach-mx6/board-mx6_seco_UDOO.c b/arch/arm/mach-mx6/board-mx6_seco_UDOO.c | |
index 435a50d..7689c7d 100644 | |
--- a/arch/arm/mach-mx6/board-mx6_seco_UDOO.c | |
+++ b/arch/arm/mach-mx6/board-mx6_seco_UDOO.c | |
@@ -46,6 +46,7 @@ | |
#include <linux/fec.h> | |
#include <linux/memblock.h> | |
#include <linux/gpio.h> | |
+#include <linux/pps-gpio.h> | |
#include <linux/etherdevice.h> | |
#include <linux/regulator/anatop-regulator.h> | |
#include <linux/regulator/consumer.h> | |
@@ -918,6 +919,32 @@ void set_gpios_directions(void) | |
} | |
+/* PPS-GPIO platform data */ | |
+static struct pps_gpio_platform_data pps_gpio_info = { | |
+ .assert_falling_edge = false, | |
+ .capture_clear= false, | |
+ .gpio_pin=MX6DL_PAD_SD4_DAT0__GPIO_MODE, | |
+ .gpio_label="PPS", | |
+}; | |
+ | |
+static struct platform_device pps_gpio_device = { | |
+ .name = "pps-gpio", | |
+ .id = -1, | |
+ .dev = { | |
+ .platform_data = &pps_gpio_info | |
+ }, | |
+}; | |
+ | |
+static void pps_init(void) { | |
+ int err; | |
+ | |
+ err = platform_device_register(&pps_gpio_device); | |
+ if (err) { | |
+ pr_warning("Could not register PPS_GPIO device"); | |
+ } else { | |
+ printk("GPS PPIO registered"); | |
+ } | |
+} | |
/*********************************************************************** | |
* BOARD INIT * | |
@@ -1080,6 +1107,8 @@ static void __init mx6_seco_UDOO_board_init(void) | |
imx6q_add_hdmi_soc(); | |
imx6q_add_hdmi_soc_dai(); | |
+ pps_init(); | |
+ | |
clko2 = clk_get(NULL, "clko2_clk"); | |
if (IS_ERR(clko2)) | |
diff --git a/arch/arm/mach-mx6/board-mx6sdl_seco_UDOO.h b/arch/arm/mach-mx6/board-mx6sdl_seco_UDOO.h | |
index 09fb9eb..44a96ed 100644 | |
--- a/arch/arm/mach-mx6/board-mx6sdl_seco_UDOO.h | |
+++ b/arch/arm/mach-mx6/board-mx6sdl_seco_UDOO.h | |
@@ -475,7 +475,7 @@ static unsigned int mx6dl_set_in_inputmode[] = { | |
MX6DL_PAD_GPIO_1__GPIO_MODE, | |
MX6DL_PAD_GPIO_9__GPIO_MODE, | |
MX6DL_PAD_GPIO_3__GPIO_MODE, | |
- MX6DL_PAD_SD4_DAT0__GPIO_MODE, | |
+// MX6DL_PAD_SD4_DAT0__GPIO_MODE, | |
MX6DL_PAD_EIM_D21__GPIO_MODE, | |
MX6DL_PAD_EIM_D28__GPIO_MODE, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment