From: James Wylder Date: Thu, 10 Feb 2011 17:17:59 +0000 (-0600) Subject: ARM: tegra: stingray: Add wrigley (LTE) to boardfile X-Git-Tag: firefly_0821_release~9834^2~102 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6d1dcbd2f638b10a6c55ecf15dcdc3fbd3f576ad;p=firefly-linux-kernel-4.4.55.git ARM: tegra: stingray: Add wrigley (LTE) to boardfile Initialize the Wrigley control device if present. Change-Id: I78ea018d0f1a71def2e2c56299386ea0cdaeb2c3 Signed-off-by: James Wylder --- diff --git a/arch/arm/mach-tegra/board-stingray-power.c b/arch/arm/mach-tegra/board-stingray-power.c index ebc69dbc2b69..e1dd72d8a03a 100644 --- a/arch/arm/mach-tegra/board-stingray-power.c +++ b/arch/arm/mach-tegra/board-stingray-power.c @@ -24,8 +24,9 @@ #include #include #include -#include #include +#include +#include #include #include #include @@ -696,6 +697,21 @@ static struct platform_device mdm_ctrl_platform_device = { }, }; +static struct wrigley_ctrl_platform_data wrigley_ctrl_pdata = { + .gpio_host_wake = TEGRA_GPIO_PW3, + .gpio_disable = TEGRA_GPIO_PG0, + .gpio_reset = TEGRA_GPIO_PI6, + .gpio_force_flash = TEGRA_GPIO_PT5, +}; + +static struct platform_device wrigley_ctrl_pdev = { + .name = "wrigley", + .id = -1, + .dev = { + .platform_data = &wrigley_ctrl_pdata, + }, +}; + static void mdm_ctrl_register(void) { int i; @@ -716,6 +732,15 @@ static void mdm_ctrl_register(void) platform_device_register(&mdm_ctrl_platform_device); } +static void wrigley_ctrl_register(void) +{ + tegra_gpio_enable(wrigley_ctrl_pdata.gpio_reset); + tegra_gpio_enable(wrigley_ctrl_pdata.gpio_host_wake); + tegra_gpio_enable(wrigley_ctrl_pdata.gpio_disable); + tegra_gpio_enable(wrigley_ctrl_pdata.gpio_force_flash); + platform_device_register(&wrigley_ctrl_pdev); +} + int __init stingray_power_init(void) { int i; @@ -754,8 +779,10 @@ int __init stingray_power_init(void) i2c_register_board_info(3, stingray_i2c_bus4_power_info, ARRAY_SIZE(stingray_i2c_bus4_power_info)); - if (stingray_hw_has_cdma()) + if (stingray_hw_has_cdma()) { mdm_ctrl_register(); + wrigley_ctrl_register(); + } return 0; }