Deleted Added
full compact
lpbb.c (46743) lpbb.c (49195)
1/*-
2 * Copyright (c) 1998 Nicolas Souchu, Marc Bouget
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, Marc Bouget
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 * $Id: lpbb.c,v 1.4 1999/01/10 12:04:54 nsouch Exp $
26 * $Id: lpbb.c,v 1.5 1999/05/08 21:59:06 dfr Exp $
27 *
28 */
29
30/*
31 * I2C Bit-Banging over parallel port
32 *
33 * See the Official Philips interface description in lpbb(4)
34 */

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

57
58 struct ppb_device lpbb_dev;
59};
60
61static int lpbb_detect(struct lpbb_softc *);
62
63static int lpbb_probe(device_t);
64static int lpbb_attach(device_t);
27 *
28 */
29
30/*
31 * I2C Bit-Banging over parallel port
32 *
33 * See the Official Philips interface description in lpbb(4)
34 */

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

57
58 struct ppb_device lpbb_dev;
59};
60
61static int lpbb_detect(struct lpbb_softc *);
62
63static int lpbb_probe(device_t);
64static int lpbb_attach(device_t);
65static void lpbb_print_child(device_t, device_t);
66
67static int lpbb_callback(device_t, int, caddr_t *);
68static void lpbb_setlines(device_t, int, int);
69static int lpbb_getdataline(device_t);
70static int lpbb_reset(device_t, u_char, u_char, u_char *);
71
72static devclass_t lpbb_devclass;
73
74static device_method_t lpbb_methods[] = {
75 /* device interface */
76 DEVMETHOD(device_probe, lpbb_probe),
77 DEVMETHOD(device_attach, lpbb_attach),
78
79 /* bus interface */
65
66static int lpbb_callback(device_t, int, caddr_t *);
67static void lpbb_setlines(device_t, int, int);
68static int lpbb_getdataline(device_t);
69static int lpbb_reset(device_t, u_char, u_char, u_char *);
70
71static devclass_t lpbb_devclass;
72
73static device_method_t lpbb_methods[] = {
74 /* device interface */
75 DEVMETHOD(device_probe, lpbb_probe),
76 DEVMETHOD(device_attach, lpbb_attach),
77
78 /* bus interface */
80 DEVMETHOD(bus_print_child, lpbb_print_child),
79 DEVMETHOD(bus_print_child, bus_generic_print_child),
81
82 /* iicbb interface */
83 DEVMETHOD(iicbb_callback, lpbb_callback),
84 DEVMETHOD(iicbb_setlines, lpbb_setlines),
85 DEVMETHOD(iicbb_getdataline, lpbb_getdataline),
86 DEVMETHOD(iicbb_reset, lpbb_reset),
87
88 { 0, 0 }

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

302static int
303lpbb_getdataline(device_t dev)
304{
305 struct lpbb_softc *sc = (struct lpbb_softc *)device_get_softc(dev);
306
307 return (getSDA(sc));
308}
309
80
81 /* iicbb interface */
82 DEVMETHOD(iicbb_callback, lpbb_callback),
83 DEVMETHOD(iicbb_setlines, lpbb_setlines),
84 DEVMETHOD(iicbb_getdataline, lpbb_getdataline),
85 DEVMETHOD(iicbb_reset, lpbb_reset),
86
87 { 0, 0 }

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

301static int
302lpbb_getdataline(device_t dev)
303{
304 struct lpbb_softc *sc = (struct lpbb_softc *)device_get_softc(dev);
305
306 return (getSDA(sc));
307}
308
310static void
311lpbb_print_child(device_t bus, device_t dev)
312{
313 printf(" on %s%d", device_get_name(bus), device_get_unit(bus));
314
315 return;
316}
317
318DRIVER_MODULE(lpbb, root, lpbb_driver, lpbb_devclass, 0, 0);
309DRIVER_MODULE(lpbb, root, lpbb_driver, lpbb_devclass, 0, 0);