Message ID | 20240624124716.2610961-1-caleb.connolly@linaro.org |
---|---|
State | Accepted |
Commit | f693b79ec0d177c505fe61fffb9dedb55f593852 |
Headers | show |
Series | [v2] spmi: msm: demote to debug() | expand |
On 24/06/2024 14:46, Caleb Connolly wrote: > Most devices have buttons exposed via the PMIC, the button polling > therefore triggers a log spam if debug logging is enabled. > > Demote these to debug() so that they aren't printed unless LOG_DEBUG is > defined explicitly for this file. > > Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> > --- > Changes since v1: > - use debug() instead of just commenting out > - V1: https://lore.kernel.org/u-boot/20240607142229.50709-1-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..a35cb0ba01e4 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); > + debug("%s: [%d:%d] %s: channel %d\n", dev->name, 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); > + debug("%s: [%d:%d] %s: channel %d\n", dev->name, usid, pid, __func__, channel); > > switch (priv->arb_ver) { > case V1: > ch_offset = SPMI_CH_OFFSET(channel); Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c index b0d6226041e5..a35cb0ba01e4 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); + debug("%s: [%d:%d] %s: channel %d\n", dev->name, 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); + debug("%s: [%d:%d] %s: channel %d\n", dev->name, usid, pid, __func__, channel); switch (priv->arb_ver) { case V1: ch_offset = SPMI_CH_OFFSET(channel);
Most devices have buttons exposed via the PMIC, the button polling therefore triggers a log spam if debug logging is enabled. Demote these to debug() so that they aren't printed unless LOG_DEBUG is defined explicitly for this file. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> --- Changes since v1: - use debug() instead of just commenting out - V1: https://lore.kernel.org/u-boot/20240607142229.50709-1-caleb.connolly@linaro.org --- drivers/spmi/spmi-msm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)