Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej-i2c-spi-conf]: src/sys/dev/i2c fdtbus_attach_i2cbus() is no long...



details:   https://anonhg.NetBSD.org/src/rev/d87089037e62
branches:  thorpej-i2c-spi-conf
changeset: 1020828:d87089037e62
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed May 19 03:14:24 2021 +0000

description:
fdtbus_attach_i2cbus() is no longer anything other than a wrapper around
config_found(); just get rid of it and make its callers look like all of
the other I2C controller drivers.

diffstat:

 sys/arch/arm/broadcom/bcm2835_bsc_fdt.c |  11 ++++++++---
 sys/arch/arm/nvidia/tegra_i2c.c         |  11 ++++++++---
 sys/arch/arm/rockchip/rk_i2c.c          |  11 ++++++++---
 sys/arch/arm/samsung/exynos_i2c.c       |  11 ++++++++---
 sys/arch/arm/sociox/sni_i2c.c           |  11 ++++++++---
 sys/arch/arm/sunxi/sunxi_rsb.c          |  11 ++++++++---
 sys/arch/arm/sunxi/sunxi_twi.c          |  11 ++++++++---
 sys/arch/arm/ti/ti_iic.c                |  11 ++++++++---
 sys/dev/fdt/dwiic_fdt.c                 |  11 ++++++++---
 sys/dev/fdt/fdt_i2c.c                   |  18 ++----------------
 sys/dev/fdt/fdtvar.h                    |   4 +---
 sys/dev/i2c/motoi2c.c                   |   8 +++-----
 12 files changed, 78 insertions(+), 51 deletions(-)

diffs (truncated from 367 to 300 lines):

