Skip to content
This repository has been archived by the owner on Nov 14, 2021. It is now read-only.

Commit

Permalink
oneplus: Silence gratuitous OEM logging
Browse files Browse the repository at this point in the history
For the love of god, I do not require my every input logged to dmesg.

Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
  • Loading branch information
0ctobot committed Mar 6, 2021
1 parent ce14a32 commit e1f987f
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 36 deletions.
24 changes: 12 additions & 12 deletions drivers/oneplus/input/fingerprint/goodix/gf_spi.c
Expand Up @@ -665,19 +665,19 @@ static const struct attribute_group gf_attribute_group = {
static struct fp_underscreen_info fp_tpinfo ={0};
int opticalfp_irq_handler(struct fp_underscreen_info* tp_info)
{
pr_info("[info]:%s", __func__);
pr_debug("[info]:%s", __func__);

if (gf.spi == NULL) {
return 0;
}
fp_tpinfo = *tp_info;

if (fp_tpinfo.touch_state == 1) {
pr_err("TOUCH DOWN, fp_tpinfo.x = %d, fp_tpinfo.y = %d \n", fp_tpinfo.x, fp_tpinfo.y);
pr_debug("TOUCH DOWN, fp_tpinfo.x = %d, fp_tpinfo.y = %d \n", fp_tpinfo.x, fp_tpinfo.y);
fp_tpinfo.touch_state = GF_NET_EVENT_TP_TOUCHDOWN;
sendnlmsg_tp(&fp_tpinfo,sizeof(fp_tpinfo));
} else if (fp_tpinfo.touch_state == 0) {
pr_err("TOUCH UP, fp_tpinfo.x = %d, fp_tpinfo.y = %d \n", fp_tpinfo.x, fp_tpinfo.y);
pr_debug("TOUCH UP, fp_tpinfo.x = %d, fp_tpinfo.y = %d \n", fp_tpinfo.x, fp_tpinfo.y);
fp_tpinfo.touch_state = GF_NET_EVENT_TP_TOUCHUP;
sendnlmsg_tp(&fp_tpinfo,sizeof(fp_tpinfo));
}
Expand All @@ -690,7 +690,7 @@ int gf_opticalfp_irq_handler(int event)
{
char msg = 0;

pr_info("[info]:%s, event %d", __func__, event);
pr_debug("[info]:%s, event %d", __func__, event);

if (gf.spi == NULL) {
return 0;
Expand Down Expand Up @@ -754,7 +754,7 @@ static int goodix_fb_state_chg_callback(struct notifier_block *nb,
}
break;
default:
pr_info("%s defalut\n", __func__);
pr_debug("%s defalut\n", __func__);
break;
}
}
Expand Down Expand Up @@ -782,21 +782,21 @@ static int goodix_fb_state_chg_callback(
blank = *(int *)(evdata->data);

if (val == DRM_PANEL_ONSCREENFINGERPRINT_EVENT) {
pr_info("[%s] UI ready enter\n", __func__);
pr_debug("[%s] UI ready enter\n", __func__);

switch (blank) {
case 0:
pr_info("[%s] UI disappear\n", __func__);
pr_debug("[%s] UI disappear\n", __func__);
msg = GF_NET_EVENT_UI_DISAPPEAR;
sendnlmsg(&msg);
break;
case 1:
pr_info("[%s] UI ready\n", __func__);
pr_debug("[%s] UI ready\n", __func__);
msg = GF_NET_EVENT_UI_READY;
sendnlmsg(&msg);
break;
default:
pr_info("[%s] Unknown EVENT\n", __func__);
pr_debug("[%s] Unknown EVENT\n", __func__);
break;
}
return 0;
Expand All @@ -812,7 +812,7 @@ static int goodix_fb_state_chg_callback(
gf_dev->fb_black = 1;
#if defined(GF_NETLINK_ENABLE)
msg = GF_NET_EVENT_FB_BLACK;
pr_info("[%s] SCREEN OFF\n", __func__);
pr_debug("[%s] SCREEN OFF\n", __func__);
sendnlmsg(&msg);
#elif defined(GF_FASYNC)
if (gf_dev->async) {
Expand All @@ -830,7 +830,7 @@ static int goodix_fb_state_chg_callback(
gf_dev->fb_black = 0;
#if defined(GF_NETLINK_ENABLE)
msg = GF_NET_EVENT_FB_UNBLACK;
pr_info("[%s] SCREEN ON\n", __func__);
pr_debug("[%s] SCREEN ON\n", __func__);
sendnlmsg(&msg);
#elif defined(GF_FASYNC)
if (gf_dev->async)
Expand All @@ -843,7 +843,7 @@ static int goodix_fb_state_chg_callback(
NULL, dev_attr_screen_state.attr.name);
break;
default:
pr_info("%s defalut\n", __func__);
pr_debug("%s defalut\n", __func__);
break;
}
}
Expand Down
Expand Up @@ -32,17 +32,17 @@ struct pm_qos_request pm_qos_req_stp;

/****************** Start of Log Tag Declear and level define*******************************/
#define TPD_DEVICE "sec-s6sy761"
#define TPD_INFO(a, arg...) pr_err("[TP]"TPD_DEVICE ": " a, ##arg)
#define TPD_INFO(a, arg...) pr_debug("[TP]"TPD_DEVICE ": " a, ##arg)
#define TPD_DEBUG(a, arg...)\
do{\
if (LEVEL_DEBUG == tp_debug)\
pr_err("[TP]"TPD_DEVICE ": " a, ##arg);\
pr_debug("[TP]"TPD_DEVICE ": " a, ##arg);\
}while(0)

#define TPD_DETAIL(a, arg...)\
do{\
if (LEVEL_BASIC != tp_debug)\
pr_err("[TP]"TPD_DEVICE ": " a, ##arg);\
pr_debug("[TP]"TPD_DEVICE ": " a, ##arg);\
}while(0)

#define TPD_DEBUG_NTAG(a, arg...)\
Expand Down
6 changes: 3 additions & 3 deletions drivers/oneplus/input/touchscreen/touchpanel_common_driver.c
Expand Up @@ -37,17 +37,17 @@
/*******Part0:LOG TAG Declear************************/
#define TPD_PRINT_POINT_NUM 150
#define TPD_DEVICE "touchpanel"
#define TPD_INFO(a, arg...) pr_err("[TP]"TPD_DEVICE ": " a, ##arg)
#define TPD_INFO(a, arg...) pr_devel("[TP]"TPD_DEVICE ": " a, ##arg)
#define TPD_DEBUG(a, arg...)\
do{\
if (LEVEL_DEBUG == tp_debug)\
pr_err("[TP]"TPD_DEVICE ": " a, ##arg);\
pr_devel("[TP]"TPD_DEVICE ": " a, ##arg);\
}while(0)

#define TPD_DETAIL(a, arg...)\
do{\
if (LEVEL_BASIC != tp_debug)\
pr_err("[TP]"TPD_DEVICE ": " a, ##arg);\
pr_devel("[TP]"TPD_DEVICE ": " a, ##arg);\
}while(0)

#define TPD_SPECIFIC_PRINT(count, a, arg...)\
Expand Down
20 changes: 10 additions & 10 deletions drivers/oneplus/power/supply/qcom/bq27541_fuelgauger.c
Expand Up @@ -795,7 +795,7 @@ struct bq27541_device_info *di, int suspend_time_ms)
fg_soc_changed = (soc < TWENTY_PERCENT
|| soc_delt > di->lcd_off_delt_soc
|| suspend_time_ms > TEN_MINUTES);
pr_info("suspend_time_ms=%d,soc_delt=%d,di->lcd_off_delt_soc=%d\n",
pr_debug("suspend_time_ms=%d,soc_delt=%d,di->lcd_off_delt_soc=%d\n",
suspend_time_ms, soc_delt, di->lcd_off_delt_soc);
if (fg_soc_changed) {
if (suspend_time_ms/TEN_MINUTES) {
Expand Down Expand Up @@ -825,7 +825,7 @@ struct bq27541_device_info *di, int suspend_time_ms)

read_soc_err:
if (di->soc_pre) {
dev_warn(di->dev,
dev_dbg(di->dev,
"read_soc_exit ,di->soc_pre=%d\n", di->soc_pre);
return di->soc_pre;
} else
Expand Down Expand Up @@ -1074,13 +1074,13 @@ static int bq27541_set_lcd_off_status(int off)
{
int soc;

pr_info("off=%d\n", off);
pr_debug("off=%d\n", off);
if (bq27541_di && bq27541_registered) {
if (off) {
soc = bq27541_get_batt_bq_soc();
bq27541_di->lcd_off_delt_soc =
bq27541_di->soc_pre - soc;
pr_info("lcd_off_delt_soc:%d,soc=%d,soc_pre=%d\n",
pr_debug("lcd_off_delt_soc:%d,soc=%d,soc_pre=%d\n",
bq27541_di->lcd_off_delt_soc, soc,
bq27541_di->soc_pre);
get_current_time(&bq27541_di->lcd_off_time);
Expand Down Expand Up @@ -1201,7 +1201,7 @@ static void update_battery_soc_work(struct work_struct *work)
static int pre_plugin_status = 0;
static bool pre_dash_started = 0;

pr_info("plugin:%d,dash_start:%d:smooth:%d\n",
pr_debug("plugin:%d,dash_start:%d:smooth:%d\n",
is_usb_pluged(), get_dash_started(),bq27541_di->set_smoothing);
switch_flag = REFRESH_TRUE;
if (pre_plugin_status != is_usb_pluged()
Expand Down Expand Up @@ -1579,15 +1579,15 @@ static struct platform_device this_device = {

static void update_pre_capacity_func(struct work_struct *w)
{
pr_info("enter\n");
pr_debug("enter\n");
bq27541_set_allow_reading(true);
bq27541_get_battery_temperature();
bq27541_battery_soc(bq27541_di, update_pre_capacity_data.suspend_time);
bq27541_get_batt_remaining_capacity();
bq27541_get_batt_full_chg_capacity();
bq27541_set_allow_reading(false);
__pm_relax(bq27541_di->update_soc_wake_lock);
pr_info("exit\n");
pr_debug("exit\n");
}

#define MAX_RETRY_COUNT 5
Expand Down Expand Up @@ -2506,7 +2506,7 @@ static int bq27541_battery_suspend(struct device *dev)
int ret = 0;
struct bq27541_device_info *di = dev_get_drvdata(dev);

pr_info("bq27541_battery_suspend\n");
pr_debug("bq27541_battery_suspend\n");
//cancel_delayed_work_sync(&di->battery_soc_work);
atomic_set(&di->suspended, 1);
ret = get_current_time(&di->rtc_suspend_time);
Expand Down Expand Up @@ -2534,13 +2534,13 @@ static int bq27541_battery_resume(struct device *dev)
return 0;
}
suspend_time = di->rtc_resume_time - di->rtc_suspend_time;
pr_info("suspend_time=%d\n", suspend_time);
pr_debug("suspend_time=%d\n", suspend_time);
update_pre_capacity_data.suspend_time = suspend_time;
if (di->soc_pre < LOW_BATTERY_LEVEL_THRESHOLD)
di->short_time_standby_count += SHORT_TIME_STANDBY_SOC_CHECK_COUNT;
if ((di->rtc_resume_time - di->lcd_off_time >= TWO_POINT_FIVE_MINUTES)
|| di->short_time_standby_count >= SHORT_TIME_STANDBY_SOC_CHECK_COUNT) {
pr_err("di->rtc_resume_time - di->lcd_off_time=%ld\n",
pr_debug("di->rtc_resume_time - di->lcd_off_time=%ld\n",
di->rtc_resume_time - di->lcd_off_time);
__pm_stay_awake(di->update_soc_wake_lock);
get_current_time(&di->lcd_off_time);
Expand Down
10 changes: 5 additions & 5 deletions drivers/oneplus/power/supply/wlchg/bq2597x_charger.c
Expand Up @@ -132,13 +132,13 @@ static int bq2597x_mode_data[] = {
#define bq_info(fmt, ...) \
do { \
if (bq->mode == BQ25970_ROLE_MASTER) \
printk(KERN_INFO "[bq2597x-MASTER]:%s:" fmt, __func__, \
printk(KERN_DEBUG "[bq2597x-MASTER]:%s:" fmt, __func__, \
##__VA_ARGS__); \
else if (bq->mode == BQ25970_ROLE_SLAVE) \
printk(KERN_INFO "[bq2597x-SLAVE]:%s:" fmt, __func__, \
printk(KERN_DEBUG "[bq2597x-SLAVE]:%s:" fmt, __func__, \
##__VA_ARGS__); \
else \
printk(KERN_INFO "[bq2597x-STANDALONE]:%s:" fmt, \
printk(KERN_DEBUG "[bq2597x-STANDALONE]:%s:" fmt, \
__func__, ##__VA_ARGS__); \
} while (0)

Expand Down Expand Up @@ -2491,7 +2491,7 @@ static int bq2597x_suspend(struct device *dev)
mutex_lock(&bq->irq_complete);
bq->resume_completed = false;
mutex_unlock(&bq->irq_complete);
bq_err("Suspend successfully!");
bq_dbg("Suspend successfully!");

return 0;
}
Expand Down Expand Up @@ -2526,7 +2526,7 @@ static int bq2597x_resume(struct device *dev)
}

// power_supply_changed(bq->fc2_psy);
bq_err("Resume successfully!");
bq_dbg("Resume successfully!");

return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/oneplus/vibrator/aw8697.c
Expand Up @@ -3816,19 +3816,19 @@ static ssize_t aw8697_rtp_store(struct device *dev, struct device_attribute *att
pr_info("%s: kstrtouint fail\n", __FUNCTION__);
return rc;
}
pr_info("%s: rtp[%d]\n", __FUNCTION__,val);
pr_debug("%s: rtp[%d]\n", __FUNCTION__,val);

/*OP add for juge rtp on begin*/
rtp_is_going_on = aw8697_haptic_juge_RTP_is_going_on(aw8697);
if (rtp_is_going_on && (val == AUDIO_READY_STATUS))
{
pr_info("%s: seem audio status rtp[%d]\n", __FUNCTION__,val);
pr_debug("%s: seem audio status rtp[%d]\n", __FUNCTION__,val);
return count;
}
/*OP add for juge rtp on end*/

if (!aw8697->haptic_ready && (val == AUDIO_READY_STATUS)) {
pr_info("%s: invalid audio ready\n", __FUNCTION__);
pr_debug("%s: invalid audio ready\n", __FUNCTION__);
return count;
}

Expand Down

0 comments on commit e1f987f

Please sign in to comment.