diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2012-01-27 11:47:34 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-24 02:03:47 -0700 |
commit | db98cc3a43e2f2063843d5dd3e00396fa7af2dd0 (patch) | |
tree | 684dd3cc8bca1657ce0a8126e3013262d396523f /arch/arm/mach-tegra/baseband-xmm-power.c | |
parent | 1f2380f00f3c12170923004346e42f1057bd95d3 (diff) |
arm: tegra: baseband: Configure wakeup source for xmm
Configure wake irq for waking up AP from xmm modem.
Also enable/disable this wake source base on flight mode
off/on setting.
Reviewed-on: http://git-master/r/69701
Change-Id: Iad274da9869102874efab27312fe8a182ab55bf3
Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/78026
Reviewed-by: Automatic_Commit_Validation_User
Rebase-Id: Rd6ec7021933c0a6a434177c965d5675f843d211b
Diffstat (limited to 'arch/arm/mach-tegra/baseband-xmm-power.c')
-rw-r--r-- | arch/arm/mach-tegra/baseband-xmm-power.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/baseband-xmm-power.c b/arch/arm/mach-tegra/baseband-xmm-power.c index 5d7958b63d54..17dbc2e94c67 100644 --- a/arch/arm/mach-tegra/baseband-xmm-power.c +++ b/arch/arm/mach-tegra/baseband-xmm-power.c @@ -126,6 +126,8 @@ static int baseband_xmm_power_on(struct platform_device *device) struct baseband_power_platform_data *data = (struct baseband_power_platform_data *) device->dev.platform_data; + int ret; + pr_debug("%s {\n", __func__); /* check for platform data */ @@ -170,6 +172,9 @@ static int baseband_xmm_power_on(struct platform_device *device) baseband_modem_power_on(data); } } + ret = enable_irq_wake(gpio_to_irq(data->modem.xmm.ipc_ap_wake)); + if (ret < 0) + pr_err("%s: enable_irq_wake error\n", __func__); pr_debug("%s }\n", __func__); @@ -179,6 +184,7 @@ static int baseband_xmm_power_on(struct platform_device *device) static int baseband_xmm_power_off(struct platform_device *device) { struct baseband_power_platform_data *data; + int ret; pr_debug("%s {\n", __func__); @@ -197,6 +203,9 @@ static int baseband_xmm_power_off(struct platform_device *device) } ipc_ap_wake_state = IPC_AP_WAKE_UNINIT; + ret = disable_irq_wake(gpio_to_irq(data->modem.xmm.ipc_ap_wake)); + if (ret < 0) + pr_err("%s: disable_irq_wake error\n", __func__); /* unregister usb host controller */ if (data->hsic_unregister) |