diff options
author | Rakesh Goyal <rgoyal@nvidia.com> | 2011-11-08 02:00:31 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:54 -0800 |
commit | 164b0c30949873f3465a06339afc4f7ec3900fc2 (patch) | |
tree | 3a6ecf65504496aab20f6e46185025989d869636 /arch/arm/mach-tegra/board-enterprise.c | |
parent | 2f0ac6e54b5cd2eb92bd8ddc92a80aebe94a48cd (diff) |
arm: tegra: enterprise: cardhu: pn544 nfc support
1) configuring pinmux
2) create pn544_i2c_platform_data
3) register i2c device info using i2c_register_board_info
Bug 846684
Bug 873017
Change-Id: I6cc370d3ee6cc5df6b75db19bb719275e465f344
Reviewed-on: http://git-master/r/62746
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R334a9cc8f86c90214b2415b3b855d5f234ad7a11
Diffstat (limited to 'arch/arm/mach-tegra/board-enterprise.c')
-rw-r--r-- | arch/arm/mach-tegra/board-enterprise.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-enterprise.c b/arch/arm/mach-tegra/board-enterprise.c index 5ab37958e062..b8cad28833bb 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/nfc/pn544.h> #include <sound/max98088.h> #include <mach/clk.h> @@ -334,6 +335,12 @@ static struct max98088_pdata enterprise_max98088_pdata = { .receiver_mode = 0, /* 0 = amplifier, 1 = line output */ }; +static struct pn544_i2c_platform_data nfc_pdata = { + .irq_gpio = TEGRA_GPIO_PS4, + .ven_gpio = TEGRA_GPIO_PM6, + .firm_gpio = 0, +}; + static struct i2c_board_info __initdata max98088_board_info = { I2C_BOARD_INFO("max98088", 0x10), @@ -341,6 +348,12 @@ static struct i2c_board_info __initdata max98088_board_info = { .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_HP_DET), }; +static struct i2c_board_info __initdata nfc_board_info = { + I2C_BOARD_INFO("pn544", 0x28), + .platform_data = &nfc_pdata, + .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PS4), +}; + static void enterprise_i2c_init(void) { tegra_i2c_device1.dev.platform_data = &enterprise_i2c1_platform_data; @@ -356,6 +369,7 @@ static void enterprise_i2c_init(void) platform_device_register(&tegra_i2c_device1); i2c_register_board_info(0, &max98088_board_info, 1); + i2c_register_board_info(0, &nfc_board_info, 1); } static struct platform_device *enterprise_uart_devices[] __initdata = { @@ -673,6 +687,12 @@ static void enterprise_baseband_init(void) } } +static void enterprise_nfc_init(void) +{ + tegra_gpio_enable(TEGRA_GPIO_PS4); + tegra_gpio_enable(TEGRA_GPIO_PM6); +} + static void __init tegra_enterprise_init(void) { tegra_clk_init_from_table(enterprise_clk_init_table); @@ -698,6 +718,7 @@ static void __init tegra_enterprise_init(void) enterprise_sensors_init(); enterprise_suspend_init(); tegra_release_bootloader_fb(); + enterprise_nfc_init(); } static void __init tegra_enterprise_reserve(void) |