本文整理汇总了C++中PM8921_MPP_PM_TO_SYS函数的典型用法代码示例。如果您正苦于以下问题:C++ PM8921_MPP_PM_TO_SYS函数的具体用法?C++ PM8921_MPP_PM_TO_SYS怎么用?C++ PM8921_MPP_PM_TO_SYS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PM8921_MPP_PM_TO_SYS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: msm_camera_8960_ext_power_ctrl
static int32_t msm_camera_8960_ext_power_ctrl(int enable)
{
int rc = 0;
if (enable) {
rc = pm8xxx_mpp_config(PM8921_MPP_PM_TO_SYS(12),
&privacy_light_on_config);
} else {
rc = pm8xxx_mpp_config(PM8921_MPP_PM_TO_SYS(12),
&privacy_light_off_config);
}
return rc;
}
示例2: active_reset
void active_reset(int high)
{
if (high) {
pm8xxx_mpp_config(
PM8921_MPP_PM_TO_SYS(MLCD_RST_MPP2),
&MLCD_RESET_HIGH_CONFIG);
} else {
pm8xxx_mpp_config(
PM8921_MPP_PM_TO_SYS(MLCD_RST_MPP2),
&MLCD_RESET_LOW_CONFIG);
}
}
示例3: power_on_flash
void power_on_flash(void)
{
int temp = 0;
int ret = 0;
if(!isFlashCntlEn) {
temp = gpio_get_value(GPIO_MSM_FLASH_NOW);
if (isFlashCntlEn == 0 && temp == 0) {
/* FLASH_LED_UNLOCK*/
gpio_set_value_cansleep(PM8921_MPP_PM_TO_SYS
(PMIC_MPP_FLASH_LED_UNLOCK), 1);
/* GPIO_CAM_FLASH_SW : tourch */
gpio_set_value_cansleep(gpio_cam_flash_sw, 1);
temp = gpio_get_value(gpio_cam_flash_sw);
printk("[s5c73m3] check GPIO_CAM_FLASH_SW : %d\n", temp);
usleep(1*1000);
}
/* flash power 1.8V */
l28 = regulator_get(NULL, "8921_lvs4");
ret = regulator_enable(l28);
if (ret)
printk("error enabling regulator\n");
usleep(1*1000);
isFlashCntlEn = true;
}
}
示例4: mipi_dsi_power_octa_request
static int mipi_dsi_power_octa_request(void)
{
int rc = 0;
reg_L30 = regulator_get(&msm_mipi_dsi1_device.dev,
"3000mV_LCD");
if (IS_ERR_OR_NULL(reg_L30)) {
pr_err("could not get 8917_L30, rc = %ld\n",
PTR_ERR(reg_L30));
return -ENODEV;
}
rc = regulator_set_voltage(reg_L30, 3000000, 3000000);
if (rc) {
pr_err("set_voltage L30 failed, rc=%d\n", rc);
return -EINVAL;
}
pm8xxx_mpp_config(PM8921_MPP_PM_TO_SYS(MLCD_RST_MPP2),
&MLCD_RESET_LOW_CONFIG);
msleep(100);
return rc;
}
示例5: sec_fg_gpio_init
static bool sec_fg_gpio_init(void)
{
struct pm_gpio param = {
.direction = PM_GPIO_DIR_IN,
.pull = PM_GPIO_PULL_NO,
.vin_sel = PM_GPIO_VIN_S4,
.function = PM_GPIO_FUNC_NORMAL,
};
/* FUEL_ALERT Setting */
if (system_rev == 0x0) {
sec_battery_pdata.fg_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE,
GPIO_FUEL_INT_04A);
pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS(GPIO_FUEL_INT_04A),
¶m);
#if defined(CONFIG_MACH_JF_ATT) || defined(CONFIG_MACH_JF_TMO)
} else if (system_rev >= 8) {
#else
} else if (system_rev >= 9) {
#endif
/* FUEL_ALERT Registration */
struct pm8xxx_mpp_config_data fuel_alert_mppcfg = {
.type = PM8XXX_MPP_TYPE_D_INPUT,
.level = PM8921_MPP_DIG_LEVEL_S4,
.control = PM8XXX_MPP_DOUT_CTRL_LOW,
};
sec_battery_pdata.fg_irq = PM8921_MPP_IRQ(PM8921_IRQ_BASE, 6);
pm8xxx_mpp_config(PM8921_MPP_PM_TO_SYS(6),
&fuel_alert_mppcfg);
}
else
示例6: aat1290a_freeGpio
static int aat1290a_freeGpio(void)
{
int ret;
printk(KERN_DEBUG "[%s : %d]!!\n", __func__, __LINE__);
if (pmic_gpio_msm_flash_cntl_en)
gpio_set_value_cansleep(pmic_gpio_msm_flash_cntl_en, 0);
else
gpio_set_value_cansleep(GPIO_MSM_FLASH_CNTL_EN, 0);
isFlashCntlEn = false;
usleep(1*1000);
gpio_set_value_cansleep(GPIO_MSM_FLASH_NOW, 0);
usleep(1*1000);
/* flash power 1.8V */
if (l28) {
ret = regulator_disable(l28);
if (ret)
cam_err("error disabling regulator\n");
}
usleep(1*1000);
/* GPIO_CAM_FLASH_SW : tourch */
gpio_set_value_cansleep(gpio_cam_flash_sw, 0);
usleep(1*1000);
#if defined(CONFIG_S5C73M3) && defined(CONFIG_S5K6A3YX) /* D2 */
/* FLASH_LED_LOCK*/
gpio_set_value_cansleep(PM8921_MPP_PM_TO_SYS
(PMIC_MPP_FLASH_LED_UNLOCK), 0);
#endif
return 0;
}
示例7: m7wl_audio_pmic_mpp_config
static void m7wl_audio_pmic_mpp_config(void)
{
unsigned ret;
struct pm8xxx_mpp_config_data m7wl_audio_pmic_mpp = {
.type = PM8XXX_MPP_TYPE_D_OUTPUT,
.level = PM8921_MPP_DIG_LEVEL_S4,
.control = PM8XXX_MPP_DOUT_CTRL_LOW,
};
ret = pm8xxx_mpp_config(PM8921_MPP_PM_TO_SYS(9),
&m7wl_audio_pmic_mpp);
if (ret < 0)
pr_err("%s:MPP_9 configuration failed\n", __func__);
}
示例8: aat1290a_setGpio
static int aat1290a_setGpio(void)
{
int ret;
int temp = 0;
printk(KERN_DEBUG "[%s : %d]!!\n", __func__, __LINE__);
#if defined(CONFIG_S5C73M3) && defined(CONFIG_S5K6A3YX) /* D2 */
/* FLASH_LED_UNLOCK*/
gpio_set_value_cansleep(PM8921_MPP_PM_TO_SYS
(PMIC_MPP_FLASH_LED_UNLOCK), 1);
#endif
/* GPIO_CAM_FLASH_SW : tourch */
gpio_set_value_cansleep(gpio_cam_flash_sw, 0);
temp = gpio_get_value(gpio_cam_flash_sw);
printk(KERN_DEBUG "[s5c73m3] check GPIO_CAM_FLASH_SW : %d\n", temp);
usleep(1*1000);
/* flash power 1.8V */
l28 = regulator_get(NULL, "8921_lvs4");
ret = regulator_enable(l28);
if (ret)
cam_err("error enabling regulator\n");
usleep(1*1000);
if (pmic_gpio_msm_flash_cntl_en) {
gpio_set_value_cansleep(pmic_gpio_msm_flash_cntl_en, 1);
} else {
gpio_set_value_cansleep(GPIO_MSM_FLASH_CNTL_EN, 1);
temp = gpio_get_value(GPIO_MSM_FLASH_CNTL_EN);
printk(KERN_DEBUG "[s5c73m3] check Flash set GPIO : %d\n",
temp);
}
isFlashCntlEn = true;
usleep(1*1000);
gpio_set_value_cansleep(GPIO_MSM_FLASH_NOW, 1);
temp = gpio_get_value(GPIO_MSM_FLASH_NOW);
printk(KERN_DEBUG "[s5c73m3] check Flash enable GPIO : %d\n", temp);
usleep(1*1000);
return 0;
}
示例9: GPIO_VREG
.consumer_supplies = vreg_consumers_##_id##_PC, \
.supply_regulator = _supply_regulator, \
}, \
.id = RPM_VREG_ID_PM8921_##_id##_PC, \
.pin_fn = RPM_VREG_PIN_FN_8960_##_pin_fn, \
.pin_ctrl = _pin_ctrl, \
}
/* GPIO regulator constraints.
* Must be in sync with corresponding platform_device structures in
* board_sony_fusion3.c
*/
struct gpio_regulator_platform_data
apq8064_gpio_regulator_pdata[] __devinitdata = {
/* ID vreg_name gpio_label gpio supply active_low*/
GPIO_VREG(EXT_5V, "ext_5v", "ext_5v_en", PM8921_MPP_PM_TO_SYS(7),
NULL, 0),
GPIO_VREG(EXT_SD_PWR, "ext_sd_pwr", "ext_sd_pwr_en",
PM8921_MPP_PM_TO_SYS(4), "8921_l6", 0),
GPIO_VREG(EXT_OTG_SW, "ext_otg_sw", "ext_otg_sw_en",
PM8921_GPIO_PM_TO_SYS(42), NULL, 1),
};
/* SAW regulator constraints */
struct regulator_init_data msm8064_saw_regulator_pdata_8921_s5 =
/* ID vreg_name min_uV max_uV */
SAW_VREG_INIT(S5, "8921_s5", 850000, 1300000);
struct regulator_init_data msm8064_saw_regulator_pdata_8921_s6 =
SAW_VREG_INIT(S6, "8921_s6", 850000, 1300000);
struct regulator_init_data msm8064_saw_regulator_pdata_8821_s0 =
示例10: PM8921_MPP_PM_TO_SYS
.settings = {
[GPIOMUX_SUSPENDED] = &gpio_spi_cs2_config,
},
},
{
.gpio = 54, /* GSBI5 QUP SPI_CLK */
.settings = {
[GPIOMUX_SUSPENDED] = &gpio_spi_config,
},
},
#endif
};
static struct pm8xxx_mpp_platform_data
apq8064_pm8921_mpp_pdata __devinitdata = {
.mpp_base = PM8921_MPP_PM_TO_SYS(1),
};
static struct pm8xxx_gpio_platform_data
apq8064_pm8921_gpio_pdata __devinitdata = {
.gpio_base = PM8921_GPIO_PM_TO_SYS(1),
};
static struct pm8xxx_irq_platform_data
apq8064_pm8921_irq_pdata __devinitdata = {
.irq_base = PM8921_IRQ_BASE,
.devirq = PM8921_USR_IRQ_N,
.irq_trigger_flag = IRQF_TRIGGER_HIGH,
.dev_id = 0,
};
示例11: lvds_panel_power
static int lvds_panel_power(int on)
{
static struct regulator *reg_lvs7, *reg_l2, *reg_ext_3p3v;
static int gpio36, gpio26, mpp3;
int rc;
pr_debug("%s: on=%d\n", __func__, on);
if (!lvds_power_on) {
reg_lvs7 = regulator_get(&msm_lvds_device.dev,
"lvds_vdda");
if (IS_ERR_OR_NULL(reg_lvs7)) {
pr_err("could not get 8921_lvs7, rc = %ld\n",
PTR_ERR(reg_lvs7));
return -ENODEV;
}
reg_l2 = regulator_get(&msm_lvds_device.dev,
"lvds_pll_vdda");
if (IS_ERR_OR_NULL(reg_l2)) {
pr_err("could not get 8921_l2, rc = %ld\n",
PTR_ERR(reg_l2));
return -ENODEV;
}
rc = regulator_set_voltage(reg_l2, 1200000, 1200000);
if (rc) {
pr_err("set_voltage l2 failed, rc=%d\n", rc);
return -EINVAL;
}
reg_ext_3p3v = regulator_get(&msm_lvds_device.dev,
"lvds_vccs_3p3v");
if (IS_ERR_OR_NULL(reg_ext_3p3v)) {
pr_err("could not get reg_ext_3p3v, rc = %ld\n",
PTR_ERR(reg_ext_3p3v));
return -ENODEV;
}
gpio26 = PM8921_GPIO_PM_TO_SYS(26);
rc = gpio_request(gpio26, "pwm_backlight_ctrl");
if (rc) {
pr_err("request gpio 26 failed, rc=%d\n", rc);
return -ENODEV;
}
gpio36 = PM8921_GPIO_PM_TO_SYS(36); /* lcd1_pwr_en_n */
rc = gpio_request(gpio36, "lcd1_pwr_en_n");
if (rc) {
pr_err("request gpio 36 failed, rc=%d\n", rc);
return -ENODEV;
}
mpp3 = PM8921_MPP_PM_TO_SYS(3);
rc = gpio_request(mpp3, "backlight_en");
if (rc) {
pr_err("request mpp3 failed, rc=%d\n", rc);
return -ENODEV;
}
lvds_power_on = true;
}
if (on) {
rc = regulator_enable(reg_lvs7);
if (rc) {
pr_err("enable lvs7 failed, rc=%d\n", rc);
return -ENODEV;
}
rc = regulator_set_optimum_mode(reg_l2, 100000);
if (rc < 0) {
pr_err("set_optimum_mode l2 failed, rc=%d\n", rc);
return -EINVAL;
}
rc = regulator_enable(reg_l2);
if (rc) {
pr_err("enable l2 failed, rc=%d\n", rc);
return -ENODEV;
}
rc = regulator_enable(reg_ext_3p3v);
if (rc) {
pr_err("enable reg_ext_3p3v failed, rc=%d\n", rc);
return -ENODEV;
}
gpio_set_value_cansleep(gpio36, 0);
gpio_set_value_cansleep(mpp3, 1);
} else {
gpio_set_value_cansleep(mpp3, 0);
gpio_set_value_cansleep(gpio36, 1);
rc = regulator_disable(reg_lvs7);
if (rc) {
pr_err("disable reg_lvs7 failed, rc=%d\n", rc);
return -ENODEV;
}
rc = regulator_disable(reg_l2);
if (rc) {
//.........这里部分代码省略.........
示例12: mipi_dsi_panel_power
/* OPPO 2013-07-4 Neal Modify begin for LCD */
int mipi_dsi_panel_power(int on)
{
/* OPPO 2012-08-31 zhengzk Modify begin for LCD */
static struct regulator *reg_lvs7, *reg_l2, *reg_l11, *reg_ext_3p3v;
static int gpio36, gpio25, mpp3;
#ifdef CONFIG_VENDOR_EDIT
static struct regulator *reg_l22;
#else
static int gpio26;
#endif
/* OPPO 2013-07-4 Neal Modify end*/
int rc;
pr_debug("%s: on=%d\n", __func__, on);
if (!dsi_power_on) {
reg_lvs7 = regulator_get(&msm_mipi_dsi1_device.dev,
"dsi1_vddio");
if (IS_ERR_OR_NULL(reg_lvs7)) {
pr_err("could not get 8921_lvs7, rc = %ld\n",
PTR_ERR(reg_lvs7));
return -ENODEV;
}
reg_l2 = regulator_get(&msm_mipi_dsi1_device.dev,
"dsi1_pll_vdda");
if (IS_ERR_OR_NULL(reg_l2)) {
pr_err("could not get 8921_l2, rc = %ld\n",
PTR_ERR(reg_l2));
return -ENODEV;
}
rc = regulator_set_voltage(reg_l2, 1200000, 1200000);
if (rc) {
pr_err("set_voltage l2 failed, rc=%d\n", rc);
return -EINVAL;
}
reg_l11 = regulator_get(&msm_mipi_dsi1_device.dev,
"dsi1_avdd");
if (IS_ERR(reg_l11)) {
pr_err("could not get 8921_l11, rc = %ld\n",
PTR_ERR(reg_l11));
return -ENODEV;
}
/* OPPO 2012-08-31 zhengzk Modify begin for LCD */
#ifndef CONFIG_VENDOR_EDIT
rc = regulator_set_voltage(reg_l11, 3000000, 3000000);
#else
rc = regulator_set_voltage(reg_l11, 3100000, 3100000);
#endif
/* OPPO 2012-08-31 zhengzk Modify end */
if (rc) {
pr_err("set_voltage l11 failed, rc=%d\n", rc);
return -EINVAL;
}
/* OPPO 2012-08-31 zhengzk Add begin for LCD */
#ifdef CONFIG_VENDOR_EDIT
reg_l22 = regulator_get(NULL, "8921_l22");
if (IS_ERR(reg_l22)) {
pr_err("could not get 8921_l22, rc = %ld\n",
PTR_ERR(reg_l22));
return -ENODEV;
}
rc = regulator_set_voltage(reg_l22, 1800000, 1800000);
if (rc) {
pr_err("set_voltage l22 failed, rc=%d\n", rc);
return -EINVAL;
}
#endif
/* OPPO 2012-08-31 zhengzk Modify end */
if (machine_is_apq8064_liquid()) {
reg_ext_3p3v = regulator_get(&msm_mipi_dsi1_device.dev,
"dsi1_vccs_3p3v");
if (IS_ERR_OR_NULL(reg_ext_3p3v)) {
pr_err("could not get reg_ext_3p3v, rc = %ld\n",
PTR_ERR(reg_ext_3p3v));
reg_ext_3p3v = NULL;
return -ENODEV;
}
mpp3 = PM8921_MPP_PM_TO_SYS(3);
rc = gpio_request(mpp3, "backlight_en");
if (rc) {
pr_err("request mpp3 failed, rc=%d\n", rc);
return -ENODEV;
}
}
gpio25 = PM8921_GPIO_PM_TO_SYS(25);
rc = gpio_request(gpio25, "disp_rst_n");
if (rc) {
pr_err("request gpio 25 failed, rc=%d\n", rc);
return -ENODEV;
}
#ifndef CONFIG_VENDOR_EDIT
gpio26 = PM8921_GPIO_PM_TO_SYS(26);
//.........这里部分代码省略.........
示例13: ARRAY_SIZE
.num_consumer_supplies = \
ARRAY_SIZE(vreg_consumers_##_id##_PC), \
.consumer_supplies = vreg_consumers_##_id##_PC, \
.supply_regulator = _supply_regulator, \
}, \
.id = RPM_VREG_ID_PM8921_##_id##_PC, \
.pin_fn = RPM_VREG_PIN_FN_8960_##_pin_fn, \
.pin_ctrl = _pin_ctrl, \
}
/* GPIO regulator constraints */
struct gpio_regulator_platform_data
apq8064_gpio_regulator_pdata[] __devinitdata = {
/* ID vreg_name gpio_label gpio supply active_low */
GPIO_VREG(EXT_5V, "ext_5v", "ext_5v_en",
PM8921_MPP_PM_TO_SYS(7), NULL, 0),
GPIO_VREG(EXT_3P3V, "ext_3p3v", "ext_3p3v_en",
APQ8064_EXT_3P3V_REG_EN_GPIO, NULL, 0),
GPIO_VREG(EXT_TS_SW, "ext_ts_sw", "ext_ts_sw_en",
PM8921_GPIO_PM_TO_SYS(23), "ext_3p3v", 0),
GPIO_VREG(EXT_MPP8, "ext_mpp8", "ext_mpp8_en",
PM8921_MPP_PM_TO_SYS(8), NULL, 0),
GPIO_VREG(EXT_SATA_PWR, "ext_sata_pwr", "ext_sata_pwr_en",
PM8921_MPP_PM_TO_SYS(4), "ext_3p3v", 1),
};
struct gpio_regulator_platform_data
mpq8064_gpio_regulator_pdata[] __devinitdata = {
GPIO_VREG(AVC_1P2V, "avc_1p2v", "avc_1p2v_en",
SX150X_GPIO(4, 2), NULL, 0),
GPIO_VREG(AVC_1P8V, "avc_1p8v", "avc_1p8v_en",
示例14: mipi_panel_power_tft
static int mipi_panel_power_tft(int enable)
{
int rc = 0;
#if defined(CONFIG_MACH_JACTIVE_ATT)
if(first_boot < 2) {
first_boot++;
printk("<0> First init Occurred ..... Finished Successfully \n");
return 0;
}
#endif
pr_info("%s %d", __func__, enable);
if (enable) {
#if defined(CONFIG_MACH_JACTIVE_EUR)
rc = regulator_set_optimum_mode(reg_LVS1, 100000); /*IOVDD */
if (rc < 0) {
pr_err("set_optimum_mode LVS1 failed, rc=%d\n", rc);
return -EINVAL;
}
rc = regulator_enable(reg_LVS1);
if (rc) {
pr_err("enable LVS1 failed, rc=%d\n", rc);
return -ENODEV;
}
#elif defined(CONFIG_MACH_JACTIVE)
if (system_rev >= 11) {
rc = regulator_set_optimum_mode(reg_LVS1, 100000); /*IOVDD */
if (rc < 0) {
pr_err("set_optimum_mode LVS1 failed, rc=%d\n", rc);
return -EINVAL;
}
rc = regulator_enable(reg_LVS1);
if (rc) {
pr_err("enable LVS1 failed, rc=%d\n", rc);
return -ENODEV;
}
}
#endif
rc = regulator_set_optimum_mode(reg_L15, 100000); /*IOVDD */
if (rc < 0) {
pr_err("set_optimum_mode L15 failed, rc=%d\n", rc);
return -EINVAL;
}
rc = regulator_enable(reg_L15);
if (rc) {
pr_err("enable L15 failed, rc=%d\n", rc);
return -ENODEV;
}
#if defined(CONFIG_MACH_JACTIVE_ATT)
if(system_rev < 10)
gpio_direction_output(gpio33, 1);
else
gpio_direction_output(LCD_22V_EN, 1);
#else
gpio_direction_output(LCD_22V_EN, 1);
#if defined(CONFIG_FB_MSM_ENABLE_LCD_EN2)
if( system_rev >= 16 ) // rev0.6 + 10
{
mdelay(10);
gpio_direction_output(LCD_22V_EN_2, 1);
}
#endif
#endif
#if !defined(CONFIG_MACH_JACTIVE_ATT) && !defined(CONFIG_MACH_JACTIVE_EUR)
/*active_reset_ldi(gpio43);*/
if (system_rev == 0)
gpio_direction_output(gpio43, 1);
else
pm8xxx_mpp_config(
PM8921_MPP_PM_TO_SYS(MLCD_RST_MPP2),
&MLCD_RESET_HIGH_CONFIG);
msleep(20);
#endif
#if defined(CONFIG_MACH_JACTIVE_EUR)
if( system_rev >= 15 ) // rev0.5 + 10
{
rc = regulator_set_optimum_mode(reg_L16, 100000); /*IOVDD */
if (rc < 0) {
pr_err("set_optimum_mode L16 failed, rc=%d\n", rc);
return -EINVAL;
}
rc = regulator_enable(reg_L16);
if (rc) {
pr_err("enable L16 failed, rc=%d\n", rc);
return -ENODEV;
}
msleep ( 10 );
}
#elif defined(CONFIG_MACH_JACTIVE_ATT)
if( system_rev >= 11 ) // rev0.3 + 8
{
rc = regulator_set_optimum_mode(reg_L16, 100000); /*IOVDD */
if (rc < 0) {
pr_err("set_optimum_mode L16 failed, rc=%d\n", rc);
return -EINVAL;
//.........这里部分代码省略.........
示例15: mipi_dsi_power_tft_request
//.........这里部分代码省略.........
gpio_free(LCD_22V_EN);
rc = gpio_request(LCD_22V_EN, "lcd_22v_en");
if(rc){
pr_err("request gpio lcd_22v_en failed, rc=%d\n", rc);
return -ENODEV;
}
}
pr_info("[lcd] configure LCD_22V_EN\n");
gpio_tlmm_config(GPIO_CFG(LCD_22V_EN, 0, GPIO_CFG_OUTPUT,
GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_ENABLE);
}
#else
pr_info("[lcd] request gpio lcd_22v_en\n");
rc = gpio_request(LCD_22V_EN, "lcd_22v_en");
if (rc) {
pr_err("request gpio lcd_22v_en failed, rc=%d\n", rc);
return -ENODEV;
}
pr_info("[lcd] configure LCD_22V_EN\n");
gpio_tlmm_config(GPIO_CFG(LCD_22V_EN, 0, GPIO_CFG_OUTPUT,
GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_ENABLE);
#if defined(CONFIG_FB_MSM_ENABLE_LCD_EN2)
if( system_rev >= 16 ) // rev0.6 + 10
{
pr_info("[lcd] request gpio lcd_22v_en_2\n");
rc = gpio_request(LCD_22V_EN_2, "lcd_22v_en_2");
if (rc) {
pr_err("request gpio lcd_22v_en_2 failed, rc=%d\n", rc);
return -ENODEV;
}
pr_info("[lcd] configure LCD_22V_EN_2\n");
gpio_tlmm_config(GPIO_CFG(LCD_22V_EN_2, 0, GPIO_CFG_OUTPUT,
GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_ENABLE);
}
#endif
#endif
if (system_rev == 0) {
gpio43 = PM8921_GPIO_PM_TO_SYS(
PMIC_GPIO_LCD_RST);
rc = gpio_request(gpio43, "mlcd_rst");
if (rc) {
pr_err("request gpio mlcd_rst failed, rc=%d\n", rc);
return -ENODEV;
}
rc = pm8xxx_gpio_config(gpio43, &gpio43_param);
if (rc) {
pr_err("gpio_config mlcd_rst failed (3), rc=%d\n", rc);
return -EINVAL;
}
}
#if defined(CONFIG_MACH_JACTIVE_ATT)
if (system_rev < 10)
gpio27 = PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_LED_DRIVER_REV00);
else
gpio27 = PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_LED_DRIVER_REV10);
#else
gpio27 = PM8921_GPIO_PM_TO_SYS(PMIC_GPIO_LED_DRIVER);
#endif
rc = gpio_request(gpio27, "led_dirver");
if (rc) {
pr_err("request gpio led_dirver failed, rc=%d\n", rc);
return -ENODEV;
}
rc = pm8xxx_gpio_config(gpio27, &gpio43_param);
if (rc) {
pr_err("gpio_config led_dirver failed (3), rc=%d\n", rc);
return -EINVAL;
}
#if !defined(CONFIG_MACH_JACTIVE_ATT) && !defined(CONFIG_MACH_JACTIVE_EUR)
#if defined(CONFIG_MACH_JACTIVE_ATT)
if(system_rev < 10)
gpio_direction_output(gpio33, 0);
else
gpio_direction_output(LCD_22V_EN, 0);
#else
gpio_direction_output(LCD_22V_EN, 0);
#endif
if (system_rev == 0)
gpio_direction_output(gpio43, 0);
else
pm8xxx_mpp_config(
PM8921_MPP_PM_TO_SYS(MLCD_RST_MPP2),
&MLCD_RESET_LOW_CONFIG);
msleep(1000);
#endif
gpio_direction_output(gpio27, 0);
return rc;
}