rockchip,cabc_mode = <0>;
power_ctr: power_ctr {
rockchip,debug = <0>;
+ /*lcd_18:lcd18 {
+ rockchip,power_type = <REGULATOR>;
+ rockchip,regulator_name = "vcc_18";
+ rockchip,regulator_voltage = <1800000>;
+ rockchip,delay = <5>;
+ };*/
+
lcd_en:lcd_en {
rockchip,power_type = <GPIO>;
gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
pwr_ctr->pwr_ctr.volt = 0;
}
};
- of_property_read_u32(child, "rockchip,delay", &val);
- pwr_ctr->pwr_ctr.delay = val;
+
+ if (!of_property_read_u32(child, "rockchip,delay", &val))
+ pwr_ctr->pwr_ctr.delay = val;
+ else
+ pwr_ctr->pwr_ctr.delay = 0;
list_add_tail(&pwr_ctr->list, &dev_drv->pwrlist_head);
}
if (pwr_ctr->rgl_name)
regulator_lcd = regulator_get(NULL, pwr_ctr->rgl_name);
if (regulator_lcd == NULL) {
- dev_err(dev_drv->dev, "%s: regulator get failed,regulator name:%s\n",
- __func__, pwr_ctr->rgl_name);
+ dev_err(dev_drv->dev,
+ "%s: regulator get failed,regulator name:%s\n",
+ __func__, pwr_ctr->rgl_name);
continue;
}
regulator_set_voltage(regulator_lcd, pwr_ctr->volt, pwr_ctr->volt);
if (regulator_enable(regulator_lcd) == 0 || count == 0)
break;
else
- count--;
+ dev_err(dev_drv->dev,
+ "regulator_enable failed,count=%d\n",
+ count);
+ count--;
}
regulator_put(regulator_lcd);
msleep(pwr_ctr->delay);
if (pwr_ctr->rgl_name)
regulator_lcd = regulator_get(NULL, pwr_ctr->rgl_name);
if (regulator_lcd == NULL) {
- dev_err(dev_drv->dev, "%s: regulator get failed,regulator name:%s\n",
- __func__, pwr_ctr->rgl_name);
+ dev_err(dev_drv->dev,
+ "%s: regulator get failed,regulator name:%s\n",
+ __func__, pwr_ctr->rgl_name);
continue;
}
while (regulator_is_enabled(regulator_lcd) > 0) {
if (regulator_disable(regulator_lcd) == 0 || count == 0)
break;
else
- count--;
+ dev_err(dev_drv->dev,
+ "regulator_disable failed,count=%d\n",
+ count);
+ count--;
}
regulator_put(regulator_lcd);
}