static void wq_get_thermal(struct work_struct *work) { unsigned char count=0; unsigned int thermal_value[MTK_THERMAL_SENSOR_COUNT]; //Note here int cpu; unsigned long long stamp; //return; cpu = smp_processor_id(); if (do_thermal()) { stamp = cpu_clock(cpu); #if NO_MTK_THERMAL_GET_TEMP == 0 count = get_thermal(thermal_value); #endif if (count) { ms_th(stamp, count, thermal_value); } } }
void update_status() { #ifdef DEBUG char buffer[256]; sprintf(buffer, "Update Status: draw Memory %s", sbar_status_symbols[DrawMemory].active ? "yes" : "no"); log_str(buffer, LOG_DEBUG); sprintf(buffer, "Update Status: draw Battery %s", sbar_status_symbols[DrawBattery].active ? "yes" : "no"); log_str(buffer, LOG_DEBUG); sprintf(buffer, "Update Status: draw Uptime %s", sbar_status_symbols[DrawUptime].active ? "yes" : "no"); log_str(buffer, LOG_DEBUG); sprintf(buffer, "Update Status: draw Termal %s", sbar_status_symbols[DrawTermal].active ? "yes" : "no"); log_str(buffer, LOG_DEBUG); #ifdef NF310_A01 sprintf(buffer, "Update Status: draw Backlight %s", sbar_status_symbols[DrawBacklight].active ? "yes" : "no"); log_str(buffer, LOG_DEBUG); #endif sprintf(buffer, "Update Status: draw Net %s", sbar_status_symbols[DrawNet].active ? "yes" : "no"); log_str(buffer, LOG_DEBUG); #endif if(sbar_status_symbols[DrawMemory].active) { get_memory(); #ifdef DEBUG log_str("Sucessfully Updated Memory", LOG_DEBUG); #endif } if(sbar_status_symbols[DrawBattery].active) { check_battery(); #ifdef DEBUG log_str("Sucessfully Updated Battery", LOG_DEBUG); #endif } cpu_usage(); #ifdef DEBUG log_str("Sucessfully Updated CPU", LOG_DEBUG); #endif update_date(); #ifdef DEBUG log_str("Sucessfully Updated Date", LOG_DEBUG); #endif if(sbar_status_symbols[DrawUptime].active) { update_uptime(); #ifdef DEBUG log_str("Sucessfully Updated Uptime", LOG_DEBUG); #endif } if(sbar_status_symbols[DrawTermal].active) { get_thermal(); #ifdef DEBUG log_str("Sucessfully Updated Termal", LOG_DEBUG); #endif } #ifdef NF310_A01 if(sbar_status_symbols[DrawBacklight].active) { update_backlight(); #ifdef DEBUG log_str("Sucessfully Updated Backlight", LOG_DEBUG); #endif } #endif if(sbar_status_symbols[DrawNet].active) { update_net(); #ifdef DEBUG log_str("Sucessfully Updated Net", LOG_DEBUG); #endif } update_disk(); #ifdef DEBUG log_str("Sucessfully Updated Disk", LOG_DEBUG); #endif }