Example #1
0
static void lcdc_ili9325sim_set_backlight(struct msm_fb_data_type *mfd)
{
	static bool bl_on = false;
	bool panel_on = mfd->panel_power_on;
	int bl_lv = mfd->bl_level;

	printk("bl_lv %d bl_on %d panel_on %d\n", bl_lv, bl_on, panel_on);
	if (bl_lv && panel_on) {
		if (!bl_on) {
			msleep(200);
			ChargePumpPowerOn();
			bl_on = true;
		}
		ChargePumpSetDispLightLv(bl_lv);
	} else {
		ChargePumpPowerOff();
		bl_on = false;
	}
}
Example #2
0
static int __init ChargePumpProbe(struct platform_device *pdev) {

    int rc = 0;
    struct resource *res;
    
    ChargePumpRes.Device = pdev;

    do {
        res = platform_get_resource_byname(ChargePumpRes.Device, IORESOURCE_IO, "ctrl");
        if (!res) {
            printk(KERN_ERR "%s:%d get ctrl pin fail\n",
                    __func__, __LINE__);
            rc = -EIO;
            break;
        }
        ChargePumpRes.Id = res->start;
        ChargePumpPowerOff();
    } while(0);

    return rc;
}