Module Name: src Committed By: kiyohara Date: Sun Oct 10 05:17:44 UTC 2010
Modified Files: src/sys/dev/i2c: files.i2c m41st84.c Log Message: Add options STRTC_NO_USERRAM and STRTC_NO_WATCHDOG for m41t80. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/files.i2c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/m41st84.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/i2c/files.i2c diff -u src/sys/dev/i2c/files.i2c:1.28 src/sys/dev/i2c/files.i2c:1.29 --- src/sys/dev/i2c/files.i2c:1.28 Sat Oct 2 06:07:37 2010 +++ src/sys/dev/i2c/files.i2c Sun Oct 10 05:17:44 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.i2c,v 1.28 2010/10/02 06:07:37 kiyohara Exp $ +# $NetBSD: files.i2c,v 1.29 2010/10/10 05:17:44 kiyohara Exp $ defflag opt_i2cbus.h I2C_SCAN define i2cbus { } @@ -26,6 +26,8 @@ device strtc attach strtc at iic file dev/i2c/m41st84.c strtc +defflag opt_strtc.h STRTC_NO_USERRAM + STRTC_NO_WATCHDOG # MAX6900 Real Time Clock device maxrtc Index: src/sys/dev/i2c/m41st84.c diff -u src/sys/dev/i2c/m41st84.c:1.15 src/sys/dev/i2c/m41st84.c:1.16 --- src/sys/dev/i2c/m41st84.c:1.15 Sat Dec 12 14:44:10 2009 +++ src/sys/dev/i2c/m41st84.c Sun Oct 10 05:17:44 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: m41st84.c,v 1.15 2009/12/12 14:44:10 tsutsui Exp $ */ +/* $NetBSD: m41st84.c,v 1.16 2010/10/10 05:17:44 kiyohara Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,9 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.15 2009/12/12 14:44:10 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.16 2010/10/10 05:17:44 kiyohara Exp $"); + +#include "opt_strtc.h" #include <sys/param.h> #include <sys/systm.h> @@ -66,6 +68,8 @@ CFATTACH_DECL_NEW(strtc, sizeof(struct strtc_softc), strtc_match, strtc_attach, NULL, NULL); + +#ifndef STRTC_NO_USERRAM extern struct cfdriver strtc_cd; dev_type_open(strtc_open); @@ -77,6 +81,7 @@ strtc_open, strtc_close, strtc_read, strtc_write, noioctl, nostop, notty, nopoll, nommap, nokqfilter, D_OTHER }; +#endif static int strtc_clock_read(struct strtc_softc *, struct clock_ymdhms *); static int strtc_clock_write(struct strtc_softc *, struct clock_ymdhms *); @@ -115,6 +120,7 @@ todr_attach(&sc->sc_todr); } +#ifndef STRTC_NO_USERRAM /*ARGSUSED*/ int strtc_open(dev_t dev, int flag, int fmt, struct lwp *l) @@ -221,6 +227,7 @@ return (error); } +#endif /* STRTC_NO_USERRAM */ static int strtc_gettime(struct todr_chip_handle *ch, struct timeval *tv) @@ -416,6 +423,7 @@ return (1); } +#ifndef STRTC_NO_WATCHDOG void strtc_wdog_config(void *arg, uint8_t wd) { @@ -440,3 +448,4 @@ iic_release_bus(sc->sc_tag, I2C_F_POLL); } +#endif /* STRTC_NO_WATCHDOG */