1. 增加判断
#if 0
printk("%s :app_id: %ld, min: %d max: %d timeout: %d ms\n",
__func__,pos->id, pos->minlevel, pos->maxlevel, pos->timeout);
#endif
2.直接注掉
//printk(KERN_ERR"%s: id %ld \n",__func__, rp->id);
3.关闭log位置([srs]delete log)
4 .sensor相关关闭LOG
drivers/input/windsensors/accelerometer/inc/accel.h
drivers/input/windsensors/accelerometer/lsm6ds3/lsm6ds3.c
drivers/input/windsensors/alsps/alsps.c
#if 0
#define ACC_ERR(fmt, args...) pr_err(ACC_TAG fmt, ##args)
#define ACC_LOG(fmt, args...) pr_debug(ACC_TAG fmt, ##args)
#define ACC_VER(fmt, args...) pr_debug(ACC_TAG fmt, ##args)
#else
#define ACC_ERR(fmt, args...) //pr_err(ACC_TAG fmt, ##args)
#define ACC_LOG(fmt, args...) //pr_debug(ACC_TAG fmt, ##args)
#define ACC_VER(fmt, args...) //pr_debug(ACC_TAG fmt, ##args)
#endif
#if 0
#define GSE_FUN(f) printk(KERN_INFO GSE_TAG"%s\n", __FUNCTION__)
#define GSE_ERR(fmt, args...) printk(KERN_ERR GSE_TAG "%s %d : " fmt, __FUNCTION__, __LINE__, ##args)
#define GSE_LOG(fmt, args...) printk(KERN_INFO GSE_TAG "%s %d : " fmt, __FUNCTION__, __LINE__, ##args)
#else
#define GSE_FUN(f) //printk(KERN_INFO GSE_TAG"%s\n", __FUNCTION__)
#define GSE_ERR(fmt, args...) //printk(KERN_ERR GSE_TAG "%s %d : " fmt, __FUNCTION__, __LINE__, ##args)
#define GSE_LOG(fmt, args...) //printk(KERN_INFO GSE_TAG "%s %d : " fmt, __FUNCTION__, __LINE__, ##args)
#endif
//ALSPS_LOG(" als data[%d]\n" , cxt->drv_data.als_data.values[0]);
5 . charger Remove some debug logs
drivers/power/bq25898_effi.c
drivers/power/bq27426_fg.c
static int crh_debug_log = 0;
if(crh_debug_log){
printk("bq2589x_dump_status start:\n");}
for (addr = 0x0; addr <= 0x14; addr++) {
ret = bq2589x_read_byte(bq, &val, addr);
if (ret == 0)
printk("bq_reg[%02X]=0x%02X,", addr, val);
}
if(crh_debug_log){
printk("bq2589x_dump_status end\n");}
bq->vbus_volt = bq2589x_adc_read_vbus_volt(bq);
bq->vbat_volt = bq2589x_adc_read_battery_volt(bq);
chg_current = bq2589x_adc_read_charge_current(bq);
if(crh_debug_log){
pr_info("vbus:%d,vbat:%d,ibat:%d\n", bq->vbus_volt,
bq->vbat_volt, chg_current);}
ret = bq2589x_read_byte(bq, &status, BQ2589X_REG_13);
if(crh_debug_log){
if (!ret){
if (status & BQ2589X_VDPM_STAT_MASK)
dev_info(bq->dev, "%s:VINDPM occurred\n", __func__);
if (status & BQ2589X_IDPM_STAT_MASK)
dev_info(bq->dev, "%s:IINDPM occurred\n", __func__);
}
}
// printk("bq27426_dump_status start\n");
6 .增加抓LOG(android)
import android.util.Log;
Log.d("zyc", "=start=onClick==");