Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c rkpmic: correct delay
details: https://anonhg.NetBSD.org/src/rev/78376c53bb50
branches: trunk
changeset: 1003508:78376c53bb50
user: tnn <tnn%NetBSD.org@localhost>
date: Wed Sep 18 15:12:37 2019 +0000
description:
rkpmic: correct delay
diffstat:
sys/dev/i2c/rkpmic.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ffd8d6d1f951 -r 78376c53bb50 sys/dev/i2c/rkpmic.c
--- a/sys/dev/i2c/rkpmic.c Wed Sep 18 15:07:08 2019 +0000
+++ b/sys/dev/i2c/rkpmic.c Wed Sep 18 15:12:37 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rkpmic.c,v 1.4 2019/09/18 14:07:38 tnn Exp $ */
+/* $NetBSD: rkpmic.c,v 1.5 2019/09/18 15:12:37 tnn Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rkpmic.c,v 1.4 2019/09/18 14:07:38 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rkpmic.c,v 1.5 2019/09/18 15:12:37 tnn Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -281,7 +281,7 @@
val = I2C_READ(sc, RTC_CTRL_REG);
I2C_WRITE(sc, RTC_CTRL_REG, val | RTC_CTRL_GET_TIME | RTC_CTRL_READSEL);
- delay(1); /* need to wait 1/32768 seconds for shadow regs to latch */
+ delay(1000000 / 32768); /* wait one cycle for shadow regs to latch */
I2C_WRITE(sc, RTC_CTRL_REG, val | RTC_CTRL_READSEL);
dt->dt_sec = bcdtobin(I2C_READ(sc, SECONDS_REG));
dt->dt_min = bcdtobin(I2C_READ(sc, MINUTES_REG));
Home |
Main Index |
Thread Index |
Old Index