From 1f7832123ed4c3e1b42465ab12bc1b68191ab82e Mon Sep 17 00:00:00 2001 From: marcost2 Date: Thu, 22 May 2025 21:38:07 -0300 Subject: [PATCH] usb: typec: mmi_tcpc: Tone down the log spam Change-Id: Id26c27be47a478d5f77294abc16008509ff4f485 --- drivers/usb/typec/mmi_tcpc/Kbuild | 2 +- drivers/usb/typec/mmi_tcpc/inc/tcpci_core.h | 16 ++++++++-------- drivers/usb/typec/mmi_tcpc/pd_dpm_core.c | 14 +++++++------- drivers/usb/typec/mmi_tcpc/pd_process_evt_vdm.c | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/usb/typec/mmi_tcpc/Kbuild b/drivers/usb/typec/mmi_tcpc/Kbuild index a9165010cf72..54ef1e2b6a12 100644 --- a/drivers/usb/typec/mmi_tcpc/Kbuild +++ b/drivers/usb/typec/mmi_tcpc/Kbuild @@ -1,6 +1,6 @@ subdir-ccflags-y += -Wall -Werror -DCONFIG_RT_REGMAP -ccflags-y += -DCONFIG_PD_DBG_INFO +#ccflags-y += -DCONFIG_PD_DBG_INFO ifneq ($(filter m y,$(CONFIG_TCPC_CLASS)),) ccflags-y += -DCONFIG_TCPC_CLASS diff --git a/drivers/usb/typec/mmi_tcpc/inc/tcpci_core.h b/drivers/usb/typec/mmi_tcpc/inc/tcpci_core.h index 6f996eb43b17..b1d143a424f7 100644 --- a/drivers/usb/typec/mmi_tcpc/inc/tcpci_core.h +++ b/drivers/usb/typec/mmi_tcpc/inc/tcpci_core.h @@ -35,18 +35,18 @@ #endif /* The switch of log message */ -#define TYPEC_INFO_ENABLE 1 -#define TYPEC_INFO2_ENABLE 1 -#define PE_EVENT_DBG_ENABLE 1 -#define PE_STATE_INFO_ENABLE 1 -#define TCPC_INFO_ENABLE 1 +#define TYPEC_INFO_ENABLE 0 +#define TYPEC_INFO2_ENABLE 0 +#define PE_EVENT_DBG_ENABLE 0 +#define PE_STATE_INFO_ENABLE 0 +#define TCPC_INFO_ENABLE 0 #define TCPC_TIMER_DBG_EN 0 #define TCPC_TIMER_INFO_EN 0 -#define PE_INFO_ENABLE 1 +#define PE_INFO_ENABLE 0 #define TCPC_DBG_ENABLE 0 #define TCPC_DBG2_ENABLE 0 -#define DPM_INFO_ENABLE 1 -#define DPM_INFO2_ENABLE 1 +#define DPM_INFO_ENABLE 0 +#define DPM_INFO2_ENABLE 0 #define DPM_DBG_ENABLE 0 #define PD_ERR_ENABLE 1 #define PE_DBG_ENABLE 0 diff --git a/drivers/usb/typec/mmi_tcpc/pd_dpm_core.c b/drivers/usb/typec/mmi_tcpc/pd_dpm_core.c index 90440096f49f..1762d3b9b898 100644 --- a/drivers/usb/typec/mmi_tcpc/pd_dpm_core.c +++ b/drivers/usb/typec/mmi_tcpc/pd_dpm_core.c @@ -1753,7 +1753,7 @@ void pd_dpm_vcs_enable_vconn(struct pd_port *pd_port, uint8_t role) #ifdef CONFIG_USB_PD_REV30_SRC_CAP_EXT_REMOTE void pd_dpm_inform_source_cap_ext(struct pd_port *pd_port) { - struct pd_source_cap_ext *scedb; + struct pd_source_cap_ext __maybe_unused *scedb; struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc; if (dpm_check_ext_msg_event(pd_port, PD_EXT_SOURCE_CAP_EXT)) { @@ -1809,7 +1809,7 @@ int pd_dpm_send_battery_cap(struct pd_port *pd_port) #ifdef CONFIG_USB_PD_REV30_BAT_CAP_REMOTE void pd_dpm_inform_battery_cap(struct pd_port *pd_port) { - struct pd_battery_capabilities *bcdb; + struct pd_battery_capabilities __maybe_unused *bcdb; struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc; if (dpm_check_ext_msg_event(pd_port, PD_EXT_BAT_CAP)) { @@ -1857,7 +1857,7 @@ int pd_dpm_send_battery_status(struct pd_port *pd_port) #ifdef CONFIG_USB_PD_REV30_BAT_STATUS_REMOTE void pd_dpm_inform_battery_status(struct pd_port *pd_port) { - uint32_t *payload; + uint32_t __maybe_unused *payload; struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc; if (dpm_check_data_msg_event(pd_port, PD_DATA_BAT_STATUS)) { @@ -1904,7 +1904,7 @@ int pd_dpm_send_mfrs_info(struct pd_port *pd_port) #ifdef CONFIG_USB_PD_REV30_MFRS_INFO_REMOTE void pd_dpm_inform_mfrs_info(struct pd_port *pd_port) { - struct pd_manufacturer_info *midb; + struct pd_manufacturer_info __maybe_unused *midb; struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc; if (dpm_check_ext_msg_event(pd_port, PD_EXT_MFR_INFO)) { @@ -1918,7 +1918,7 @@ void pd_dpm_inform_mfrs_info(struct pd_port *pd_port) #ifdef CONFIG_USB_PD_REV30_COUNTRY_CODE_REMOTE void pd_dpm_inform_country_codes(struct pd_port *pd_port) { - struct pd_country_codes *ccdb; + struct pd_country_codes __maybe_unused *ccdb; struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc; if (dpm_check_ext_msg_event(pd_port, PD_EXT_COUNTRY_CODES)) { @@ -1950,7 +1950,7 @@ int pd_dpm_send_country_codes(struct pd_port *pd_port) #ifdef CONFIG_USB_PD_REV30_COUNTRY_INFO_REMOTE void pd_dpm_inform_country_info(struct pd_port *pd_port) { - struct pd_country_info *cidb; + struct pd_country_info __maybe_unused *cidb; struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc; if (dpm_check_ext_msg_event(pd_port, PD_EXT_COUNTRY_INFO)) { @@ -2082,7 +2082,7 @@ int pd_dpm_send_status(struct pd_port *pd_port) #ifdef CONFIG_USB_PD_REV30_PPS_SINK void pd_dpm_inform_pps_status(struct pd_port *pd_port) { - struct pd_pps_status_raw *ppssdb; + struct pd_pps_status_raw __maybe_unused *ppssdb; struct tcpc_device __maybe_unused *tcpc = pd_port->tcpc; if (dpm_check_ext_msg_event(pd_port, PD_EXT_PPS_STATUS)) { diff --git a/drivers/usb/typec/mmi_tcpc/pd_process_evt_vdm.c b/drivers/usb/typec/mmi_tcpc/pd_process_evt_vdm.c index 05b88ad2fe6d..9cf55952d5c4 100644 --- a/drivers/usb/typec/mmi_tcpc/pd_process_evt_vdm.c +++ b/drivers/usb/typec/mmi_tcpc/pd_process_evt_vdm.c @@ -546,7 +546,7 @@ static inline void print_vdm_msg( { #if (PE_EVT_INFO_VDM_DIS == 0) uint8_t cmd; - uint8_t cmd_type; + uint8_t __maybe_unused cmd_type; uint16_t svid; const char *name = NULL; uint32_t vdm_hdr = pd_port->curr_vdm_hdr;