diff --git a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c index 086c12eb1a93..48ecf857a93d 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c +++ b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_notif.c @@ -342,6 +342,9 @@ static void ts_mmi_worker_func(struct work_struct *w) struct ts_mmi_dev *touch_cdev = container_of(dw, struct ts_mmi_dev, work); int ret, cmd = 0; +#if defined (CONFIG_DRM_PANEL_NOTIFICATIONS) || defined (CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS) + static DEFINE_RATELIMIT_STATE(register_panel, HZ, 1); +#endif while (kfifo_get(&touch_cdev->cmd_pipe, &cmd)) { switch (cmd) { @@ -383,7 +386,9 @@ static void ts_mmi_worker_func(struct work_struct *w) #if defined (CONFIG_DRM_PANEL_NOTIFICATIONS) || defined (CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS) ret = ts_mmi_check_drm_panel(touch_cdev, DEV_TS->of_node); if (ret < 0) { - dev_err(DEV_TS, "%s: check drm panel failed. %d\n", __func__, ret); + /* 1 error message for every 1 sec */ + if (__ratelimit(®ister_panel)) + dev_err(DEV_TS, "%s: check drm panel failed. %d\n", __func__, ret); touch_cdev->panel_status = -1; } else touch_cdev->panel_status = 0; diff --git a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_panel.c b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_panel.c index 658336d8c89e..9164b879b0b9 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_panel.c +++ b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_panel.c @@ -268,7 +268,7 @@ static int ts_mmi_check_dt(struct ts_mmi_dev *touch_cdev, struct device_node *np count = of_count_phandle_with_args(np, "panel", NULL); if (count <= 0) { - dev_err(DEV_TS, "%s: find drm_panel count(%d) fail", __func__, count); + dev_dbg(DEV_TS, "%s: find drm_panel count(%d) fail", __func__, count); return -ENODEV; } @@ -282,7 +282,7 @@ static int ts_mmi_check_dt(struct ts_mmi_dev *touch_cdev, struct device_node *np return 0; } } - dev_err(DEV_TS, "%s: No find drm_panel", __func__); + dev_dbg(DEV_TS, "%s: No find drm_panel", __func__); return -ENODEV; } @@ -337,7 +337,7 @@ int ts_mmi_check_drm_panel(struct ts_mmi_dev* touch_cdev, struct device_node *of ret = ts_mmi_check_dt(touch_cdev, of_node); if (ret) { - dev_err(DEV_TS, "%s: parse drm-panel fail\n", __func__); + dev_dbg(DEV_TS, "%s: parse drm-panel fail\n", __func__); if (!ts_mmi_check_default_tp(of_node, "qcom,mmi-touch-active")) ret = -EPROBE_DEFER; else