pcf8584var.h revision 1.4.38.1 1 /* $NetBSD: pcf8584var.h,v 1.4.38.1 2016/03/19 11:30:09 skrll Exp $ */
2 /* $OpenBSD: pcf8584var.h,v 1.5 2007/10/20 18:46:21 kettenis Exp $ */
3
4 /*
5 * Copyright (c) 2006 David Gwynne <dlg (at) openbsd.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
10 *
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20 struct pcfiic_softc {
21 device_t sc_dev;
22
23 bus_space_tag_t sc_iot;
24 bus_space_handle_t sc_ioh;
25 bus_space_handle_t sc_ioh2;
26 int sc_master;
27 u_int8_t sc_addr;
28 u_int8_t sc_clock;
29 u_int8_t sc_regmap[2];
30
31 int sc_poll;
32
33 struct i2c_controller sc_i2c;
34 krwlock_t sc_lock;
35 };
36
37 void pcfiic_attach(struct pcfiic_softc *, i2c_addr_t, u_int8_t, int);
38 int pcfiic_intr(void *);
39