void lm3630_backlight_on(int level) { if (backlight_status == BL_OFF) { pr_info("%s with level %d\n", __func__, level); lm3630_hw_reset(); /* OVP(24V),OCP(1.0A) , Boost Frequency(500khz) */ lm3630_write_reg(main_lm3630_dev->client, 0x02, 0x30); if( lm3630_pwm_enable ) { /* eble Feedback , disable PWM for BANK A,B */ lm3630_write_reg(main_lm3630_dev->client, 0x01, 0x09); } else { /* eble Feedback , disable PWM for BANK A,B */ lm3630_write_reg(main_lm3630_dev->client, 0x01, 0x08); } /* Brightness Code Setting Max on Bank A */ /* Full-Scale Current (20.2mA) of BANK A */ /* 20.2mA : 0x13 , 23.4mA : 0x17 */ lm3630_write_reg(main_lm3630_dev->client, 0x05, 0x16); /* Enable LED A to Exponential, LED2 is connected to BANK_A */ lm3630_write_reg(main_lm3630_dev->client, 0x00, 0x15); } mdelay(1); lm3630_set_main_current_level(main_lm3630_dev->client, level); backlight_status = BL_ON; return; }
static void lm3630_hw_init(struct lm3630_device *dev) { lm3630_hw_reset(dev); lm3630_write_reg(dev->client, BOOST_CTL_REG, dev->boost_ctrl_reg); lm3630_write_reg(dev->client, CONFIG_REG, dev->cfg_reg); if (!backlight_dimmer) lm3630_set_max_current_reg(dev, dev->max_current); lm3630_write_reg(dev->client, CONTROL_REG, dev->ctrl_reg); mdelay(1); }
void lm3630_backlight_on(int level) { hw_rev_type hw_rev; hw_rev = lge_get_board_revno(); if (backlight_status == BL_OFF) { pr_info("%s with level %d\n", __func__, level); lm3630_hw_reset(); /* OVP(24V),OCP(1.0A) , Boost Frequency(500khz) */ #if !defined(CONFIG_MACH_MSM8926_B1L_VZW) && !defined(CONFIG_MACH_MSM8926_B1L_ATT) lm3630_write_reg(main_lm3630_dev->client, 0x02, 0x30); #else lm3630_write_reg(main_lm3630_dev->client, 0x02, 0x50); /*B1L Rev0,A... OVP = 32V */ #endif if( lm3630_pwm_enable ) { /* eble Feedback , disable PWM for BANK A,B */ lm3630_write_reg(main_lm3630_dev->client, 0x01, 0x09); } else { /* eble Feedback , disable PWM for BANK A,B */ lm3630_write_reg(main_lm3630_dev->client, 0x01, 0x08); } /* Brightness Code Setting Max on Bank A */ /* Full-Scale Current (20.2mA) of BANK A */ /* 20.2mA : 0x13 , 23.4mA : 0x17 */ lm3630_write_reg(main_lm3630_dev->client, 0x05, 0x16); /* Enable LED A to Exponential, LED2 is connected to BANK_A */ #if !defined(CONFIG_MACH_MSM8926_B1L_VZW) && !defined(CONFIG_MACH_MSM8926_B1L_ATT) lm3630_write_reg(main_lm3630_dev->client, 0x00, 0x15); #else if(HW_REV_0 == hw_rev) { pr_info("%s HW_REV_0\n", __func__); lm3630_write_reg(main_lm3630_dev->client, 0x00, 0x14 /*0x14*/); /* 0x15 : enable BANK A | enable LED A */ } else { pr_info("%s HW_REV_A\n", __func__); lm3630_write_reg(main_lm3630_dev->client, 0x00, 0x15 /*0x14*/); /* 0x15 : enable BANK A | enable LED A | LED2 on BANK A */ } #endif } mdelay(1); lm3630_set_main_current_level(main_lm3630_dev->client, level); backlight_status = BL_ON; return; }
void lm3630_backlight_on(int level) { hw_rev_type hw_rev; hw_rev = lge_get_board_revno(); if (backlight_status == BL_OFF) { pr_info("%s with level %d\n", __func__, level); lm3630_hw_reset(); #if defined(CONFIG_MACH_MSM8226_E7WIFI) || defined(CONFIG_MACH_MSM8226_E8WIFI) || defined (CONFIG_MACH_MSM8926_E8LTE_KR) || defined(CONFIG_MACH_MSM8926_E8LTE) || defined ( CONFIG_MACH_MSM8926_E7LTE_ATT_US) || defined(CONFIG_MACH_MSM8926_E7LTE_VZW_US) || defined (CONFIG_MACH_MSM8926_E7LTE_USC_US) lm3630_write_reg(main_lm3630_dev->client, 0x02, 0x50); //OVP 32V, OCP 1.0A Boost Freq. 500Khz if( lm3630_pwm_enable ) { /* Enble Feedback , disable PWM for BANK A,B */ lm3630_write_reg(main_lm3630_dev->client, 0x01, 0x09); } else { /* Enble Feedback , disable PWM for BANK A,B */ lm3630_write_reg(main_lm3630_dev->client, 0x01, 0x08); } lm3630_write_reg(main_lm3630_dev->client, 0x05, 0x13); //Full Scale Current 20.2mA, Brightness Code Setting Max on Bank A lm3630_write_reg(main_lm3630_dev->client, 0x00, 0x15); //Enable Bank A | LED A | LED1,2 on Bank A #else /* OVP(24V),OCP(1.0A) , Boost Frequency(500khz) */ #if !defined(CONFIG_MACH_MSM8926_X10_VZW) && !defined(CONFIG_MACH_MSM8926_B2L_ATT) && !defined(CONFIG_MACH_MSM8926_B2LN_KR) || defined(CONFIG_MACH_MSM8926_JAGNM_ATT) || defined(CONFIG_MACH_MSM8926_JAGN_KR) || defined(CONFIG_MACH_MSM8926_JAGNM_GLOBAL_COM) || defined(CONFIG_MACH_MSM8926_JAGNM_KDDI_JP) || defined(CONFIG_MACH_MSM8926_AKA_KR) || defined(CONFIG_MACH_MSM8926_F60S_JP) lm3630_write_reg(main_lm3630_dev->client, 0x02, 0x30); #else lm3630_write_reg(main_lm3630_dev->client, 0x02, 0x50); /*B1L Rev0,A... OVP = 32V */ #endif if( lm3630_pwm_enable ) { /* eble Feedback , disable PWM for BANK A,B */ lm3630_write_reg(main_lm3630_dev->client, 0x01, 0x09); } else { /* eble Feedback , disable PWM for BANK A,B */ lm3630_write_reg(main_lm3630_dev->client, 0x01, 0x08); } /* Brightness Code Setting Max on Bank A */ /* Full-Scale Current (20.2mA) of BANK A */ /* 20.2mA : 0x13 , 23.4mA : 0x17 */ lm3630_write_reg(main_lm3630_dev->client, 0x05, 0x16); /* Enable LED A to Exponential, LED2 is connected to BANK_A */ #if !defined(CONFIG_MACH_MSM8926_X10_VZW) && !defined(CONFIG_MACH_MSM8926_B2L_ATT) && !defined(CONFIG_MACH_MSM8926_B2LN_KR) || defined(CONFIG_MACH_MSM8926_JAGNM_ATT) || defined(CONFIG_MACH_MSM8926_JAGN_KR) || defined(CONFIG_MACH_MSM8926_JAGNM_GLOBAL_COM) || defined(CONFIG_MACH_MSM8926_JAGNM_KDDI_JP) || defined(CONFIG_MACH_MSM8926_AKA_KR) || defined(CONFIG_MACH_MSM8926_F60S_JP) lm3630_write_reg(main_lm3630_dev->client, 0x00, 0x15); #else if(HW_REV_0 == hw_rev) { pr_info("%s HW_REV_0\n", __func__); lm3630_write_reg(main_lm3630_dev->client, 0x00, 0x14 /*0x14*/); /* 0x15 : enable BANK A | enable LED A */ } else { pr_info("%s HW_REV_A\n", __func__); lm3630_write_reg(main_lm3630_dev->client, 0x00, 0x15 /*0x14*/); /* 0x15 : enable BANK A | enable LED A | LED2 on BANK A */ } #endif #endif//defined( CONFIG_MACH_MSM8226_E7WIFI ) || defined ( CONFIG_MACH_MSM8926_E7LTE) } mdelay(1); lm3630_set_main_current_level(main_lm3630_dev->client, level); backlight_status = BL_ON; return; }