ARM: OMAP: WiLink platform data for the PandaBoard
Subsystems (3)
PATCH v2 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 | 14 ++++++++++++-- include/linux/ti_wilink_st.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +12 -2
@@ -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,12 +57,21 @@#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, }, };
include/linux/ti_wilink_st.h +2 -0
@@ -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
Tony Lindgren
maintainerPATCH v2 1/1 ARM: OMAP: WiLink platform data for the PandaBoard
Hi Luca,
Quoted 51 lines · Mircea Gherzan
The "uim" deamon requires sysfs entries that are filled in using this platform data.
Signed-off-by Mircea Gherzan <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 14 ++++++++++++-- include/linux/ti_wilink_st.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +12
-2@@ -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,12 +57,21 @@#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, }, };include/linux/ti_wilink_st.h +0
-0
include/linux/ti_wilink_st.h line 32
Quoted 8 lines
include/linux/ti_wilink_st.h +2
-0@@ -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.
Just checking.. Can you please take a look at this patch and confirm that this is how things are supposed to be done?
To me passing some third driver's dev_name in pdata seems pretty weird.. But then again maybe I just don't know how this is supposed to work.
Regards,
Tony
PATCH v2 1/1 ARM: OMAP: WiLink platform data for the PandaBoard
Quoted 1 line · Tony Lindgren
Hi Luca,
Hi Tony,
Quoted 64 lines · Mircea Gherzan
Quoted 51 lines
The "uim" deamon requires sysfs entries that are filled in using this platform data.
Signed-off-by Mircea Gherzan <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 14 ++++++++++++-- include/linux/ti_wilink_st.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +12
-2@@ -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,12 +57,21 @@#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, }, };include/linux/ti_wilink_st.h +0
-0include/linux/ti_wilink_st.h line 32
Quoted 8 lines
include/linux/ti_wilink_st.h +2
-0@@ -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. Just checking.. Can you please take a look at this patch and confirm that this is how things are supposed to be done?
Quoted 3 lines
To me passing some third driver's
dev_namein pdata seems pretty weird.. But then again maybe I just don't know how this is supposed to work.
This looks pretty weird to me too. The "/dev/ttyO1" thing doesn't look right. But I don't really know how this works either, because this is the BT/FM/GPS part of the wl12xx chip. And, to be honest, I don't know anything about it. I only know about the wifi part of it. :\
Signature · 2 lines
Cheers, Luca.
PATCH v2 1/1 ARM: OMAP: WiLink platform data for the PandaBoard
In reply to Tony LindgrenAm 09.03.2012 19:31, schrieb Tony Lindgren:
Quoted 66 lines
Hi Luca,
Quoted 51 lines · Mircea Gherzan
The "uim" deamon requires sysfs entries that are filled in using this platform data.
Signed-off-by Mircea Gherzan <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 14 ++++++++++++-- include/linux/ti_wilink_st.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +12
-2@@ -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,12 +57,21 @@#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, }, };include/linux/ti_wilink_st.h +0
-0include/linux/ti_wilink_st.h line 32
Quoted 8 lines
include/linux/ti_wilink_st.h +2
-0@@ -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. Just checking.. Can you please take a look at this patch and confirm that this is how things are supposed to be done?
Quoted 3 lines
To me passing some third driver's
dev_namein pdata seems pretty weird.. But then again maybe I just don't know how this is supposed to work.
This is what the ti_st driver expects in the platform data structure. More precisely, in kim_probe():
/* copying platform data */
strncpy(kim_gdata->dev_name, pdata->dev_name,UART_DEV_NAME_LEN);
kim_gdata->flow_cntrl = pdata->flow_cntrl;
kim_gdata->baud_rate = pdata->baud_rate;
pr_info("sysfs entries created\n");So IMHO the patch is a valid fix. However, one more patch [1] is still required to get BT and WLAN working on the PandaBoard.
Thanks,
Mircea
[1] http://elinux.org/images/8/8d/0001a-omap4-pandaboard-wlan-fix.patch
PATCH v2 1/1 ARM: OMAP: WiLink platform data for the PandaBoard
Quoted 74 lines · Mircea Gherzan
Am 09.03.2012 19:31, schrieb Tony Lindgren:
Quoted 66 lines
Hi Luca,
Quoted 55 lines · Mircea Gherzan
The "uim" deamon requires sysfs entries that are filled in using this platform data.
Signed-off-by Mircea Gherzan <[email protected]>---
?arch/arm/mach-omap2/board-omap4panda.c | ? 14 ++++++++++++-- ?include/linux/ti_wilink_st.h ? ? ? ? ? | ? ?2 ++ ?2 files changed, 14 insertions(+), 2 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +0
-0@@ -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>arch/arm/mach-omap2/board-omap4panda.c +0
-0@@ -56,12 +57,21 @@?#define
HDMI_GPIO_HPD?63 /* Hotplug detect */?/* wl127x BT, FM, GPS connectivity chip */
arch/arm/mach-omap2/board-omap4panda.c +10
-1-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_devicewl1271_device= { ? ? ?.name ? = "kim",
? ? ?.id ? ? = -1,
? ? ?.dev ? ?= {
- ? ? ? ? ? ?.platform_data ?=&wl1271_gpios,
+ ? ? ? ? ? ?.platform_data ?=&wilink_platform_data, ? ? ?},
?};include/linux/ti_wilink_st.h +0
-0@@ -25,6 +25,8 @@?#ifndef
TI_WILINK_ST_H
?#defineTI_WILINK_ST_Hinclude/linux/ti_wilink_st.h +2
-0+#include <linux/skbuff.h> +Quoted 4 lines
?/**
? * enum proto-type - The protocol on WiLink chips which share a ? * ?common physical interface like UART.
--Just checking.. Can you please take a look at this patch and confirm that this is how things are supposed to be done?
Quoted 3 lines
To me passing some third driver's
dev_namein pdata seems pretty weird.. But then again maybe I just don't know how this is supposed to work.This is what the
ti_stdriver expects in the platform data structure. More precisely, inkim_probe():
Quoted 8 lines
? ? ? ?/* copying platform data */
? ? ? ?strncpy(kim_gdata->dev_name, pdata->dev_name,UART_DEV_NAME_LEN); ? ? ? ?kim_gdata->flow_cntrl =pdata->flow_cntrl;
? ? ? ?kim_gdata->baud_rate =pdata->baud_rate;
? ? ? ?pr_info("sysfs entries created\n");So IMHO the patch is a valid fix. However, one more patch [1] is still required to get BT and WLAN working on the PandaBoard.
The patch looks alright to me.
Yes, the UART to which BT chip is connected (along with other technologies for which shared transport is required), the baud rate which the UART supports & also a flag so as to check whether it supports flow control - ideally is supposed to come from boot-loader, device tree sort of configuration - if not can be hard-coded in the relevant platform specific files like in this case.
This is picked up from ST as platform data as is read from the user-space daemon, because unfortunately none of these configurations can be done in kernel (the right way for TTY).
1 more patch or an addition to this patch to add the wl1271_device & the btwilink device is also required to get ST probe & BT probe. The btwilink driver is a platform device because UART devices don't have a probe mechanism unlike say usb, i2c..
Quoted 5 lines
Thanks,
Mircea[1] http://elinux.org/images/8/8d/0001a-omap4-pandaboard-wlan-fix.patch
Signature · 1 line
--Pavan Savoy
PATCH v2 1/1 ARM: OMAP: WiLink platform data for the PandaBoard
Am 11.03.2012 21:13, schrieb Pavan Savoy:
Quoted 92 lines · Mircea Gherzan
Quoted 74 lines
Am 09.03.2012 19:31, schrieb Tony Lindgren:
Quoted 66 lines
Hi Luca,
Quoted 50 lines · Mircea Gherzan
The "uim" deamon requires sysfs entries that are filled in using this platform data.
Signed-off-by Mircea Gherzan <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 14 ++++++++++++-- include/linux/ti_wilink_st.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +12
-2@@ -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,12 +57,21 @@#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, }, };include/linux/ti_wilink_st.h +0
-0include/linux/ti_wilink_st.h
Quoted 9 lines
include/linux/ti_wilink_st.h +2
-1@@ -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. -- Just checking.. Can you please take a look at this patch and confirm that this is how things are supposed to be done?
Quoted 3 lines
To me passing some third driver's
dev_namein pdata seems pretty weird.. But then again maybe I just don't know how this is supposed to work.This is what the
ti_stdriver expects in the platform data structure. More precisely, inkim_probe():Quoted 8 lines
/* copying platform data */ strncpy(kim_gdata->dev_name, pdata->dev_name,UART_DEV_NAME_LEN); kim_gdata->flow_cntrl = pdata->flow_cntrl; kim_gdata->baud_rate = pdata->baud_rate; pr_info("sysfs entries created\n");So IMHO the patch is a valid fix. However, one more patch [1] is still required to get BT and WLAN working on the PandaBoard.
The patch looks alright to me.
Yes, the UART to which BT chip is connected (along with other technologies for which shared transport is required), the baud rate which the UART supports & also a flag so as to check whether it supports flow control - ideally is supposed to come from boot-loader, device tree sort of configuration - if not can be hard-coded in the relevant platform specific files like in this case.
Quoted 8 lines
This is picked up from ST as platform data as is read from the user-space daemon, because unfortunately none of these configurations can be done in kernel (the right way for TTY).
1 more patch or an addition to this patch to add the
wl1271_device& the btwilink device is also required to get ST probe & BT probe. The btwilink driver is a platform device because UART devices don't have a probe mechanism unlike say usb, i2c..
This issue has been addressed in a previous patch [1].
PATCH v2 1/1 ARM: OMAP: WiLink platform data for the PandaBoard
In reply to Mircea GherzanHi Tony,
Am 06.03.2012 23:55, schrieb Mircea Gherzan:
Quoted 8 lines
The "uim" deamon requires sysfs entries that are filled in using this platform data.
Signed-off-by Mircea Gherzan <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 14 ++++++++++++-- include/linux/ti_wilink_st.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-)
Gentle ping.
Thanks,
Mircea
Tony Lindgren
maintainerPATCH v2 1/1 ARM: OMAP: WiLink platform data for the PandaBoard
Quoted 6 lines · Mircea Gherzan
Hi Tony,
Am 06.03.2012 23:55, schrieb Mircea Gherzan:
Quoted 3 lines
The "uim" deamon requires sysfs entries that are filled in using this platform data.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Mircea Gherzan <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 14 ++++++++++++-- include/linux/ti_wilink_st.h | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-)Gentle ping.
Thanks for patience, applying to board branch finally.
Tony