ARM: S3C64XX: Add wifi RF kill support for SmartQ boards
Subsystems (3)
PATCH 5/5 ARM: S3C64XX: Add wifi RF kill support for SmartQ boards
This patch create a new platform driver which adds support for RF kill to the on-board WM-G-MR-09 wifi chip. It also adds the platform device glue to the SmartQ board definitions.
Signed-off-by Maurus Cuelenaere <[email protected]>
--- arch/arm/mach-s3c64xx/Kconfig | 7 ++ arch/arm/mach-s3c64xx/Makefile | 3 + arch/arm/mach-s3c64xx/mach-smartq.c | 38 ++-------- arch/arm/mach-s3c64xx/smartq-wifi.c | 135 +++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 31 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/smartq-wifi.c
arch/arm/mach-s3c64xx/Kconfig +7 -0
@@ -234,3 +234,10 @@ config MACH_SMARTQ7 select MACH_SMARTQ help Machine support for the SmartQ 7 + +config SMARTQ_WIFI + bool + default y + depends on MACH_SMARTQ && (RFKILL || !RFKILL) + help + RF kill support for SmartQ wifi chip
arch/arm/mach-s3c64xx/Makefile +3 -0
@@ -65,3 +65,6 @@ obj-y += dev-audio.o obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o obj-$(CONFIG_S3C64XX_DEV_TS) += dev-ts.o obj-$(CONFIG_S3C64XX_DEV_ONENAND1) += dev-onenand1.o + +# Misc +obj-$(CONFIG_SMARTQ_WIFI) += smartq-wifi.o
arch/arm/mach-s3c64xx/mach-smartq.c +7 -31
@@ -9,7 +9,6 @@* */ -#include <linux/delay.h> #include <linux/fb.h> #include <linux/gpio.h> #include <linux/init.h>
@@ -231,6 +230,12 @@ static struct i2c_board_info smartq_i2c_devs[] __initdata = { { I2C_BOARD_INFO("wm8987", 0x1a), }, }; +static struct platform_device smartq_wifi_device = { + .name ="smartq-wifi" , + .id =-1 , + .dev.parent = &s3c_device_hsmmc2.dev, +}; +static struct platform_device *smartq_devices[]__initdata = { &s3c_device_hsmmc1,/* Init iNAND first, ... */ &s3c_device_hsmmc0,/* ... then the external SD card */
@@ -249,6 +254,7 @@ static struct platform_device *smartq_devices[] __initdata = { &smartq_lcd_control_device, &smartq_lcd_power_device, &smartq_usb_otg_vbus_dev, + &smartq_wifi_device, };static void __init smartq_lcd_mode_set (void )
@@ -339,35 +345,6 @@ static int __init smartq_usb_otg_init(void)return 0 ; } -static int __init smartq_wifi_init (void ) -{ -int ret; - - ret =gpio_request (S3C64XX_GPK (1 ),"wifi control" ); -if (ret <0 ) { -pr_err ("%s: failed to get GPK1\n" , __func__); -return ret; - } - - ret =gpio_request (S3C64XX_GPK (2 ),"wifi reset" ); -if (ret <0 ) { -pr_err ("%s: failed to get GPK2\n" , __func__); -gpio_free (S3C64XX_GPK (1 )); -return ret; - } - -/* turn power on */ -gpio_direction_output (S3C64XX_GPK (1 ),1 ); - -/* reset device */ -gpio_direction_output (S3C64XX_GPK (2 ),0 ); -mdelay (100 ); -gpio_set_value (S3C64XX_GPK (2 ),1 ); -gpio_direction_input (S3C64XX_GPK (2 )); - -return 0 ; -} -static struct map_desc smartq_iodesc[]__initdata = {};void __init smartq_map_io (void ) {
@@ -393,7 +370,6 @@ void __init smartq_machine_init(void)WARN_ON (smartq_power_off_init ());WARN_ON (smartq_usb_host_init ());WARN_ON (smartq_usb_otg_init ()); -WARN_ON (smartq_wifi_init ());platform_add_devices (smartq_devices,ARRAY_SIZE (smartq_devices)); }
arch/arm/mach-s3c64xx/smartq-wifi.c new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 5/5 ARM: S3C64XX: Add wifi RF kill support for SmartQ boards
Op 13-08-10 21:18, Maurus Cuelenaere schreef:
Quoted 4 lines
This patch create a new platform driver which adds support for RF kill to the on-board WM-G-MR-09 wifi chip. It also adds the platform device glue to the SmartQ board definitions.
Quoted 8 lines
Signed-off-by Maurus Cuelenaere <[email protected]>--- arch/arm/mach-s3c64xx/Kconfig | 7 ++ arch/arm/mach-s3c64xx/Makefile | 3 + arch/arm/mach-s3c64xx/mach-smartq.c | 38 ++-------- arch/arm/mach-s3c64xx/smartq-wifi.c | 135 +++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 31 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/smartq-wifi.c
@Ben:
Any specific reason why you didn't pick this up?
Signature · 1 line
Maurus Cuelenaere