diff options
Diffstat (limited to 'arch/arm/mach-tegra')
-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 |
4 files changed, 50 insertions, 43 deletions
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, |