static kal_uint32 charging_get_current(void *data)
{
    kal_uint32 status = STATUS_OK;
    kal_uint32 array_size;
    kal_uint32 reg_value;

    array_size = GETARRAYNUM(CS_VTH);
        reg_value=pmic_get_register_value(PMIC_RG_CS_VTH);//RG_CS_VTH
    *(kal_uint32 *)data = charging_value_to_parameter(CS_VTH,array_size,reg_value);
    
    return status;
}  
Пример #2
0
 static kal_uint32 charging_get_current(void *data)
 {
    kal_uint32 status = STATUS_OK;
    kal_uint32 array_size; 
    kal_uint8 ret_val=0;    
	    
    //Get current level
	//ret_val = ncp1854_get_ichg();
    //ncp1854_read_interface(NCP1854_CON15, &ret_val, CON15_ICHG_MASK, CON15_ICHG_SHIFT);						    
    //Parsing
   // ret_val = (ret_val*100) + 400;
	
    array_size = GETARRAYNUM(CS_VTH);
    ret_val = ncp1854_get_ichg();	//IINLIM
    if(current_high_flag==1)
	*(kal_uint32 *)data = charging_value_to_parameter(CS_VTH,array_size,ret_val)+ 160000;
	else
    *(kal_uint32 *)data = charging_value_to_parameter(CS_VTH,array_size,ret_val);
	
    return status;
 }
Пример #3
0
 static kal_uint32 charging_get_current(void *data)
 {
    kal_uint32 status = STATUS_OK;
    kal_uint32 array_size;
    kal_uint8 reg_value;
	
    //Get current level
    array_size = GETARRAYNUM(CS_VTH);
    fan5405_read_interface(0x1, &reg_value, 0x3, 0x6);	//IINLIM
    *(kal_uint32 *)data = charging_value_to_parameter(CS_VTH,array_size,reg_value);
	
    return status;
 }  
Пример #4
0
static kal_uint32 charging_get_current(void *data)
{
    kal_uint32 status = STATUS_OK;
    kal_uint32 array_size;
    kal_uint8 reg_value;
   
    //Get current level
    array_size = GETARRAYNUM(CS_VTH);
    bq24261_read_interface(bq24261_CON4, &reg_value, 0x1F, 3); //ICHG to BAT
    *(kal_uint32 *)data = charging_value_to_parameter(CS_VTH,array_size,reg_value);
   
    return status;
}