diff mbox series

spmi: msm: disable read/write log

Message ID 20240607142229.50709-1-caleb.connolly@linaro.org
State New
Headers show
Series spmi: msm: disable read/write log | expand

Commit Message

Caleb Connolly June 7, 2024, 2:22 p.m. UTC
Most devices have buttons exposed via the PMIC, the button polling
therefore triggers a log spam if debug logging is enabled.

Someone would only ever want to log SPMI read/writes to debug very
specific issues, they can then uncomment these debug logs.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
 drivers/spmi/spmi-msm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Neil Armstrong June 7, 2024, 4:29 p.m. UTC | #1
On 07/06/2024 16:22, Caleb Connolly wrote:
> Most devices have buttons exposed via the PMIC, the button polling
> therefore triggers a log spam if debug logging is enabled.
> 
> Someone would only ever want to log SPMI read/writes to debug very
> specific issues, they can then uncomment these debug logs.

My bad sorry...

> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>   drivers/spmi/spmi-msm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
> index b0d6226041e5..58c676423f40 100644
> --- a/drivers/spmi/spmi-msm.c
> +++ b/drivers/spmi/spmi-msm.c
> @@ -118,9 +118,9 @@ static int msm_spmi_write(struct udevice *dev, int usid, int pid, int off,
>   		return -EPERM;
>   
>   	channel = priv->channel_map[usid][pid] & SPMI_CHANNEL_MASK;
>   
> -	dev_dbg(dev, "[%d:%d] %s: channel %d\n", usid, pid, __func__, channel);
> +	//dev_dbg(dev, "[%d:%d] %s: channel %d\n", usid, pid, __func__, channel);

Perhaps dev_vdbg would be better ?

>   
>   	switch (priv->arb_ver) {
>   	case V1:
>   		ch_offset = SPMI_CH_OFFSET(channel);
> @@ -185,9 +185,9 @@ static int msm_spmi_read(struct udevice *dev, int usid, int pid, int off)
>   		return -EIO;
>   
>   	channel = priv->channel_map[usid][pid] & SPMI_CHANNEL_MASK;
>   
> -	dev_dbg(dev, "[%d:%d] %s: channel %d\n", usid, pid, __func__, channel);
> +	//dev_dbg(dev, "[%d:%d] %s: channel %d\n", usid, pid, __func__, channel);
>   
>   	switch (priv->arb_ver) {
>   	case V1:
>   		ch_offset = SPMI_CH_OFFSET(channel);
diff mbox series

Patch

diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index b0d6226041e5..58c676423f40 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -118,9 +118,9 @@  static int msm_spmi_write(struct udevice *dev, int usid, int pid, int off,
 		return -EPERM;
 
 	channel = priv->channel_map[usid][pid] & SPMI_CHANNEL_MASK;
 
-	dev_dbg(dev, "[%d:%d] %s: channel %d\n", usid, pid, __func__, channel);
+	//dev_dbg(dev, "[%d:%d] %s: channel %d\n", usid, pid, __func__, channel);
 
 	switch (priv->arb_ver) {
 	case V1:
 		ch_offset = SPMI_CH_OFFSET(channel);
@@ -185,9 +185,9 @@  static int msm_spmi_read(struct udevice *dev, int usid, int pid, int off)
 		return -EIO;
 
 	channel = priv->channel_map[usid][pid] & SPMI_CHANNEL_MASK;
 
-	dev_dbg(dev, "[%d:%d] %s: channel %d\n", usid, pid, __func__, channel);
+	//dev_dbg(dev, "[%d:%d] %s: channel %d\n", usid, pid, __func__, channel);
 
 	switch (priv->arb_ver) {
 	case V1:
 		ch_offset = SPMI_CH_OFFSET(channel);