ARM: tegra: Remove enterprise support from baseband-xmm-power
Dan Willemsen [Wed, 21 Aug 2013 23:41:35 +0000 (16:41 -0700)]
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>

arch/arm/mach-tegra/baseband-xmm-power.c

index 5f99c13..908ef9d 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/usb/tegra_usb_phy.h>
 #include <linux/regulator/consumer.h>
 #include "board.h"
-#include "board-enterprise.h"
 #include "devices.h"
 #include "gpio-names.h"
 #include "baseband-xmm-power.h"
@@ -98,8 +97,6 @@ static bool modem_acked_resume;
 static spinlock_t xmm_lock;
 static DEFINE_MUTEX(xmm_onoff_mutex);
 static bool system_suspending;
-static struct regulator *enterprise_hsic_reg;
-static bool _hsic_reg_status;
 static struct pm_qos_request boost_cpu_freq_req;
 static struct delayed_work pm_qos_work;
 #define BOOST_CPU_FREQ_MIN     1500000
@@ -110,63 +107,6 @@ static struct delayed_work pm_qos_work;
 struct xmm_power_data xmm_power_drv_data;
 EXPORT_SYMBOL(xmm_power_drv_data);
 
-static int tegra_baseband_rail_on(void)
-{
-       int ret;
-       struct board_info bi;
-       tegra_get_board_info(&bi);
-
-       /* only applicable to enterprise */
-       if (bi.board_id != BOARD_E1197)
-               return 0;
-
-       if (_hsic_reg_status == true)
-               return 0;
-
-       if (enterprise_hsic_reg == NULL) {
-               enterprise_hsic_reg = regulator_get(NULL, "avdd_hsic");
-               if (IS_ERR_OR_NULL(enterprise_hsic_reg)) {
-                       pr_err("xmm: could not get regulator vddio_hsic\n");
-                       enterprise_hsic_reg = NULL;
-                       return PTR_ERR(enterprise_hsic_reg);
-               }
-       }
-       ret = regulator_enable(enterprise_hsic_reg);
-       if (ret < 0) {
-               pr_err("xmm: failed to enable regulator\n");
-               return ret;
-       }
-       _hsic_reg_status = true;
-       return 0;
-}
-
-static int tegra_baseband_rail_off(void)
-{
-       int ret;
-       struct board_info bi;
-       tegra_get_board_info(&bi);
-
-       /* only applicable to enterprise */
-       if (bi.board_id != BOARD_E1197)
-               return 0;
-
-       if (_hsic_reg_status == false)
-               return 0;
-
-       if (IS_ERR_OR_NULL(enterprise_hsic_reg)) {
-               pr_err("xmm: unbalanced disable on vddio_hsic regulator\n");
-               enterprise_hsic_reg = NULL;
-               return PTR_ERR(enterprise_hsic_reg);
-       }
-       ret = regulator_disable(enterprise_hsic_reg);
-       if (ret < 0) {
-               pr_err("xmm: failed to disable regulator\n");
-               return ret;
-       }
-       _hsic_reg_status = false;
-       return 0;
-}
-
 static inline enum baseband_xmm_powerstate_t baseband_xmm_get_power_status(void)
 {
        enum baseband_xmm_powerstate_t status;
@@ -257,8 +197,6 @@ static int xmm_power_on(struct platform_device *device)
        if (baseband_xmm_get_power_status() != BBXMM_PS_UNINIT)
                return -EINVAL;
 
-       tegra_baseband_rail_on();
-
        /* reset the state machine */
        baseband_xmm_set_power_status(BBXMM_PS_INIT);
        modem_sleep_flag = false;
@@ -384,7 +322,6 @@ static int xmm_power_off(struct platform_device *device)
        /* start registration process once again on xmm on */
        register_hsic_device = true;
 
-       tegra_baseband_rail_off();
        pr_debug("%s }\n", __func__);
 
        return 0;
@@ -1073,7 +1010,6 @@ static int xmm_power_driver_suspend(struct device *dev)
                return 0;
        }
        /* PMC is driving hsic bus
-        * tegra_baseband_rail_off();
         */
        return 0;
 }
@@ -1088,7 +1024,6 @@ static int xmm_power_driver_resume(struct device *dev)
                return 0;
        }
        /* PMC is driving hsic bus
-        * tegra_baseband_rail_on();
         */
        reenable_autosuspend = true;