Ejemplo n.º 1
0
static void bq27541_battery_work(struct work_struct *work)
{
	unsigned int value;
	struct bq27541_dev_info *di = container_of(work,
						     struct bq27541_dev_info,
						     monitor_work.work);
	const int interval = HZ * 10;
	pr_info("at %s\n",__func__);
	//bq27541_battery_update_status(di);
    if(!bBq27541Supend)
    {
	   /*if ((di->battery_status == POWER_SUPPLY_STATUS_CHARGING)
	   	&& (bq27x00_battery_ai(di)<0)) //something wrong with mc23892
	   {
    	   	pmic_read_reg(REG_CHARGE, &value, 0xffffff);
    	   	value |= 0x100000;
    	   	pmic_write_reg(REG_CHARGE, value, 0xffffff);
	   }*/
	   if(plat_data->ch_status()){
            set_charge_current();
        }
    	bq27541_battery_update_status(di);
    }
	queue_delayed_work(di->monitor_wqueue, &di->monitor_work, interval);
}
Ejemplo n.º 2
0
static void bq27541_battery_work(struct work_struct *work)
{
	struct bq27541_device_info *di = container_of(work, struct bq27541_device_info, work.work); 
	bq27541_battery_update_status(di);
	/* reschedule for the next time */
	schedule_delayed_work(&di->work, di->interval);
}
Ejemplo n.º 3
0
static void bq27541_battery_work(struct work_struct *work)
{
	struct bq27541_device_info *di = container_of(work, struct bq27541_device_info, work.work); 
	bq27541_battery_update_status(di);

#if defined(CONFIG_CHARGER_LIMITED_BY_TEMP)
	if((1 == charge_en_flags) && (temp_val >= DIS_CHARGING_TEMP))
		update_temp_ok = 1;
#endif
	/* reschedule for the next time */
	schedule_delayed_work(&di->work, di->interval);
}