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.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); |
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 */ |
79 DEVMETHOD(bus_print_child, bus_generic_print_child), |
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 |
309DRIVER_MODULE(lpbb, root, lpbb_driver, lpbb_devclass, 0, 0); |