static uint32_t msm_sdcc_setup_power(struct device *dv, unsigned int vdd) { int rc = 0; struct platform_device *pdev; pdev = container_of(dv, struct platform_device, dev); msm_sdcc_setup_gpio(pdev->id, !!vdd); if (vdd == 0) { if (!vreg_sts) return 0; /* LGE_CHANGE_S, [[email protected]] , 2011-02-10, for current consumption */ if (pdev->id == 1) { msm_sdcc_setup_gpio_no_mmc(pdev->id, !!vdd); } /* LGE_CHANGE_E, [[email protected]] , 2011-02-10, for current consumption */ clear_bit(pdev->id, &vreg_sts); if (!vreg_sts) { if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa()) { rc = mpp_config_digital_out(mpp_mmc, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_LOW)); } else rc = vreg_disable(vreg_mmc); if (rc) printk(KERN_ERR "%s: return val: %d \n", __func__, rc); } return 0; } if (!vreg_sts) { if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa()) { rc = mpp_config_digital_out(mpp_mmc, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_HIGH)); } else { #ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION rc = vreg_set_level(vreg_mmc, VREG_SD_LEVEL); #else rc = vreg_set_level(vreg_mmc, 2850); #endif if (!rc) rc = vreg_enable(vreg_mmc); } if (rc) printk(KERN_ERR "%s: return val: %d \n", __func__, rc); } set_bit(pdev->id, &vreg_sts); return 0; }
static uint32_t msm_sdcc_setup_power(struct device *dv, unsigned int vdd) { int rc = 0; struct platform_device *pdev; pdev = container_of(dv, struct platform_device, dev); msm_sdcc_setup_gpio(pdev->id, !!vdd); if (vdd == 0) { if (!vreg_sts) return 0; clear_bit(pdev->id, &vreg_sts); if (!vreg_sts) { if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa()) { rc = mpp_config_digital_out(mpp_mmc, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_LOW)); } else rc = vreg_disable(vreg_mmc); if (rc) printk(KERN_ERR "%s: return val: %d \n", __func__, rc); } return 0; } if (!vreg_sts) { if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa()) { rc = mpp_config_digital_out(mpp_mmc, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_HIGH)); } else { #ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION rc = vreg_set_level(vreg_mmc, 2050); #endif if (!rc) rc = vreg_enable(vreg_mmc); } if (rc) printk(KERN_ERR "%s: return val: %d \n", __func__, rc); } set_bit(pdev->id, &vreg_sts); return 0; }
int usb_power_on( int on_off ) { int rc = 0; unsigned usb_en_mpp = 6; //mpp7 if( on_off ) rc = mpp_config_digital_out(usb_en_mpp, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_HIGH)); else rc = mpp_config_digital_out(usb_en_mpp, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_LOW)); return rc ; }
static void msm7x27_wlan_init(void) { int rc = 0; if (machine_is_msm7x27_ffa()) { rc = mpp_config_digital_out(3, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_LOW)); if (rc) printk(KERN_ERR "%s: return val: %d \n", __func__, rc); } }
static void usb_mpp_init(void) { unsigned rc; unsigned mpp_usb = 7; if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa()) { rc = mpp_config_digital_out(mpp_usb, MPP_CFG(MPP_DLOGIC_LVL_VDD, MPP_DLOGIC_OUT_CTRL_HIGH)); if (rc) pr_err("%s: configuring mpp pin" "to enable 3.3V LDO failed\n", __func__); } }
static uint32_t msm_sdcc_setup_power(struct device *dv, unsigned int vdd) { int rc = 0; struct platform_device *pdev; static int first_setup = 1; pdev = container_of(dv, struct platform_device, dev); msm_sdcc_setup_gpio(pdev->id, !!vdd); if (vdd == 0) { if (!vreg_sts) return 0; clear_bit(pdev->id, &vreg_sts); if (!vreg_sts) { if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa()) { rc = mpp_config_digital_out(mpp_mmc, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_LOW)); } else rc = vreg_disable(vreg_mmc); if (rc) printk(KERN_ERR "%s: return val: %d \n", __func__, rc); } return 0; } if (!vreg_sts) { if (machine_is_msm7x25_ffa() || machine_is_msm7x27_ffa()) { rc = mpp_config_digital_out(mpp_mmc, MPP_CFG(MPP_DLOGIC_LVL_MSMP, MPP_DLOGIC_OUT_CTRL_HIGH)); } else { #ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION rc = vreg_set_level(vreg_mmc, VREG_SD_LEVEL); #else rc = vreg_set_level(vreg_mmc, 2850); #endif if (!rc) rc = vreg_enable(vreg_mmc); } if (rc) printk(KERN_ERR "%s: return val: %d \n", __func__, rc); } set_bit(pdev->id, &vreg_sts); /* if first called related to sdcc1, irq should be registered as wakeup source * cleaneye.kim, 2010-02-19 */ #if 0 if (first_setup == 1) { struct mmc_platform_data *pdata = pdev->dev.platform_data; if (pdev->id == 1) { first_setup = 0; set_irq_wake(pdata->status_irq, 1); } } #endif return 0; }