Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/i2c Battery charge state is invalid unt...



details:   https://anonhg.NetBSD.org/src/rev/f6e55e7290c9
branches:  trunk
changeset: 319021:f6e55e7290c9
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun May 13 22:58:58 2018 +0000
description:
Battery charge state is invalid until we refresh the first time

diffstat:

 sys/dev/i2c/axppmic.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b3ac31b38971 -r f6e55e7290c9 sys/dev/i2c/axppmic.c
--- a/sys/dev/i2c/axppmic.c     Sun May 13 22:44:58 2018 +0000
+++ b/sys/dev/i2c/axppmic.c     Sun May 13 22:58:58 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: axppmic.c,v 1.8 2018/05/13 11:13:02 jmcneill Exp $ */
+/* $NetBSD: axppmic.c,v 1.9 2018/05/13 22:58:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014-2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.8 2018/05/13 11:13:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.9 2018/05/13 22:58:58 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -554,7 +554,7 @@
        e->private = AXP_SENSOR_BATT_CHARGE_STATE;
        e->units = ENVSYS_BATTERY_CAPACITY;
        e->flags = ENVSYS_FMONSTCHANGED;
-       e->state = ENVSYS_SVALID;
+       e->state = ENVSYS_SINVALID;
        e->value_cur = ENVSYS_BATTERY_CAPACITY_NORMAL;
        strlcpy(e->desc, "charge state", sizeof(e->desc));
        sysmon_envsys_sensor_attach(sc->sc_sme, e);



Home | Main Index | Thread Index | Old Index