Skip to contentSkip to conversation

ARM: OMAP: WiLink platform data for the PandaBoard

PATCH Superseded Mircea Gherzan 2 participants 2 messages Mar 6, 2012

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP: WiLink platform data for the PandaBoard

The "uim" deamon requires sysfs entries that are filled in using this platform data.

---
 arch/arm/mach-omap2/board-omap4panda.c |   23 +++++++++++++++++------
 include/linux/ti_wilink_st.h           |    2 ++
 2 files changed, 19 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +17 -6
index b1d74d6..37b437f 100644
@@ -27,6 +27,7 @@
 #include <linux/i2c/twl.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/fixed.h>
+#include <linux/ti_wilink_st.h>
 #include <linux/wl12xx.h>
 
 #include <mach/hardware.h>
@@ -56,15 +57,29 @@
 #define HDMI_GPIO_HPD  63 /* Hotplug detect */
 
 /* wl127x BT, FM, GPS connectivity chip */
-static int wl1271_gpios[] = {46, -1, -1};
+static struct ti_st_plat_data wilink_platform_data = {
+        .nshutdown_gpio	= 46,
+        .dev_name	= "/dev/ttyO1",
+        .flow_cntrl	= 1,
+        .baud_rate	= 3000000,
+	.chip_enable	= NULL,
+        .suspend	= NULL,
+        .resume		= NULL,
+};
+
 static struct platform_device wl1271_device = {
 	.name	= "kim",
 	.id	= -1,
 	.dev	= {
-		.platform_data	= &wl1271_gpios,
+		.platform_data	= &wilink_platform_data,
 	},
 };
 
+static struct platform_device btwilink_device = {
+	.name	= "btwilink",
+	.id	= -1,
+};
+
 static struct gpio_led gpio_leds[] = {
 	{
 		.name			= "pandaboard::status1",
@@ -91,10 +106,6 @@ static struct platform_device leds_gpio = {
 	},
 };
 
-static struct platform_device btwilink_device = {
-	.name	= "btwilink",
-	.id	= -1,
-};
 
 static struct platform_device *panda_devices[] __initdata = {
 	&leds_gpio,
include/linux/ti_wilink_st.h +2 -0
index 2ef4385..3ca0269 100644
@@ -25,6 +25,8 @@
 #ifndef TI_WILINK_ST_H
 #define TI_WILINK_ST_H
 
+#include <linux/skbuff.h>
+
 /**
  * enum proto-type - The protocol on WiLink chips which share a
  *	common physical interface like UART.
Signature · 1 line
1.7.9.1
maintainer
#1 lore raw

PATCH 1/1 ARM: OMAP: WiLink platform data for the PandaBoard

Hi,

Quoted 26 lines · Mircea Gherzan

The "uim" deamon requires sysfs entries that are filled in using this platform data.

---
 arch/arm/mach-omap2/board-omap4panda.c |   23 +++++++++++++++++------
 include/linux/ti_wilink_st.h           |    2 ++
 2 files changed, 19 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +1 -1
index b1d74d6..37b437f 100644
@@ -27,6 +27,7 @@
 #include <linux/i2c/twl.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/fixed.h>
+#include <linux/ti_wilink_st.h>
 #include <linux/wl12xx.h>
 
 #include <mach/hardware.h>
@@ -56,15 +57,29 @@
 #define HDMI_GPIO_HPD  63 /* Hotplug detect */
 
 /* wl127x BT, FM, GPS connectivity chip */
-static int wl1271_gpios[] = {46, -1, -1};

arch/arm/mach-omap2/board-omap4panda.c line 69

Quoted 10 lines
arch/arm/mach-omap2/board-omap4panda.c +10 -0
+static struct ti_st_plat_data wilink_platform_data = {
+        .nshutdown_gpio	= 46,
+        .dev_name	= "/dev/ttyO1",
+        .flow_cntrl	= 1,
+        .baud_rate	= 3000000,
+	.chip_enable	= NULL,
+        .suspend	= NULL,
+        .resume		= NULL,
+};
+

Please use tabs above before .xxx instead of spaces.

Quoted 9 lines
arch/arm/mach-omap2/board-omap4panda.c +5 -0
+static struct platform_device btwilink_device = {
+	.name	= "btwilink",
+	.id	= -1,
+};
+
 static struct gpio_led gpio_leds[] = {
 	{
 		.name			= "pandaboard::status1",

arch/arm/mach-omap2/board-omap4panda.c static struct platform_device leds_gpio = { · line 97

Quoted 7 lines
arch/arm/mach-omap2/board-omap4panda.c +0 -4
@@ -91,10 +106,6 @@ static struct platform_device leds_gpio = {
 	},
 };
 
-static struct platform_device btwilink_device = {
-	.name	= "btwilink",
-	.id	= -1,
-};

This change is probably not needed, right?

Regards,

Tony