Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c Change aprint_verbose on voltage change to aprin...
details: https://anonhg.NetBSD.org/src/rev/3f92b1c86be3
branches: trunk
changeset: 356727:3f92b1c86be3
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Oct 09 14:52:43 2017 +0000
description:
Change aprint_verbose on voltage change to aprint_debug to prevent dmesg
spam when running estd. While here, remove ": " prefix on aprint_*_dev
format strings.
diffstat:
sys/dev/i2c/axp20x.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (80 lines):
diff -r 681f72ba0f9a -r 3f92b1c86be3 sys/dev/i2c/axp20x.c
--- a/sys/dev/i2c/axp20x.c Mon Oct 09 14:28:01 2017 +0000
+++ b/sys/dev/i2c/axp20x.c Mon Oct 09 14:52:43 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: axp20x.c,v 1.8 2017/10/07 18:22:06 jmcneill Exp $ */
+/* $NetBSD: axp20x.c,v 1.9 2017/10/09 14:52:43 jmcneill Exp $ */
/*-
* Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_fdt.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.8 2017/10/07 18:22:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.9 2017/10/09 14:52:43 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -377,15 +377,15 @@
sysmon_envsys_register(sc->sc_sme);
if (axp20x_read(sc, AXP_DCDC2, &value, 1, I2C_F_POLL) == 0) {
- aprint_verbose_dev(sc->sc_dev, ": DCDC2 %dmV\n",
+ aprint_verbose_dev(sc->sc_dev, "DCDC2 %dmV\n",
(int)(700 + (value & AXP_DCDC2_VOLT_MASK) * 25));
}
if (axp20x_read(sc, AXP_DCDC3, &value, 1, I2C_F_POLL) == 0) {
- aprint_verbose_dev(sc->sc_dev, ": DCDC3 %dmV\n",
+ aprint_verbose_dev(sc->sc_dev, "DCDC3 %dmV\n",
(int)(700 + (value & AXP_DCDC3_VOLT_MASK) * 25));
}
if (axp20x_read(sc, AXP_LDO2_4, &value, 1, I2C_F_POLL) == 0) {
- aprint_verbose_dev(sc->sc_dev, ": LDO2 %dmV, LDO4 %dmV\n",
+ aprint_verbose_dev(sc->sc_dev, "LDO2 %dmV, LDO4 %dmV\n",
(int)(1800 +
((value & AXP_LDO2_VOLT_MASK) >> AXP_LDO2_VOLT_SHIFT) * 100
),
@@ -393,9 +393,9 @@
}
if (axp20x_read(sc, AXP_LDO3, &value, 1, I2C_F_POLL) == 0) {
if (value & AXP_LDO3_TRACK) {
- aprint_verbose_dev(sc->sc_dev, ": LDO3: tracking\n");
+ aprint_verbose_dev(sc->sc_dev, "LDO3: tracking\n");
} else {
- aprint_verbose_dev(sc->sc_dev, ": LDO3 %dmV\n",
+ aprint_verbose_dev(sc->sc_dev, "LDO3 %dmV\n",
(int)(700 + (value & AXP_LDO3_VOLT_MASK) * 25));
}
}
@@ -552,7 +552,7 @@
}
return;
default:
- aprint_error_dev(sc->sc_dev, ": invalid sensor %d\n",
+ aprint_error_dev(sc->sc_dev, "invalid sensor %d\n",
edata->sensor);
}
}
@@ -604,8 +604,8 @@
return ret;
if (axp20x_read(sc, AXP_DCDC2, ®, 1, poll ? I2C_F_POLL : 0)
== 0) {
- aprint_verbose_dev(sc->sc_dev,
- ": DCDC2 changed to %dmV\n",
+ aprint_debug_dev(sc->sc_dev,
+ "DCDC2 changed to %dmV\n",
(int)(700 + (reg & AXP_DCDC2_VOLT_MASK) * 25));
}
return 0;
@@ -621,8 +621,8 @@
return ret;
if (axp20x_read(sc, AXP_DCDC3, ®, 1, poll ? I2C_F_POLL : 0)
== 0) {
- aprint_verbose_dev(sc->sc_dev,
- ": DCDC3 changed to %dmV\n",
+ aprint_debug_dev(sc->sc_dev,
+ "DCDC3 changed to %dmV\n",
(int)(700 + (reg & AXP_DCDC3_VOLT_MASK) * 25));
}
return 0;
Home |
Main Index |
Thread Index |
Old Index