diff -r 80711bfa6688 -r d87089037e62 sys/arch/arm/broadcom/bcm2835_bsc_fdt.c
--- a/sys/arch/arm/broadcom/bcm2835_bsc_fdt.c   Wed May 19 02:58:26 2021 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_bsc_fdt.c   Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_bsc_fdt.c,v 1.6 2021/01/29 14:11:14 skrll Exp $        */
+/*     $NetBSD: bcm2835_bsc_fdt.c,v 1.6.4.1 2021/05/19 03:14:24 thorpej Exp $  */
 
 /*
  * Copyright (c) 2019 Jason R. Thorpe
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc_fdt.c,v 1.6 2021/01/29 14:11:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc_fdt.c,v 1.6.4.1 2021/05/19 03:14:24 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -135,5 +135,10 @@
 
        fdtbus_register_i2c_controller(&sc->sc_i2c, phandle);
 
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_i2c, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_i2c,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
diff -r 80711bfa6688 -r d87089037e62 sys/arch/arm/nvidia/tegra_i2c.c
--- a/sys/arch/arm/nvidia/tegra_i2c.c   Wed May 19 02:58:26 2021 +0000
+++ b/sys/arch/arm/nvidia/tegra_i2c.c   Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_i2c.c,v 1.26 2021/01/27 03:10:19 thorpej Exp $ */
+/* $NetBSD: tegra_i2c.c,v 1.26.4.1 2021/05/19 03:14:24 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.26 2021/01/27 03:10:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.26.4.1 2021/05/19 03:14:24 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -180,7 +180,12 @@
 
        fdtbus_register_i2c_controller(&sc->sc_ic, phandle);
 
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_ic, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_ic,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
 
 static void
diff -r 80711bfa6688 -r d87089037e62 sys/arch/arm/rockchip/rk_i2c.c
--- a/sys/arch/arm/rockchip/rk_i2c.c    Wed May 19 02:58:26 2021 +0000
+++ b/sys/arch/arm/rockchip/rk_i2c.c    Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_i2c.c,v 1.10 2021/01/27 03:10:19 thorpej Exp $ */
+/* $NetBSD: rk_i2c.c,v 1.10.4.1 2021/05/19 03:14:24 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: rk_i2c.c,v 1.10 2021/01/27 03:10:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_i2c.c,v 1.10.4.1 2021/05/19 03:14:24 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -418,7 +418,12 @@
 
        fdtbus_register_i2c_controller(&sc->sc_ic, phandle);
 
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_ic, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_ic,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
 
 CFATTACH_DECL_NEW(rk_i2c, sizeof(struct rk_i2c_softc),
diff -r 80711bfa6688 -r d87089037e62 sys/arch/arm/samsung/exynos_i2c.c
--- a/sys/arch/arm/samsung/exynos_i2c.c Wed May 19 02:58:26 2021 +0000
+++ b/sys/arch/arm/samsung/exynos_i2c.c Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exynos_i2c.c,v 1.22 2021/03/14 08:16:57 skrll Exp $ */
+/*     $NetBSD: exynos_i2c.c,v 1.22.4.1 2021/05/19 03:14:24 thorpej Exp $ */
 
 /*
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
 #include "opt_arm_debug.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exynos_i2c.c,v 1.22 2021/03/14 08:16:57 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_i2c.c,v 1.22.4.1 2021/05/19 03:14:24 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -178,7 +178,12 @@
 
        fdtbus_register_i2c_controller(&sc->sc_ic, phandle);
 
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_ic, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_ic,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
 
 static int
diff -r 80711bfa6688 -r d87089037e62 sys/arch/arm/sociox/sni_i2c.c
--- a/sys/arch/arm/sociox/sni_i2c.c     Wed May 19 02:58:26 2021 +0000
+++ b/sys/arch/arm/sociox/sni_i2c.c     Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sni_i2c.c,v 1.11 2021/04/24 23:36:28 thorpej Exp $     */
+/*     $NetBSD: sni_i2c.c,v 1.11.2.1 2021/05/19 03:14:24 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sni_i2c.c,v 1.11 2021/04/24 23:36:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sni_i2c.c,v 1.11.2.1 2021/05/19 03:14:24 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -148,7 +148,12 @@
 
        fdtbus_register_i2c_controller(&sc->sc_ic, phandle);
 #if 0
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_ic, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_i2c,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 #endif
        return;
  fail:
diff -r 80711bfa6688 -r d87089037e62 sys/arch/arm/sunxi/sunxi_rsb.c
--- a/sys/arch/arm/sunxi/sunxi_rsb.c    Wed May 19 02:58:26 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_rsb.c    Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_rsb.c,v 1.14 2021/01/27 03:10:20 thorpej Exp $ */
+/* $NetBSD: sunxi_rsb.c,v 1.14.4.1 2021/05/19 03:14:24 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_rsb.c,v 1.14 2021/01/27 03:10:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_rsb.c,v 1.14.4.1 2021/05/19 03:14:24 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -184,7 +184,12 @@
 
        fdtbus_register_i2c_controller(&sc->sc_ic, phandle);
 
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_ic, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_ic,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
 
 static int
diff -r 80711bfa6688 -r d87089037e62 sys/arch/arm/sunxi/sunxi_twi.c
--- a/sys/arch/arm/sunxi/sunxi_twi.c    Wed May 19 02:58:26 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_twi.c    Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_twi.c,v 1.17 2021/01/27 03:10:20 thorpej Exp $ */
+/* $NetBSD: sunxi_twi.c,v 1.17.4.1 2021/05/19 03:14:24 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_twi.c,v 1.17 2021/01/27 03:10:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_twi.c,v 1.17.4.1 2021/05/19 03:14:24 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -185,5 +185,10 @@
 
        fdtbus_register_i2c_controller(&sc->sc_i2c, phandle);
 
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_i2c, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_i2c,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
diff -r 80711bfa6688 -r d87089037e62 sys/arch/arm/ti/ti_iic.c
--- a/sys/arch/arm/ti/ti_iic.c  Wed May 19 02:58:26 2021 +0000
+++ b/sys/arch/arm/ti/ti_iic.c  Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_iic.c,v 1.13 2021/01/27 03:10:20 thorpej Exp $ */
+/* $NetBSD: ti_iic.c,v 1.13.4.1 2021/05/19 03:14:24 thorpej Exp $ */
 
 /*
  * Copyright (c) 2013 Manuel Bouyer.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_iic.c,v 1.13 2021/01/27 03:10:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_iic.c,v 1.13.4.1 2021/05/19 03:14:24 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -298,7 +298,12 @@
 
        fdtbus_register_i2c_controller(&sc->sc_ic, phandle);
 
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_ic, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_ic,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 }
 
 static int
diff -r 80711bfa6688 -r d87089037e62 sys/dev/fdt/dwiic_fdt.c
--- a/sys/dev/fdt/dwiic_fdt.c   Wed May 19 02:58:26 2021 +0000
+++ b/sys/dev/fdt/dwiic_fdt.c   Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwiic_fdt.c,v 1.4 2021/01/27 03:10:21 thorpej Exp $ */
+/* $NetBSD: dwiic_fdt.c,v 1.4.4.1 2021/05/19 03:14:25 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwiic_fdt.c,v 1.4 2021/01/27 03:10:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwiic_fdt.c,v 1.4.4.1 2021/05/19 03:14:25 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -111,7 +111,12 @@
 
        fdtbus_register_i2c_controller(&sc->sc_dwiic.sc_i2c_tag, phandle);
 
-       fdtbus_attach_i2cbus(self, phandle, &sc->sc_dwiic.sc_i2c_tag, iicbus_print);
+       struct i2cbus_attach_args iba = {
+               .iba_tag = &sc->sc_dwiic.sc_i2c_tag,
+       };
+       config_found(self, &iba, iicbus_print,
+           CFARG_DEVHANDLE, device_handle(self),
+           CFARG_EOL);
 
 out:
        return;
diff -r 80711bfa6688 -r d87089037e62 sys/dev/fdt/fdt_i2c.c
--- a/sys/dev/fdt/fdt_i2c.c     Wed May 19 02:58:26 2021 +0000
+++ b/sys/dev/fdt/fdt_i2c.c     Wed May 19 03:14:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_i2c.c,v 1.10.2.1 2021/04/25 22:20:08 thorpej Exp $ */
+/* $NetBSD: fdt_i2c.c,v 1.10.2.2 2021/05/19 03:14:25 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.10.2.1 2021/04/25 22:20:08 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.10.2.2 2021/05/19 03:14:25 thorpej Exp $");
 



Home | Main Index | Thread Index | Old Index