return -1;
}
#if defined(CONFIG_MFD_TPS65910)
- if(g_pmic_type == PMIC_TYPE_TPS65910)
- {
- gpio_direction_output(PWM_GPIO, GPIO_LOW);
- }
+ if (pmic_is_tps65910() )
+ gpio_direction_output(PWM_GPIO, GPIO_LOW);
#endif
#if defined(CONFIG_REGULATOR_ACT8931)
- if(g_pmic_type == PMIC_TYPE_ACT8931)
- {
- gpio_direction_output(PWM_GPIO, GPIO_HIGH);
- }
+ if (pmic_is_act8931() )
+ gpio_direction_output(PWM_GPIO, GPIO_HIGH);
#endif
#ifdef LCD_DISP_ON_PIN
gpio_direction_output(BL_EN_PIN, 0);
{
#if 0//defined(CONFIG_REGULATOR_ACT8931)
- if(g_pmic_type == PMIC_TYPE_ACT8931)
- {
+ if (pmic_is_act8931() ){
struct regulator *ldo;
ldo = regulator_get(NULL, "act_ldo4"); //vcc_lcd
regulator_disable(ldo);
static int rk_fb_io_enable(void)
{
#if 0//defined(CONFIG_REGULATOR_ACT8931)
- if(g_pmic_type == PMIC_TYPE_ACT8931)
- {
+ if (pmic_is_act8931() ){
struct regulator *ldo;
ldo = regulator_get(NULL, "act_ldo4"); //vcc_lcd
regulator_enable(ldo);
struct regulator *ldo = NULL;
#if defined(CONFIG_MFD_TPS65910)
- if(g_pmic_type == PMIC_TYPE_TPS65910) {
+ if (pmic_is_tps65910() )
ldo = regulator_get(NULL, "vmmc"); //vccio_wl
- }
#endif
#if defined(CONFIG_REGULATOR_ACT8931)
- if(g_pmic_type == PMIC_TYPE_ACT8931) {
+ if(pmic_is_act8931() )
ldo = regulator_get(NULL, "act_ldo4"); //vccio_wl
- }
#endif
if(on) {
void __sramfunc board_pmu_suspend(void)
{
#if defined (CONFIG_MFD_TPS65910)
- if(g_pmic_type == PMIC_TYPE_TPS65910)
- board_pmu_tps65910_suspend();
+ if(pmic_is_tps65910() )
+ board_pmu_tps65910_suspend();
#endif
}
void __sramfunc board_pmu_resume(void)
{
#if defined (CONFIG_MFD_TPS65910)
- if(g_pmic_type == PMIC_TYPE_TPS65910)
- board_pmu_tps65910_resume();
+ if(pmic_is_tps65910() )
+ board_pmu_tps65910_resume();
#endif
}
printk(KERN_ERR "rk2928_pm_power_off start...\n");
#if defined(CONFIG_REGULATOR_ACT8931)
- if(g_pmic_type == PMIC_TYPE_ACT8931)
- {
+ if (pmic_is_act8931() ){
if(act8931_charge_det)
arm_pm_restart(0, NULL);
- }
+ }
#endif
#if defined(CONFIG_MFD_TPS65910)
- if(g_pmic_type == PMIC_TYPE_TPS65910)
- {
+ if(pmic_is_tps65910() )
tps65910_device_shutdown();//tps65910 shutdown
- }
#endif
gpio_direction_output(POWER_ON_PIN, GPIO_LOW);