diff options
-rw-r--r-- | arch/arm/configs/tegra3_android_defconfig | 3 | ||||
-rw-r--r-- | arch/arm/configs/tegra_android_defconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-enterprise.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-ventana.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-whistler.c | 25 |
6 files changed, 54 insertions, 45 deletions
diff --git a/arch/arm/configs/tegra3_android_defconfig b/arch/arm/configs/tegra3_android_defconfig index 809542ded05f..a2b7cc13ee85 100644 --- a/arch/arm/configs/tegra3_android_defconfig +++ b/arch/arm/configs/tegra3_android_defconfig @@ -180,6 +180,7 @@ CONFIG_NL80211_TESTMODE=y CONFIG_LIB80211=m CONFIG_MAC80211=m CONFIG_RFKILL=y +CONFIG_RFKILL_GPIO=y CONFIG_CAIF=y CONFIG_NFC=y CONFIG_PN544_NFC=y @@ -191,7 +192,7 @@ CONFIG_AD525X_DPOT_I2C=y CONFIG_APDS9802ALS=y CONFIG_SENSORS_NCT1008=y CONFIG_UID_STAT=y -CONFIG_BCM4329_RFKILL=y +# CONFIG_BCM4329_RFKILL is not set CONFIG_TEGRA_CRYPTO_DEV=y CONFIG_MAX1749_VIBRATOR=y CONFIG_EEPROM_AT24=y diff --git a/arch/arm/configs/tegra_android_defconfig b/arch/arm/configs/tegra_android_defconfig index 3d1780ca2c4e..eb6abec87b70 100644 --- a/arch/arm/configs/tegra_android_defconfig +++ b/arch/arm/configs/tegra_android_defconfig @@ -170,6 +170,7 @@ CONFIG_BT_HCIUART_LL=y CONFIG_BT_BLUESLEEP=y CONFIG_CFG80211=y CONFIG_RFKILL=y +CONFIG_RFKILL_GPIO=y # CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_BLK_DEV_LOOP=y CONFIG_MISC_DEVICES=y @@ -178,7 +179,7 @@ CONFIG_AD525X_DPOT_I2C=y CONFIG_APDS9802ALS=y CONFIG_SENSORS_NCT1008=y CONFIG_UID_STAT=y -CONFIG_BCM4329_RFKILL=y +# CONFIG_BCM4329_RFKILL is not set CONFIG_TEGRA_CRYPTO_DEV=y CONFIG_MAX1749_VIBRATOR=y CONFIG_MPU_SENSORS_TIMERIRQ=y diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c index 6dc9b906a3af..be1aeec820ff 100644 --- a/arch/arm/mach-tegra/board-cardhu.c +++ b/arch/arm/mach-tegra/board-cardhu.c @@ -39,6 +39,7 @@ #include <linux/memblock.h> #include <linux/spi-tegra.h> #include <linux/nfc/pn544.h> +#include <linux/rfkill-gpio.h> #include <sound/wm8903.h> #include <sound/max98095.h> @@ -86,20 +87,21 @@ static struct tegra_thermal_data thermal_data = { #endif }; -static struct resource cardhu_bcm4329_rfkill_resources[] = { +static struct rfkill_gpio_platform_data cardhu_bt_rfkill_pdata[] = { { - .name = "bcm4329_nshutdown_gpio", - .start = TEGRA_GPIO_PU0, - .end = TEGRA_GPIO_PU0, - .flags = IORESOURCE_IO, + .name = "bt_rfkill", + .shutdown_gpio = TEGRA_GPIO_PU0, + .reset_gpio = TEGRA_GPIO_INVALID, + .type = RFKILL_TYPE_BLUETOOTH, }, }; -static struct platform_device cardhu_bcm4329_rfkill_device = { - .name = "bcm4329_rfkill", +static struct platform_device cardhu_bt_rfkill_device = { + .name = "rfkill_gpio", .id = -1, - .num_resources = ARRAY_SIZE(cardhu_bcm4329_rfkill_resources), - .resource = cardhu_bcm4329_rfkill_resources, + .dev = { + .platform_data = &cardhu_bt_rfkill_pdata, + }, }; static struct resource cardhu_bluesleep_resources[] = { @@ -706,7 +708,7 @@ static struct platform_device *cardhu_devices[] __initdata = { &spdif_dit_device, &bluetooth_dit_device, &baseband_dit_device, - &cardhu_bcm4329_rfkill_device, + &cardhu_bt_rfkill_device, &tegra_pcm_device, &cardhu_audio_wm8903_device, &cardhu_audio_max98095_device, diff --git a/arch/arm/mach-tegra/board-enterprise.c b/arch/arm/mach-tegra/board-enterprise.c index 2b5a72518d7c..316e41da8672 100644 --- a/arch/arm/mach-tegra/board-enterprise.c +++ b/arch/arm/mach-tegra/board-enterprise.c @@ -37,6 +37,7 @@ #include <linux/fsl_devices.h> #include <linux/i2c/atmel_mxt_ts.h> #include <linux/memblock.h> +#include <linux/rfkill-gpio.h> #include <linux/nfc/pn544.h> #include <sound/max98088.h> @@ -79,20 +80,21 @@ static struct tegra_thermal_data thermal_data = { #endif }; -static struct resource enterprise_bcm4329_rfkill_resources[] = { +static struct rfkill_gpio_platform_data enterprise_bt_rfkill_pdata[] = { { - .name = "bcm4329_nshutdown_gpio", - .start = TEGRA_GPIO_PE6, - .end = TEGRA_GPIO_PE6, - .flags = IORESOURCE_IO, + .name = "bt_rfkill", + .shutdown_gpio = TEGRA_GPIO_PE6, + .reset_gpio = TEGRA_GPIO_INVALID, + .type = RFKILL_TYPE_BLUETOOTH, }, }; -static struct platform_device enterprise_bcm4329_rfkill_device = { - .name = "bcm4329_rfkill", +static struct platform_device enterprise_bt_rfkill_device = { + .name = "rfkill_gpio", .id = -1, - .num_resources = ARRAY_SIZE(enterprise_bcm4329_rfkill_resources), - .resource = enterprise_bcm4329_rfkill_resources, + .dev = { + .platform_data = &enterprise_bt_rfkill_pdata, + }, }; static struct resource enterprise_bluesleep_resources[] = { @@ -516,7 +518,7 @@ static struct platform_device *enterprise_devices[] __initdata = { &tegra_avp_device, #endif &tegra_camera, - &enterprise_bcm4329_rfkill_device, + &enterprise_bt_rfkill_device, &tegra_spi_device4, &tegra_hda_device, #if defined(CONFIG_CRYPTO_DEV_TEGRA_SE) diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c index 942ca44e2a13..c8c9ac49745f 100644 --- a/arch/arm/mach-tegra/board-ventana.c +++ b/arch/arm/mach-tegra/board-ventana.c @@ -38,6 +38,7 @@ #include <linux/memblock.h> #include <linux/i2c/atmel_mxt_ts.h> #include <linux/tegra_uart.h> +#include <linux/rfkill-gpio.h> #include <sound/wm8903.h> @@ -64,26 +65,27 @@ #include "pm.h" -static struct resource ventana_bcm4329_rfkill_resources[] = { +static struct rfkill_gpio_platform_data ventana_bt_rfkill_pdata[] = { { - .name = "bcm4329_nshutdown_gpio", - .start = TEGRA_GPIO_PU0, - .end = TEGRA_GPIO_PU0, - .flags = IORESOURCE_IO, + .name = "bt_rfkill", + .shutdown_gpio = TEGRA_GPIO_PU0, + .reset_gpio = TEGRA_GPIO_INVALID, + .type = RFKILL_TYPE_BLUETOOTH, }, }; -static struct platform_device ventana_bcm4329_rfkill_device = { - .name = "bcm4329_rfkill", +static struct platform_device ventana_bt_rfkill_device = { + .name = "rfkill_gpio", .id = -1, - .num_resources = ARRAY_SIZE(ventana_bcm4329_rfkill_resources), - .resource = ventana_bcm4329_rfkill_resources, + .dev = { + .platform_data = ventana_bt_rfkill_pdata, + }, }; static void __init ventana_bt_rfkill(void) { /*Add Clock Resource*/ - clk_add_alias("bcm4329_32k_clk", ventana_bcm4329_rfkill_device.name, \ + clk_add_alias("bcm4329_32k_clk", ventana_bt_rfkill_device.name, \ "blink", NULL); return; } @@ -380,7 +382,7 @@ static struct platform_device *ventana_devices[] __initdata = { &tegra_das_device, &spdif_dit_device, &bluetooth_dit_device, - &ventana_bcm4329_rfkill_device, + &ventana_bt_rfkill_device, &tegra_pcm_device, &ventana_audio_device, }; diff --git a/arch/arm/mach-tegra/board-whistler.c b/arch/arm/mach-tegra/board-whistler.c index 6156c8a8e51d..aa0e1c04dc52 100644 --- a/arch/arm/mach-tegra/board-whistler.c +++ b/arch/arm/mach-tegra/board-whistler.c @@ -37,6 +37,7 @@ #include <linux/mfd/max8907c.h> #include <linux/memblock.h> #include <linux/tegra_uart.h> +#include <linux/rfkill-gpio.h> #include <mach/clk.h> #include <mach/iomap.h> @@ -169,21 +170,21 @@ static void __init whistler_uart_init(void) platform_add_devices(whistler_uart_devices, ARRAY_SIZE(whistler_uart_devices)); } - -static struct resource whistler_bcm4329_rfkill_resources[] = { +static struct rfkill_gpio_platform_data whistler_bt_rfkill_pdata[] = { { - .name = "bcm4329_nshutdown_gpio", - .start = TEGRA_GPIO_PU0, - .end = TEGRA_GPIO_PU0, - .flags = IORESOURCE_IO, + .name = "bt_rfkill", + .shutdown_gpio = TEGRA_GPIO_PU0, + .reset_gpio = TEGRA_GPIO_INVALID, + .type = RFKILL_TYPE_BLUETOOTH, }, }; -static struct platform_device whistler_bcm4329_rfkill_device = { - .name = "bcm4329_rfkill", - .id = -1, - .num_resources = ARRAY_SIZE(whistler_bcm4329_rfkill_resources), - .resource = whistler_bcm4329_rfkill_resources, +static struct platform_device whistler_bt_rfkill_device = { + .name = "rfkill_gpio", + .id = -1, + .dev = { + .platform_data = whistler_bt_rfkill_pdata, + }, }; static struct resource whistler_bluesleep_resources[] = { @@ -393,7 +394,7 @@ static struct platform_device *whistler_devices[] __initdata = { &spdif_dit_device, &bluetooth_dit_device, &baseband_dit_device, - &whistler_bcm4329_rfkill_device, + &whistler_bt_rfkill_device, &tegra_pcm_device, &whistler_audio_aic326x_device, &whistler_audio_wm8753_device, |