Deleted Added
full compact
bktr_i2c.c (52593) bktr_i2c.c (54073)
1/*-
2 * Copyright (c) 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/bktr/bktr_i2c.c 52593 1999-10-28 13:58:17Z roger $
26 * $FreeBSD: head/sys/dev/bktr/bktr_i2c.c 54073 1999-12-03 08:41:24Z mdodd $
27 *
28 */
29
30/*
31 * I2C support for the bti2c chipset.
32 *
33 * From brooktree848.c <fsmp@freefall.org>
34 */

--- 119 unchanged lines hidden (view full) ---

154bt848_i2c_attach(int unit, bt848_ptr_t base, struct bktr_i2c_softc *i2c_sc)
155{
156 device_t interface;
157 device_t bitbang;
158
159 btdata[unit].base = base;
160
161 /* XXX add the I2C interface to the root_bus until pcibus is ready */
27 *
28 */
29
30/*
31 * I2C support for the bti2c chipset.
32 *
33 * From brooktree848.c <fsmp@freefall.org>
34 */

--- 119 unchanged lines hidden (view full) ---

154bt848_i2c_attach(int unit, bt848_ptr_t base, struct bktr_i2c_softc *i2c_sc)
155{
156 device_t interface;
157 device_t bitbang;
158
159 btdata[unit].base = base;
160
161 /* XXX add the I2C interface to the root_bus until pcibus is ready */
162 interface = device_add_child(root_bus, "bti2c", unit, NULL);
162 interface = device_add_child(root_bus, "bti2c", unit);
163
164 /* add bit-banging generic code onto bti2c interface */
163
164 /* add bit-banging generic code onto bti2c interface */
165 bitbang = device_add_child(interface, "iicbb", -1, NULL);
165 bitbang = device_add_child(interface, "iicbb", -1);
166
167 /* probe and attach the interface, we need it NOW
168 * bit-banging code is also probed and attached */
169 device_probe_and_attach(interface);
170 device_probe_and_attach(bitbang);
171
172 /* smb and i2c interfaces are available for the bt848 chip
173 * connect bit-banging generic code to an iicbus */

--- 244 unchanged lines hidden ---
166
167 /* probe and attach the interface, we need it NOW
168 * bit-banging code is also probed and attached */
169 device_probe_and_attach(interface);
170 device_probe_and_attach(bitbang);
171
172 /* smb and i2c interfaces are available for the bt848 chip
173 * connect bit-banging generic code to an iicbus */

--- 244 unchanged lines hidden ---