Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/isa Implement user-settable rfact in itesio.
details: https://anonhg.NetBSD.org/src/rev/9f3d7cefcecb
branches: trunk
changeset: 757074:9f3d7cefcecb
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Fri Aug 13 19:28:26 2010 +0000
description:
Implement user-settable rfact in itesio.
Additionally, match on IT8721.
diffstat:
sys/dev/isa/itesio_isa.c | 10 ++++++----
sys/dev/isa/itesio_isavar.h | 3 ++-
2 files changed, 8 insertions(+), 5 deletions(-)
diffs (56 lines):
diff -r 992bd1bb8c26 -r 9f3d7cefcecb sys/dev/isa/itesio_isa.c
--- a/sys/dev/isa/itesio_isa.c Fri Aug 13 18:44:24 2010 +0000
+++ b/sys/dev/isa/itesio_isa.c Fri Aug 13 19:28:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: itesio_isa.c,v 1.20 2010/07/17 21:51:43 pgoyette Exp $ */
+/* $NetBSD: itesio_isa.c,v 1.21 2010/08/13 19:28:26 jakllsch Exp $ */
/* Derived from $OpenBSD: it.c,v 1.19 2006/04/10 00:57:54 deraadt Exp $ */
/*
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.20 2010/07/17 21:51:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.21 2010/08/13 19:28:26 jakllsch Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -140,6 +140,7 @@
case ITESIO_ID8712:
case ITESIO_ID8716:
case ITESIO_ID8718:
+ case ITESIO_ID8721:
case ITESIO_ID8726:
ia->ia_nio = 1;
ia->ia_io[0].ir_size = 2;
@@ -462,9 +463,10 @@
if (i == 5 || i == 6)
edata->value_cur -= ITESIO_EC_VREF;
/* rfact is (factor * 10^4) */
- edata->value_cur *= itesio_vrfact[i];
if (edata->rfact)
- edata->value_cur += edata->rfact;
+ edata->value_cur *= edata->rfact;
+ else
+ edata->value_cur *= itesio_vrfact[i];
/* division by 10 gets us back to uVDC */
edata->value_cur /= 10;
if (i == 5 || i == 6)
diff -r 992bd1bb8c26 -r 9f3d7cefcecb sys/dev/isa/itesio_isavar.h
--- a/sys/dev/isa/itesio_isavar.h Fri Aug 13 18:44:24 2010 +0000
+++ b/sys/dev/isa/itesio_isavar.h Fri Aug 13 19:28:26 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: itesio_isavar.h,v 1.7 2010/05/02 18:49:13 jakllsch Exp $ */
+/* $NetBSD: itesio_isavar.h,v 1.8 2010/08/13 19:28:26 jakllsch Exp $ */
/* $OpenBSD: itvar.h,v 1.2 2003/11/05 20:57:10 grange Exp $ */
/*
@@ -61,6 +61,7 @@
#define ITESIO_ID8712 0x8712
#define ITESIO_ID8716 0x8716
#define ITESIO_ID8718 0x8718
+#define ITESIO_ID8721 0x8721
#define ITESIO_ID8726 0x8726
/*
Home |
Main Index |
Thread Index |
Old Index