From: Lukas0610 Date: Fri, 28 Aug 2020 07:44:53 +0000 (+0200) Subject: drivers: disable samsung hardware debugging messages X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a4c1a6bab972de9be8b75ffb37cf76852ea77a02;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drivers: disable samsung hardware debugging messages input: sec_ts: disable debugging messages Change-Id: I7227b7c78f0e00530e71e7808046c537696e782a sensorhub: bcrm: ssp: disable debugging Change-Id: Ibd1bc81196427f08c4e68ef5aab058ef2f143df2 drivers: modem_v1: disable debugging messages Change-Id: I69f8ecaa2a4bdc479c791f6fc2a9e71ec47391ec drivers: leds-max77705-rgb: disable debugging messages Change-Id: Ida77330ebeb9dc93ea5b5ca2f423bbe52eca5299 --- diff --git a/drivers/input/touchscreen/sec_ts/sec_ts.c b/drivers/input/touchscreen/sec_ts/sec_ts.c index f7f2c8f58883..f7b27625526a 100644 --- a/drivers/input/touchscreen/sec_ts/sec_ts.c +++ b/drivers/input/touchscreen/sec_ts/sec_ts.c @@ -10,6 +10,8 @@ * published by the Free Software Foundation. */ +#define SEC_TS_DEBUG 0 + struct sec_ts_data *tsp_info; #include "sec_ts.h" @@ -1229,6 +1231,7 @@ static void sec_ts_read_event(struct sec_ts_data *ts) ts->check_multi = 0; } +#if SEC_TS_DEBUG #if !defined(CONFIG_SAMSUNG_PRODUCT_SHIP) input_info(true, &ts->client->dev, "%s[R] tID:%d mc:%d tc:%d lx:%d ly:%d f:%d v:%02X%02X cal:%02X(%02X) id(%d,%d) p:%d noise:%x lp:(%x/%d) P%02XT%04X F%02X%02X D%05X\n", @@ -1258,6 +1261,7 @@ static void sec_ts_read_event(struct sec_ts_data *ts) ts->cal_count, ts->tune_fix_ver, ts->pressure_cal_base, ts->pressure_cal_delta, ts->defect_probability); +#endif #endif ts->coord[t_id].action = SEC_TS_COORDINATE_ACTION_NONE; ts->coord[t_id].mcount = 0; @@ -1398,21 +1402,25 @@ static void sec_ts_read_event(struct sec_ts_data *ts) if (sponge[1] & SEC_TS_MODE_SPONGE_AOD) { ts->scrub_id = SPONGE_EVENT_TYPE_AOD_DOUBLETAB; +#if SEC_TS_DEBUG #ifdef CONFIG_SAMSUNG_PRODUCT_SHIP input_info(true, &ts->client->dev, "%s: aod: %d\n", __func__, ts->scrub_id); #else input_info(true, &ts->client->dev, "%s: aod: %d, %d, %d\n", __func__, ts->scrub_id, ts->scrub_x, ts->scrub_y); +#endif #endif } else if (sponge[1] & SEC_TS_MODE_SPONGE_SINGLE_TAP) { ts->scrub_id = SPONGE_EVENT_TYPE_SINGLE_TAP; +#if SEC_TS_DEBUG #ifdef CONFIG_SAMSUNG_PRODUCT_SHIP input_info(true, &ts->client->dev, "%s: singletap: %d\n", __func__, ts->scrub_id); #else input_info(true, &ts->client->dev, "%s: singletap: %d, %d, %d\n", __func__, ts->scrub_id, ts->scrub_x, ts->scrub_y); +#endif #endif } ts->all_aod_tap_count++; diff --git a/drivers/leds/leds-max77865-rgb.c b/drivers/leds/leds-max77865-rgb.c index 58eeaea62326..387797b355d4 100755 --- a/drivers/leds/leds-max77865-rgb.c +++ b/drivers/leds/leds-max77865-rgb.c @@ -28,6 +28,14 @@ #include #define SEC_LED_SPECIFIC +//#define MAX77865_DEBUG + +#ifdef MAX77865_DEBUG + #define max77865_dbg(format, ...) \ + info(format, ##__VA_ARGS__) +#else + #define max77865_dbg(format, ...) +#endif // MAX77765_DEBUG /* Registers */ /*defined max77865-private.h*//* @@ -147,7 +155,7 @@ static int max77865_rgb_number(struct led_classdev *led_cdev, for (i = 0; i < 4; i++) { if (led_cdev == &max77865_rgb->led[i]) { - pr_info("leds-max77865-rgb: %s, %d\n", __func__, i); + max77865_dbg("leds-max77865-rgb: %s, %d\n", __func__, i); return i; } } @@ -202,7 +210,7 @@ static void max77865_rgb_set_state(struct led_classdev *led_cdev, int n; int ret; - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); ret = max77865_rgb_number(led_cdev, &max77865_rgb); @@ -250,7 +258,7 @@ static void max77865_rgb_set_state(struct led_classdev *led_cdev, } max77865_rgb_set(led_cdev, brightness); - pr_info("leds-max77865-rgb: %s, led_num = %d, brightness = %d\n", __func__, ret, brightness); + max77865_dbg("leds-max77865-rgb: %s, led_num = %d, brightness = %d\n", __func__, ret, brightness); ret = max77865_update_reg(max77865_rgb->i2c, MAX77865_RGBLED_REG_LEDEN, led_state << (2*n), 0x3 << 2*n); @@ -269,7 +277,7 @@ static unsigned int max77865_rgb_get(struct led_classdev *led_cdev) int ret; u8 value; - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); ret = max77865_rgb_number(led_cdev, &max77865_rgb); if (IS_ERR_VALUE(ret)) { @@ -308,7 +316,7 @@ static int max77865_rgb_ramp(struct device *dev, int ramp_up, int ramp_down) int value; int ret; - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); if (ramp_up <= 800) { ramp_up /= 100; @@ -342,7 +350,7 @@ static int max77865_rgb_blink(struct device *dev, int value; int ret = 0; - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); value = (LEDBLNK_ON(delay_on) << 4) | LEDBLNK_OFF(delay_off); ret = max77865_write_reg(max77865_rgb->i2c, @@ -375,7 +383,7 @@ static struct max77865_rgb_platform_data char normal_po_cur[29] = "normal_powermode_current"; char low_po_cur[26] = "low_powermode_current"; - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (unlikely(pdata == NULL)) @@ -392,7 +400,7 @@ static struct max77865_rgb_platform_data ret = of_property_read_string_index(np, "rgb-name", i, (const char **)&pdata->name[i]); - pr_info("leds-max77865-rgb: %s, %s\n", __func__,pdata->name[i]); + max77865_dbg("leds-max77865-rgb: %s, %s\n", __func__,pdata->name[i]); if (IS_ERR_VALUE(ret)) { devm_kfree(dev, pdata); @@ -403,12 +411,12 @@ static struct max77865_rgb_platform_data /* get led_device_type value in dt */ ret = of_property_read_u32(np, "led_device_type", &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing led_device_type in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing led_device_type in dt\n", __func__); } else { led_device_type = (u8)temp; } - pr_info("leds-max77865-rgb: %s, led_device_type = %x\n", __func__, led_device_type); + max77865_dbg("leds-max77865-rgb: %s, led_device_type = %x\n", __func__, led_device_type); /* DREAM1 and DREAM2 */ if(led_device_type == 0) { @@ -454,82 +462,82 @@ static struct max77865_rgb_platform_data /* get normal_powermode_current value in dt */ ret = of_property_read_u32(np, normal_po_cur, &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing normal_powermode_current in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing normal_powermode_current in dt\n", __func__); } else { normal_powermode_current = (u8)temp; } - pr_info("leds-max77865-rgb: %s, normal_powermode_current = %x\n", __func__, normal_powermode_current); + max77865_dbg("leds-max77865-rgb: %s, normal_powermode_current = %x\n", __func__, normal_powermode_current); /* get low_powermode_current value in dt */ ret = of_property_read_u32(np, low_po_cur, &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing low_powermode_current in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing low_powermode_current in dt\n", __func__); } else low_powermode_current = (u8)temp; - pr_info("leds-max77865-rgb: %s, low_powermode_current = %x\n", __func__, low_powermode_current); + max77865_dbg("leds-max77865-rgb: %s, low_powermode_current = %x\n", __func__, low_powermode_current); /* get led red brightness ratio */ ret = of_property_read_u32(np, br_ratio_r, &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing brightness_ratio_r in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing brightness_ratio_r in dt\n", __func__); } else { brightness_ratio_r = (int)temp; } - pr_info("leds-max77865-rgb: %s, brightness_ratio_r = %x\n", __func__, brightness_ratio_r); + max77865_dbg("leds-max77865-rgb: %s, brightness_ratio_r = %x\n", __func__, brightness_ratio_r); /* get led green brightness ratio */ ret = of_property_read_u32(np, br_ratio_g, &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing brightness_ratio_g in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing brightness_ratio_g in dt\n", __func__); } else { brightness_ratio_g = (int)temp; } - pr_info("leds-max77865-rgb: %s, brightness_ratio_g = %x\n", __func__, brightness_ratio_g); + max77865_dbg("leds-max77865-rgb: %s, brightness_ratio_g = %x\n", __func__, brightness_ratio_g); /* get led blue brightness ratio */ ret = of_property_read_u32(np, br_ratio_b, &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing brightness_ratio_b in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing brightness_ratio_b in dt\n", __func__); } else { brightness_ratio_b = (int)temp; } - pr_info("leds-max77865-rgb: %s, brightness_ratio_b = %x\n", __func__, brightness_ratio_b); + max77865_dbg("leds-max77865-rgb: %s, brightness_ratio_b = %x\n", __func__, brightness_ratio_b); /* get led red brightness ratio lowpower */ ret = of_property_read_u32(np, br_ratio_r_low, &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing brightness_ratio_r_low in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing brightness_ratio_r_low in dt\n", __func__); } else { brightness_ratio_r_low = (int)temp; } - pr_info("leds-max77865-rgb: %s, brightness_ratio_r_low = %x\n", __func__, brightness_ratio_r_low); + max77865_dbg("leds-max77865-rgb: %s, brightness_ratio_r_low = %x\n", __func__, brightness_ratio_r_low); /* get led green brightness ratio lowpower*/ ret = of_property_read_u32(np, br_ratio_g_low, &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing brightness_ratio_g_low in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing brightness_ratio_g_low in dt\n", __func__); } else { brightness_ratio_g_low = (int)temp; } - pr_info("leds-max77865-rgb: %s, brightness_ratio_g_low = %x\n", __func__, brightness_ratio_g_low); + max77865_dbg("leds-max77865-rgb: %s, brightness_ratio_g_low = %x\n", __func__, brightness_ratio_g_low); /* get led blue brightness ratio lowpower */ ret = of_property_read_u32(np, br_ratio_b_low, &temp); if (IS_ERR_VALUE(ret)) { - pr_info("leds-max77865-rgb: %s, can't parsing brightness_ratio_b_low in dt\n", __func__); + max77865_dbg("leds-max77865-rgb: %s, can't parsing brightness_ratio_b_low in dt\n", __func__); } else { brightness_ratio_b_low = (int)temp; } - pr_info("leds-max77865-rgb: %s, brightness_ratio_b_low = %x\n", __func__, brightness_ratio_b_low); + max77865_dbg("leds-max77865-rgb: %s, brightness_ratio_b_low = %x\n", __func__, brightness_ratio_b_low); return pdata; } @@ -559,7 +567,7 @@ static ssize_t store_max77865_rgb_lowpower(struct device *dev, led_lowpower_mode = led_lowpower; - pr_info("leds-max77865-rgb: led_lowpower mode set to %i\n", led_lowpower); + max77865_dbg("leds-max77865-rgb: led_lowpower mode set to %i\n", led_lowpower); return count; } @@ -569,7 +577,7 @@ static ssize_t store_max77865_rgb_brightness(struct device *dev, { int ret; u8 brightness; - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); ret = kstrtou8(buf, 0, &brightness); if (ret != 0) { @@ -599,7 +607,7 @@ static ssize_t store_max77865_rgb_pattern(struct device *dev, dev_err(dev, "fail to get led_pattern mode.\n"); return count; } - pr_info("leds-max77865-rgb: %s pattern=%d lowpower=%i\n", __func__, mode, led_lowpower_mode); + max77865_dbg("leds-max77865-rgb: %s pattern=%d lowpower=%i\n", __func__, mode, led_lowpower_mode); /* Set all LEDs Off */ max77865_rgb_reset(dev); @@ -743,7 +751,7 @@ static ssize_t store_max77865_rgb_blink(struct device *dev, /*Set LED blink mode*/ max77865_rgb_blink(dev, delay_on_time, delay_off_time); - pr_info("leds-max77865-rgb: %s, delay_on_time: %d, delay_off_time: %d, color: 0x%x, lowpower: %i\n", + max77865_dbg("leds-max77865-rgb: %s, delay_on_time: %d, delay_off_time: %d, color: 0x%x, lowpower: %i\n", __func__, delay_on_time, delay_off_time, led_brightness, led_lowpower_mode); return count; @@ -768,7 +776,7 @@ static ssize_t store_led_r(struct device *dev, max77865_rgb_set_state(&max77865_rgb->led[RED], LED_OFF, LED_DISABLE); } out: - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); return count; } static ssize_t store_led_g(struct device *dev, @@ -790,7 +798,7 @@ static ssize_t store_led_g(struct device *dev, max77865_rgb_set_state(&max77865_rgb->led[GREEN], LED_OFF, LED_DISABLE); } out: - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); return count; } static ssize_t store_led_b(struct device *dev, @@ -812,7 +820,7 @@ static ssize_t store_led_b(struct device *dev, max77865_rgb_set_state(&max77865_rgb->led[BLUE], LED_OFF, LED_DISABLE); } out: - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); return count; } @@ -897,7 +905,7 @@ static ssize_t led_blink_store(struct device *dev, max77865_rgb->delay_off_times_ms); max77865_rgb_set_state(&max77865_rgb_num->led[n], led_dynamic_current, LED_BLINK); - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); return count; } @@ -955,7 +963,7 @@ static int max77865_rgb_probe(struct platform_device *pdev) char name[40] = {0,}, *p; int i, ret; - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); octa_color = get_lcd_info("window_color"); #ifdef CONFIG_OF @@ -968,12 +976,12 @@ static int max77865_rgb_probe(struct platform_device *pdev) pdata = dev_get_platdata(dev); #endif - pr_info("leds-max77865-rgb: %s : octa_color=%x led_device_type=%x \n", + max77865_dbg("leds-max77865-rgb: %s : octa_color=%x led_device_type=%x \n", __func__, octa_color, led_device_type); max77865_rgb = devm_kzalloc(dev, sizeof(struct max77865_rgb), GFP_KERNEL); if (unlikely(!max77865_rgb)) return -ENOMEM; - pr_info("leds-max77865-rgb: %s 1 \n", __func__); + max77865_dbg("leds-max77865-rgb: %s 1 \n", __func__); max77865_rgb->i2c = max77865_dev->i2c; @@ -1026,7 +1034,7 @@ static int max77865_rgb_probe(struct platform_device *pdev) } #endif #endif - pr_info("leds-max77865-rgb: %s done\n", __func__); + max77865_dbg("leds-max77865-rgb: %s done\n", __func__); return 0; @@ -1088,7 +1096,7 @@ static struct platform_driver max77865_fled_driver = { static int __init max77865_rgb_init(void) { - pr_info("leds-max77865-rgb: %s\n", __func__); + max77865_dbg("leds-max77865-rgb: %s\n", __func__); return platform_driver_register(&max77865_fled_driver); } module_init(max77865_rgb_init); diff --git a/drivers/misc/modem_v1/modem_prj.h b/drivers/misc/modem_v1/modem_prj.h index 3c8506bcdc92..df747b13d15a 100644 --- a/drivers/misc/modem_v1/modem_prj.h +++ b/drivers/misc/modem_v1/modem_prj.h @@ -37,36 +37,36 @@ #include "include/circ_queue.h" #include "include/sipc5.h" -#define DEBUG_MODEM_IF +//#define DEBUG_MODEM_IF #ifdef DEBUG_MODEM_IF -#if 1 -#define DEBUG_MODEM_IF_LINK_TX -#endif -#if 1 -#define DEBUG_MODEM_IF_LINK_RX -#endif -#if defined(DEBUG_MODEM_IF_LINK_TX) && defined(DEBUG_MODEM_IF_LINK_RX) -#define DEBUG_MODEM_IF_LINK_HEADER -#endif - -#if 0 -#define DEBUG_MODEM_IF_IODEV_TX -#endif -#if 0 -#define DEBUG_MODEM_IF_IODEV_RX -#endif - -#if 0 -#define DEBUG_MODEM_IF_FLOW_CTRL -#endif - -#if 0 -#define DEBUG_MODEM_IF_PS_DATA -#endif -#if 0 -#define DEBUG_MODEM_IF_IP_DATA -#endif -#endif + #if 1 + #define DEBUG_MODEM_IF_LINK_TX + #endif + #if 1 + #define DEBUG_MODEM_IF_LINK_RX + #endif + #if defined(DEBUG_MODEM_IF_LINK_TX) && defined(DEBUG_MODEM_IF_LINK_RX) + #define DEBUG_MODEM_IF_LINK_HEADER + #endif + + #if 0 + #define DEBUG_MODEM_IF_IODEV_TX + #endif + #if 0 + #define DEBUG_MODEM_IF_IODEV_RX + #endif + + #if 0 + #define DEBUG_MODEM_IF_FLOW_CTRL + #endif + + #if 0 + #define DEBUG_MODEM_IF_PS_DATA + #endif + #if 0 + #define DEBUG_MODEM_IF_IP_DATA + #endif +#endif // DEBUG_MODEM_IF /* IOCTL commands diff --git a/drivers/sensorhub/brcm/ssp.h b/drivers/sensorhub/brcm/ssp.h index c0049a8cca89..2a6fe2b51df7 100644 --- a/drivers/sensorhub/brcm/ssp.h +++ b/drivers/sensorhub/brcm/ssp.h @@ -66,7 +66,7 @@ #undef CONFIG_HAS_EARLYSUSPEND #endif -#define SSP_DBG 1 +#define SSP_DBG 0 #define SUCCESS 1 #define FAIL 0 @@ -74,16 +74,19 @@ #define FACTORY_DATA_MAX 99 +/* ssp mcu device ID */ +#define DEVICE_ID 0x55 + #if SSP_DBG #define SSP_FUNC_DBG 1 #define SSP_DATA_DBG 0 -/* ssp mcu device ID */ -#define DEVICE_ID 0x55 - #define ssp_dbg(format, ...) \ pr_info(format, ##__VA_ARGS__) #else +#define SSP_FUNC_DBG 0 +#define SSP_DATA_DBG 0 + #define ssp_dbg(format, ...) #endif diff --git a/drivers/sensorhub/brcm/ssp_data.c b/drivers/sensorhub/brcm/ssp_data.c index c48ff92c9d21..b2be48f28026 100644 --- a/drivers/sensorhub/brcm/ssp_data.c +++ b/drivers/sensorhub/brcm/ssp_data.c @@ -400,7 +400,9 @@ bool ssp_check_buffer(struct ssp_data *data) void ssp_batch_resume_check(struct ssp_data *data) { +#if SSP_DBG u64 acc_offset = 0, uncal_mag_offset = 0, press_offset = 0, grv_offset = 0, proxi_offset = 0; +#endif //if suspend -> wakeup case. calc. FIFO last timestamp if (data->bIsResumed) { u8 sensor_type = 0; diff --git a/drivers/sensorhub/brcm/ssp_debug.c b/drivers/sensorhub/brcm/ssp_debug.c index 22c908cdddc7..6f33b6ea311c 100644 --- a/drivers/sensorhub/brcm/ssp_debug.c +++ b/drivers/sensorhub/brcm/ssp_debug.c @@ -222,8 +222,9 @@ int print_mcu_debug(char *pchRcvDataFrame, int *pDataIdx, int iRcvDataFrameLength) { int iLength = 0; +#if SSP_DBG int cur = *pDataIdx; - +#endif memcpy(&iLength, pchRcvDataFrame + *pDataIdx, sizeof(u16)); *pDataIdx += sizeof(u16);