aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2017-02-27 14:18:22 +0000
committerDaniel Thompson <daniel.thompson@linaro.org>2017-02-27 14:18:22 +0000
commitc0750e21d31b8041341d69447daa09585916bb1b (patch)
treeebc60e0a4cfe320a6ac43729ed529256c10ea55a
parent605f4b6b33ff6e5e0824f491bac5f934b80fbebb (diff)
power: htc: Silence battery related log spam
When it was easy to do so, the messages have been converted to printk(KERN_DEBUG ...) to they should still be "always on" but at least they won't spam the console when doing a regular boot. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rw-r--r--drivers/power/pmic-voter.c2
-rw-r--r--drivers/power/qpnp-fg.c4
-rw-r--r--drivers/power/qpnp-smbcharger.c12
-rw-r--r--include/linux/power/htc_battery.h4
4 files changed, 11 insertions, 11 deletions
diff --git a/drivers/power/pmic-voter.c b/drivers/power/pmic-voter.c
index 4ee97a66aec5..a366ced71d38 100644
--- a/drivers/power/pmic-voter.c
+++ b/drivers/power/pmic-voter.c
@@ -163,7 +163,7 @@ int vote(struct votable *votable, int client_id, bool state, int val)
votable->votes[client_id].state = state;
votable->votes[client_id].value = val;
- pr_info("%s: %d voting for %d - %s\n",
+ printk(KERN_DEBUG "%s: %d voting for %d - %s\n",
votable->name,
client_id, val, state ? "on" : "off");
switch (votable->type) {
diff --git a/drivers/power/qpnp-fg.c b/drivers/power/qpnp-fg.c
index 2f4aea57472c..254de28ffbae 100644
--- a/drivers/power/qpnp-fg.c
+++ b/drivers/power/qpnp-fg.c
@@ -6557,7 +6557,7 @@ done:
pr_info("Battery SOC: %d, V: %duV\n", get_prop_capacity(chip),
fg_data[FG_DATA_VOLTAGE].value);
complete_all(&chip->fg_reset_done);
-#ifdef CONFIG_HTC_BATT
+#ifdef CONFIG_HTC_BATT_DEBUG
if (g_fg_flag_enable_batt_debug_log)
fg_debug_mask = 0xFF;
else
@@ -6565,7 +6565,7 @@ done:
/* Put here because battery capacity ready when profile loaded done.
here finish after fg_probe done. */
htc_battery_probe_process(GAUGE_PROBE_DONE);
-#endif /* CONFIG_HTC_BATT */
+#endif /* CONFIG_HTC_BATT_DEBUG */
return rc;
no_profile:
diff --git a/drivers/power/qpnp-smbcharger.c b/drivers/power/qpnp-smbcharger.c
index 8053bfc1c076..b2c356754d75 100644
--- a/drivers/power/qpnp-smbcharger.c
+++ b/drivers/power/qpnp-smbcharger.c
@@ -562,7 +562,7 @@ module_param_named(
#define pr_smb(reason, fmt, ...) \
do { \
if (smbchg_debug_mask & (reason)) \
- pr_info(fmt, ##__VA_ARGS__); \
+ printk(KERN_DEBUG fmt, ##__VA_ARGS__); \
else \
pr_debug(fmt, ##__VA_ARGS__); \
} while (0)
@@ -570,7 +570,7 @@ module_param_named(
#define pr_smb_rt(reason, fmt, ...) \
do { \
if (smbchg_debug_mask & (reason)) \
- pr_info_ratelimited(fmt, ##__VA_ARGS__); \
+ printk_ratelimited(KERN_DEBUG fmt, ##__VA_ARGS__); \
else \
pr_debug_ratelimited(fmt, ##__VA_ARGS__); \
} while (0)
@@ -9872,7 +9872,7 @@ void smbchg_dump_reg(void)
smbchg_read(the_chip, misc_cfg, the_chip->misc_base + 0xF0, 8);
smbchg_read(the_chip, (misc_cfg + 8), the_chip->misc_base + 0xF8, 8);
- printk(KERN_INFO "[BATT][SMBCHG] CHG_STS[0B:0F]=[%02x,%02x,%02x,%02x,%02x],"
+ printk(KERN_DEBUG "[BATT][SMBCHG] CHG_STS[0B:0F]=[%02x,%02x,%02x,%02x,%02x],"
"CHG_CFG[F0:F4]=[%02x,%02x,%02x,%02x,%02x],"
"CHG_CFG[F5:F9]=[%02x,%02x,%02x,%02x,%02x],"
"CHG_CFG[FA:FF]=[%02x,%02x,%02x,%02x,%02x,%02x],"
@@ -9888,7 +9888,7 @@ void smbchg_dump_reg(void)
batif_cfg[0], batif_cfg[1], batif_cfg[2], batif_cfg[3], batif_cfg[4], batif_cfg[5],
batif_cfg[6], batif_cfg[7], batif_cfg[8], batif_cfg[9], batif_cfg[10], batif_cfg[11]);
- printk(KERN_INFO "[BATT][SMBCHG] USB_STS[07:0B]=[%02x,%02x,%02x,%02x,%02x],"
+ printk(KERN_DEBUG "[BATT][SMBCHG] USB_STS[07:0B]=[%02x,%02x,%02x,%02x,%02x],"
"USB_STS[0C:0F]=[%02x,%02x,%02x,%02x],"
"USB_CFG[F0:F5]=[%02x,%02x,%02x,%02x,%02x,%02x],"
"MISC_CFG[F0:F4]=[%02x,%02x,%02x,%02x,%02x],"
@@ -9977,7 +9977,7 @@ int charger_dump_all(void)
wake_reason = the_chip->wake_reasons;
smb_current = (pmi8996_get_smb_out_isen() * 2) / 1000;
- printk(KERN_INFO "[BATT][SMBCHG] "
+ printk(KERN_DEBUG "[BATT][SMBCHG] "
"0x1010=%02x,0x1210=%02x,0x1242=%02x,0x1310=%02x,0x1340=%02x,0x1608=%02x,0x1610=%02x,"
"cc=%duAh,warm_temp=%d,cool_temp=%d,pmic=rev%d.%d,sink_current=%d,pd_chgr=%d,"
"wake_reason=%d,smb_curr=%dmA,batfet_wa=%d\n",
@@ -10492,7 +10492,7 @@ static int smbchg_probe(struct spmi_device *spmi)
smbchg_debug_mask = 0xFF;
else
smbchg_debug_mask = 0x06;
- printk("smbchg_debug_mask=0x%X\n",smbchg_debug_mask);
+ pr_smb(PR_STATUS, "smbchg_debug_mask=0x%X\n",smbchg_debug_mask);
#endif /* CONFIG_HTC_BATT */
rerun_hvdcp_det_if_necessary(chip);
diff --git a/include/linux/power/htc_battery.h b/include/linux/power/htc_battery.h
index fb6d6cdc063e..cc2b3031fa3f 100644
--- a/include/linux/power/htc_battery.h
+++ b/include/linux/power/htc_battery.h
@@ -19,7 +19,7 @@
#include <linux/qpnp/qpnp-adc.h>
#define BATT_LOG(x...) do { \
-printk(KERN_INFO "[BATT] " x); \
+printk(KERN_DEBUG "[BATT] " x); \
} while (0)
#define BATT_ERR(x...) do { \
@@ -38,7 +38,7 @@ struct timespec ts; \
struct rtc_time tm; \
getnstimeofday(&ts); \
rtc_time_to_tm(ts.tv_sec, &tm); \
-printk(KERN_ERR "[BATT] " x); \
+printk(KERN_DEBUG "[BATT] " x); \
printk(" at %lld (%d-%02d-%02d %02d:%02d:%02d.%09lu UTC)\n", \
ktime_to_ns(ktime_get()), tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, \
tm.tm_hour, tm.tm_min, tm.tm_sec, ts.tv_nsec); \