-/* $OpenBSD: bcm2835_bsc.c,v 1.2 2021/03/11 09:15:25 patrick Exp $ */
+/* $OpenBSD: bcm2835_bsc.c,v 1.3 2021/11/21 11:00:40 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
*
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_clock.h>
+#include <dev/ofw/ofw_misc.h>
#include <dev/ofw/ofw_pinctrl.h>
#include <dev/ofw/fdt.h>
int sc_node;
struct i2c_controller sc_ic;
+ struct i2c_bus sc_ib;
};
int bcmbsc_match(struct device *, void *, void *);
iba.iba_bus_scan_arg = &sc->sc_node;
config_found(&sc->sc_dev, &iba, iicbus_print);
+
+ sc->sc_ib.ib_node = sc->sc_node;
+ sc->sc_ib.ib_ic = &sc->sc_ic;
+ i2c_register(&sc->sc_ib);
}
int