From owner-svn-src-all@freebsd.org Tue Mar 6 02:30:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FEDDF43E52; Tue, 6 Mar 2018 02:30:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BDEB7BA8B; Tue, 6 Mar 2018 02:30:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 364BE4B79; Tue, 6 Mar 2018 02:30:35 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w262UZ8F060139; Tue, 6 Mar 2018 02:30:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w262UYXe060136; Tue, 6 Mar 2018 02:30:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201803060230.w262UYXe060136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 6 Mar 2018 02:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330529 - in head/sys: dev/iicbus modules/i2c modules/i2c/ds1672 X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: dev/iicbus modules/i2c modules/i2c/ds1672 X-SVN-Commit-Revision: 330529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 02:30:35 -0000 Author: ian Date: Tue Mar 6 02:30:34 2018 New Revision: 330529 URL: https://svnweb.freebsd.org/changeset/base/330529 Log: Build the ds1672 driver as a module. Add a detach() to unregister the rtc. Added: head/sys/modules/i2c/ds1672/ head/sys/modules/i2c/ds1672/Makefile (contents, props changed) Modified: head/sys/dev/iicbus/ds1672.c head/sys/modules/i2c/Makefile Modified: head/sys/dev/iicbus/ds1672.c ============================================================================== --- head/sys/dev/iicbus/ds1672.c Tue Mar 6 02:21:41 2018 (r330528) +++ head/sys/dev/iicbus/ds1672.c Tue Mar 6 02:30:34 2018 (r330529) @@ -118,6 +118,14 @@ ds1672_init(device_t dev) } static int +ds1672_detach(device_t dev) +{ + + clock_unregister(dev); + return (0); +} + +static int ds1672_attach(device_t dev) { struct ds1672_softc *sc = device_get_softc(dev); @@ -166,6 +174,7 @@ ds1672_settime(device_t dev, struct timespec *ts) static device_method_t ds1672_methods[] = { DEVMETHOD(device_probe, ds1672_probe), DEVMETHOD(device_attach, ds1672_attach), + DEVMETHOD(device_detach, ds1672_detach), DEVMETHOD(clock_gettime, ds1672_gettime), DEVMETHOD(clock_settime, ds1672_settime), Modified: head/sys/modules/i2c/Makefile ============================================================================== --- head/sys/modules/i2c/Makefile Tue Mar 6 02:21:41 2018 (r330528) +++ head/sys/modules/i2c/Makefile Tue Mar 6 02:30:34 2018 (r330529) @@ -5,6 +5,7 @@ SUBDIR = \ cyapa \ ds1307 \ ds13rtc \ + ds1672 \ ds3231 \ icee \ if_ic \ Added: head/sys/modules/i2c/ds1672/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/i2c/ds1672/Makefile Tue Mar 6 02:30:34 2018 (r330529) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD = ds1672 +SRCS = ds1672.c + +# Generated files... +SRCS+= \ + bus_if.h \ + clock_if.h \ + device_if.h \ + iicbus_if.h \ + opt_platform.h \ + +.if !empty(OPT_FDT) +SRCS+= ofw_bus_if.h +.endif + +.include