[BACK]Return to pcf8584var.h CVS log [TXT][DIR] Up to [local] / sys / dev / ic

Annotation of sys/dev/ic/pcf8584var.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: pcf8584var.h,v 1.4 2007/05/21 03:11:11 jsg Exp $ */
        !             2:
        !             3: /*
        !             4:  * Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
        !             5:  *
        !             6:  * Permission to use, copy, modify, and distribute this software for any
        !             7:  * purpose with or without fee is hereby granted, provided that the above
        !             8:  * copyright notice and this permission notice appear in all copies.
        !             9:  *
        !            10:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
        !            11:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
        !            12:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
        !            13:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
        !            14:  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
        !            15:  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
        !            16:  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
        !            17:  */
        !            18:
        !            19: struct pcfiic_softc {
        !            20:        struct device           sc_dev;
        !            21:
        !            22:        bus_space_tag_t         sc_iot;
        !            23:        bus_space_handle_t      sc_ioh;
        !            24:        bus_space_handle_t      sc_ioh2;
        !            25:        int                     sc_master;
        !            26:        u_int8_t                sc_addr;
        !            27:        u_int8_t                sc_clock;
        !            28:        u_int8_t                sc_regmap[2];
        !            29:
        !            30:        int                     sc_poll;
        !            31:
        !            32:        struct i2c_controller   sc_i2c;
        !            33:        struct rwlock           sc_lock;
        !            34: };
        !            35:
        !            36: /* clock divisor settings */
        !            37: #define PCF_CLOCK_3            0x00 /* 3 MHz */
        !            38: #define PCF_CLOCK_4_43         0x10 /* 4.43 MHz */
        !            39: #define PCF_CLOCK_6            0x14 /* 6 MHz */
        !            40: #define PCF_CLOCK_8            0x18 /* 8 MHz */
        !            41: #define PCF_CLOCK_12           0x1c /* 12 MHz */
        !            42:
        !            43: void   pcfiic_attach(struct pcfiic_softc *, i2c_addr_t, u_int8_t, int,
        !            44:            void (*)(struct device *, struct i2cbus_attach_args *, void *),
        !            45:            void *);
        !            46: int    pcfiic_intr(void *);

CVSweb