Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src i2c devices don't actually have a dependency on "iic" (the b...
details: https://anonhg.NetBSD.org/src/rev/23c3ae2ce695
branches: trunk
changeset: 336586:23c3ae2ce695
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Mar 07 14:16:51 2015 +0000
description:
i2c devices don't actually have a dependency on "iic" (the bus driver)
but on "i2cexec". Create an i2cexec module (i2c_exec.c) to mirror the
dependencies in files.i2c and switch device drivers to depend on "i2cexec"
module instead.
A kernel with a USB stack and no I2C controller / bus attachment would spit
out a bunch of "WARNING: module error: can't find builtin dependency `iic'"
messages at boot. This change solves that problem.
diffstat:
distrib/sets/lists/modules/md.amd64 | 4 +++-
distrib/sets/lists/modules/md.evbppc.powerpc | 6 +++++-
distrib/sets/lists/modules/md.i386 | 6 +++++-
distrib/sets/lists/modules/mi | 4 +++-
sys/dev/i2c/au8522.c | 6 +++---
sys/dev/i2c/cx24227.c | 6 +++---
sys/dev/i2c/dbcool.c | 6 +++---
sys/dev/i2c/hytp14.c | 4 ++--
sys/dev/i2c/i2c_exec.c | 22 ++++++++++++++++++++--
sys/dev/i2c/lg3303.c | 6 +++---
sys/dev/i2c/mt2131.c | 6 +++---
sys/dev/i2c/nxt2k.c | 6 +++---
sys/dev/i2c/sdtemp.c | 6 +++---
sys/dev/i2c/spdmem_i2c.c | 6 +++---
sys/dev/i2c/tvpll.c | 6 +++---
sys/dev/i2c/xc3028.c | 6 +++---
sys/dev/i2c/xc5k.c | 6 +++---
sys/dev/i2c/zl10353.c | 6 +++---
sys/modules/Makefile | 3 ++-
sys/modules/i2cexec/Makefile | 10 ++++++++++
20 files changed, 86 insertions(+), 45 deletions(-)
diffs (truncated from 517 to 300 lines):
diff -r aeb5d42572df -r 23c3ae2ce695 distrib/sets/lists/modules/md.amd64
--- a/distrib/sets/lists/modules/md.amd64 Sat Mar 07 13:54:57 2015 +0000
+++ b/distrib/sets/lists/modules/md.amd64 Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.50 2014/12/11 22:14:13 riastradh Exp $
+# $NetBSD: md.amd64,v 1.51 2015/03/07 14:16:51 jmcneill Exp $
#
# NOTE that there are two sets of files here:
# @MODULEDIR@ and amd64-xen
@@ -340,6 +340,8 @@
./stand/amd64-xen/@OSRELEASE@/modules/i915drm/i915drm.kmod base-kernel-modules kmod,compatmodules
./stand/amd64-xen/@OSRELEASE@/modules/i915drmkms base-kernel-modules kmod,compatmodules
./stand/amd64-xen/@OSRELEASE@/modules/i915drmkms/i915drmkms.kmod base-kernel-modules kmod,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/i2cexec base-kernel-modules kmod,compatmodules
+./stand/amd64-xen/@OSRELEASE@/modules/i2cexec/i2cexec.kmod base-kernel-modules kmod,compatmodules
./stand/amd64-xen/@OSRELEASE@/modules/if_axe base-kernel-modules kmod,compatmodules
./stand/amd64-xen/@OSRELEASE@/modules/if_axe/if_axe.kmod base-kernel-modules kmod,compatmodules
./stand/amd64-xen/@OSRELEASE@/modules/if_axen base-kernel-modules kmod,compatmodules
diff -r aeb5d42572df -r 23c3ae2ce695 distrib/sets/lists/modules/md.evbppc.powerpc
--- a/distrib/sets/lists/modules/md.evbppc.powerpc Sat Mar 07 13:54:57 2015 +0000
+++ b/distrib/sets/lists/modules/md.evbppc.powerpc Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc.powerpc,v 1.4 2014/09/18 19:45:24 wiz Exp $
+# $NetBSD: md.evbppc.powerpc,v 1.5 2015/03/07 14:16:51 jmcneill Exp $
./stand/powerpc-4xx base-kernel-modules kmod,compatmodules
./stand/powerpc-4xx/@OSRELEASE@ base-kernel-modules kmod,compatmodules
./stand/powerpc-4xx/@OSRELEASE@/modules base-kernel-modules kmod,compatmodules
@@ -96,6 +96,8 @@
./stand/powerpc-4xx/@OSRELEASE@/modules/hfs/hfs.kmod base-kernel-modules kmod,compatmodules
./stand/powerpc-4xx/@OSRELEASE@/modules/hythygtemp base-kernel-modules kmod,compatmodules
./stand/powerpc-4xx/@OSRELEASE@/modules/hythygtemp/hythygtemp.kmod base-kernel-modules kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/i2cexec base-kernel-modules kmod,compatmodules
+./stand/powerpc-4xx/@OSRELEASE@/modules/i2cexec/i2cexec.kmod base-kernel-modules kmod,compatmodules
./stand/powerpc-4xx/@OSRELEASE@/modules/if_axe base-kernel-modules kmod,compatmodules
./stand/powerpc-4xx/@OSRELEASE@/modules/if_axe/if_axe.kmod base-kernel-modules kmod,compatmodules
./stand/powerpc-4xx/@OSRELEASE@/modules/if_axen base-kernel-modules kmod,compatmodules
@@ -335,6 +337,8 @@
./stand/powerpc-booke/@OSRELEASE@/modules/hfs/hfs.kmod base-kernel-modules kmod,compatmodules
./stand/powerpc-booke/@OSRELEASE@/modules/hythygtemp base-kernel-modules kmod,compatmodules
./stand/powerpc-booke/@OSRELEASE@/modules/hythygtemp/hythygtemp.kmod base-kernel-modules kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/i2cexec base-kernel-modules kmod,compatmodules
+./stand/powerpc-booke/@OSRELEASE@/modules/i2cexec/i2cexec.kmod base-kernel-modules kmod,compatmodules
./stand/powerpc-booke/@OSRELEASE@/modules/if_axe base-kernel-modules kmod,compatmodules
./stand/powerpc-booke/@OSRELEASE@/modules/if_axe/if_axe.kmod base-kernel-modules kmod,compatmodules
./stand/powerpc-booke/@OSRELEASE@/modules/if_axen base-kernel-modules kmod,compatmodules
diff -r aeb5d42572df -r 23c3ae2ce695 distrib/sets/lists/modules/md.i386
--- a/distrib/sets/lists/modules/md.i386 Sat Mar 07 13:54:57 2015 +0000
+++ b/distrib/sets/lists/modules/md.i386 Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.54 2015/02/21 07:47:41 ozaki-r Exp $
+# $NetBSD: md.i386,v 1.55 2015/03/07 14:16:51 jmcneill Exp $
#
# NOTE that there are three sets of files here:
# @MODULEDIR@, i386-xen, and i386pae-xen
@@ -364,6 +364,8 @@
./stand/i386-xen/@OSRELEASE@/modules/hpqlb/hpqlb.kmod base-kernel-modules kmod,compatmodules
./stand/i386-xen/@OSRELEASE@/modules/hythygtemp base-kernel-modules kmod,compatmodules
./stand/i386-xen/@OSRELEASE@/modules/hythygtemp/hythygtemp.kmod base-kernel-modules kmod,compatmodules
+./stand/i386-xen/@OSRELEASE@/modules/i2cexec base-kernel-modules kmod,compatmodules
+./stand/i386-xen/@OSRELEASE@/modules/i2cexec/i2cexec.kmod base-kernel-modules kmod,compatmodules
./stand/i386-xen/@OSRELEASE@/modules/i915drm base-kernel-modules kmod,compatmodules
./stand/i386-xen/@OSRELEASE@/modules/i915drm/i915drm.kmod base-kernel-modules kmod,compatmodules
./stand/i386-xen/@OSRELEASE@/modules/i915drmkms base-kernel-modules kmod,compatmodules
@@ -763,6 +765,8 @@
./stand/i386pae-xen/@OSRELEASE@/modules/hpqlb/hpqlb.kmod base-kernel-modules kmod,compatmodules
./stand/i386pae-xen/@OSRELEASE@/modules/hythygtemp base-kernel-modules kmod,compatmodules
./stand/i386pae-xen/@OSRELEASE@/modules/hythygtemp/hythygtemp.kmod base-kernel-modules kmod,compatmodules
+./stand/i386pae-xen/@OSRELEASE@/modules/i2cexec base-kernel-modules kmod,compatmodules
+./stand/i386pae-xen/@OSRELEASE@/modules/i2cexec/i2cexec.kmod base-kernel-modules kmod,compatmodules
./stand/i386pae-xen/@OSRELEASE@/modules/i915drm base-kernel-modules kmod,compatmodules
./stand/i386pae-xen/@OSRELEASE@/modules/i915drm/i915drm.kmod base-kernel-modules kmod,compatmodules
./stand/i386pae-xen/@OSRELEASE@/modules/i915drmkms base-kernel-modules kmod,compatmodules
diff -r aeb5d42572df -r 23c3ae2ce695 distrib/sets/lists/modules/mi
--- a/distrib/sets/lists/modules/mi Sat Mar 07 13:54:57 2015 +0000
+++ b/distrib/sets/lists/modules/mi Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.70 2014/09/18 19:45:24 wiz Exp $
+# $NetBSD: mi,v 1.71 2015/03/07 14:16:51 jmcneill Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -100,6 +100,8 @@
./@MODULEDIR@/hfs/hfs.kmod base-kernel-modules kmod
./@MODULEDIR@/hythygtemp base-kernel-modules kmod
./@MODULEDIR@/hythygtemp/hythygtemp.kmod base-kernel-modules kmod
+./@MODULEDIR@/i2cexec base-kernel-modules kmod
+./@MODULEDIR@/i2cexec/i2cexec.kmod base-kernel-modules kmod
./@MODULEDIR@/if_axe base-kernel-modules kmod
./@MODULEDIR@/if_axe/if_axe.kmod base-kernel-modules kmod
./@MODULEDIR@/if_axen base-kernel-modules kmod
diff -r aeb5d42572df -r 23c3ae2ce695 sys/dev/i2c/au8522.c
--- a/sys/dev/i2c/au8522.c Sat Mar 07 13:54:57 2015 +0000
+++ b/sys/dev/i2c/au8522.c Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: au8522.c,v 1.6 2011/10/02 19:03:56 jmcneill Exp $ */
+/* $NetBSD: au8522.c,v 1.7 2015/03/07 14:16:51 jmcneill Exp $ */
/*-
* Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: au8522.c,v 1.6 2011/10/02 19:03:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: au8522.c,v 1.7 2015/03/07 14:16:51 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -419,7 +419,7 @@
return 0;
}
-MODULE(MODULE_CLASS_DRIVER, au8522, "iic");
+MODULE(MODULE_CLASS_DRIVER, au8522, "i2cexec");
static int
au8522_modcmd(modcmd_t cmd, void *opaque)
diff -r aeb5d42572df -r 23c3ae2ce695 sys/dev/i2c/cx24227.c
--- a/sys/dev/i2c/cx24227.c Sat Mar 07 13:54:57 2015 +0000
+++ b/sys/dev/i2c/cx24227.c Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cx24227.c,v 1.6 2012/03/15 16:20:36 bouyer Exp $ */
+/* $NetBSD: cx24227.c,v 1.7 2015/03/07 14:16:51 jmcneill Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.6 2012/03/15 16:20:36 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.7 2015/03/07 14:16:51 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -328,7 +328,7 @@
return 0;
}
-MODULE(MODULE_CLASS_DRIVER, cx24227, "iic");
+MODULE(MODULE_CLASS_DRIVER, cx24227, "i2cexec");
static int
cx24227_modcmd(modcmd_t cmd, void *priv)
diff -r aeb5d42572df -r 23c3ae2ce695 sys/dev/i2c/dbcool.c
--- a/sys/dev/i2c/dbcool.c Sat Mar 07 13:54:57 2015 +0000
+++ b/sys/dev/i2c/dbcool.c Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dbcool.c,v 1.41 2014/08/10 16:44:35 tls Exp $ */
+/* $NetBSD: dbcool.c,v 1.42 2015/03/07 14:16:51 jmcneill Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.41 2014/08/10 16:44:35 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.42 2015/03/07 14:16:51 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2161,7 +2161,7 @@
}
}
-MODULE(MODULE_CLASS_DRIVER, dbcool, "iic");
+MODULE(MODULE_CLASS_DRIVER, dbcool, "i2cexec");
#ifdef _MODULE
#include "ioconf.c"
diff -r aeb5d42572df -r 23c3ae2ce695 sys/dev/i2c/hytp14.c
--- a/sys/dev/i2c/hytp14.c Sat Mar 07 13:54:57 2015 +0000
+++ b/sys/dev/i2c/hytp14.c Sat Mar 07 14:16:51 2015 +0000
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1.2 2014/06/29 09:52:43 kardel Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1.3 2015/03/07 14:16:51 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -283,7 +283,7 @@
}
-MODULE(MODULE_CLASS_DRIVER, hythygtemp, "iic");
+MODULE(MODULE_CLASS_DRIVER, hythygtemp, "i2cexec");
#ifdef _MODULE
#include "ioconf.c"
diff -r aeb5d42572df -r 23c3ae2ce695 sys/dev/i2c/i2c_exec.c
--- a/sys/dev/i2c/i2c_exec.c Sat Mar 07 13:54:57 2015 +0000
+++ b/sys/dev/i2c/i2c_exec.c Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i2c_exec.c,v 1.9 2013/09/12 20:30:58 martin Exp $ */
+/* $NetBSD: i2c_exec.c,v 1.10 2015/03/07 14:16:51 jmcneill Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,11 +36,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v 1.9 2013/09/12 20:30:58 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v 1.10 2015/03/07 14:16:51 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
+#include <sys/module.h>
#include <sys/event.h>
#include <sys/conf.h>
@@ -50,6 +51,8 @@
static uint8_t iic_smbus_crc8(uint16_t);
static uint8_t iic_smbus_pec(int, uint8_t *, uint8_t *);
+static int i2cexec_modcmd(modcmd_t, void *);
+
/*
* iic_exec:
*
@@ -342,3 +345,18 @@
return crc;
}
+
+MODULE(MODULE_CLASS_MISC, i2cexec, NULL);
+
+static int
+i2cexec_modcmd(modcmd_t cmd, void *opaque)
+{
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+ case MODULE_CMD_FINI:
+ return 0;
+ break;
+ default:
+ return ENOTTY;
+ }
+}
diff -r aeb5d42572df -r 23c3ae2ce695 sys/dev/i2c/lg3303.c
--- a/sys/dev/i2c/lg3303.c Sat Mar 07 13:54:57 2015 +0000
+++ b/sys/dev/i2c/lg3303.c Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lg3303.c,v 1.8 2011/10/02 19:03:56 jmcneill Exp $ */
+/* $NetBSD: lg3303.c,v 1.9 2015/03/07 14:16:51 jmcneill Exp $ */
/*-
* Copyright 2007 Jason Harmening
@@ -28,7 +28,7 @@
*/
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: lg3303.c,v 1.8 2011/10/02 19:03:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lg3303.c,v 1.9 2015/03/07 14:16:51 jmcneill Exp $");
#include <sys/types.h>
#include <sys/kmem.h>
@@ -351,7 +351,7 @@
return (buffer[0] << 8) | buffer[1];
}
-MODULE(MODULE_CLASS_DRIVER, lg3303, "iic,dtv_math");
+MODULE(MODULE_CLASS_DRIVER, lg3303, "i2cexec,dtv_math");
static int
lg3303_modcmd(modcmd_t cmd, void *opaque)
diff -r aeb5d42572df -r 23c3ae2ce695 sys/dev/i2c/mt2131.c
--- a/sys/dev/i2c/mt2131.c Sat Mar 07 13:54:57 2015 +0000
+++ b/sys/dev/i2c/mt2131.c Sat Mar 07 14:16:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mt2131.c,v 1.4 2011/10/02 19:03:56 jmcneill Exp $ */
+/* $NetBSD: mt2131.c,v 1.5 2015/03/07 14:16:51 jmcneill Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt2131.c,v 1.4 2011/10/02 19:03:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt2131.c,v 1.5 2015/03/07 14:16:51 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -255,7 +255,7 @@
return ret;
}
-MODULE(MODULE_CLASS_DRIVER, mt2131, "iic");
+MODULE(MODULE_CLASS_DRIVER, mt2131, "i2cexec");
static int
mt2131_modcmd(modcmd_t cmd, void *priv)
diff -r aeb5d42572df -r 23c3ae2ce695 sys/dev/i2c/nxt2k.c
--- a/sys/dev/i2c/nxt2k.c Sat Mar 07 13:54:57 2015 +0000
+++ b/sys/dev/i2c/nxt2k.c Sat Mar 07 14:16:51 2015 +0000
Home |
Main Index |
Thread Index |
Old Index