From 97dc436c008df902b927ad952dddd102d969f0a1 Mon Sep 17 00:00:00 2001 From: Wen Xie Date: Tue, 12 Feb 2019 16:44:27 +0800 Subject: [PATCH] chub: Report chub issue to dropbox Report chub issue to dropbox, please note that when bug2go receive it, dump files may not exist for dumpping action is executed by sensors hal. Change-Id: I3597eb51ba1b86789a2e4da2c17d34115032859c Signed-off-by: Wen Xie Reviewed-on: https://gerrit.mot.com/1307564 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Yuchang Guo Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/staging/nanohub/chub_dbg.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/nanohub/chub_dbg.c b/drivers/staging/nanohub/chub_dbg.c index 563868958aa1..8be4f10ed3c4 100644 --- a/drivers/staging/nanohub/chub_dbg.c +++ b/drivers/staging/nanohub/chub_dbg.c @@ -20,6 +20,7 @@ #ifdef CONFIG_CHRE_SENSORHUB_HAL #include "main.h" #endif +#include "linux/dropbox.h" #define NUM_OF_GPR (17) #define GPR_PC_INDEX (16) @@ -155,6 +156,14 @@ static void chub_dbg_dump_status(struct contexthub_ipc_info *ipc) log_flush(ipc->fw_log); } +static void dropbox_report_event(struct contexthub_ipc_info *ipc, enum chub_err_type err) +{ + char dropbox_msg[256]; + + dev_info(ipc->dev, "%s: reporting dropbox\n", __func__); + snprintf(dropbox_msg, sizeof(dropbox_msg), "reason: %d", err); + dropbox_queue_event_text("chub_issue", dropbox_msg, strlen(dropbox_msg)); +} void chub_dbg_dump_hw(struct contexthub_ipc_info *ipc, enum chub_err_type reason) { @@ -167,6 +176,8 @@ void chub_dbg_dump_hw(struct contexthub_ipc_info *ipc, enum chub_err_type reason nanohub_add_dump_request(ipc->data); #endif + dropbox_report_event(ipc, reason); + #ifdef SUPPORT_DUMP_ON_DRIVER /* dosen't support on android-p */ if (p_dbg_dump) { -- 2.20.1