140781Snsouch/*-
293023Snsouch * Copyright (c) 1998, 2001 Nicolas Souchu
340781Snsouch * All rights reserved.
440781Snsouch *
540781Snsouch * Redistribution and use in source and binary forms, with or without
640781Snsouch * modification, are permitted provided that the following conditions
740781Snsouch * are met:
840781Snsouch * 1. Redistributions of source code must retain the above copyright
940781Snsouch *    notice, this list of conditions and the following disclaimer.
1040781Snsouch * 2. Redistributions in binary form must reproduce the above copyright
1140781Snsouch *    notice, this list of conditions and the following disclaimer in the
1240781Snsouch *    documentation and/or other materials provided with the distribution.
1340781Snsouch *
1440781Snsouch * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1540781Snsouch * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1640781Snsouch * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1740781Snsouch * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1840781Snsouch * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1940781Snsouch * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2040781Snsouch * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2140781Snsouch * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2240781Snsouch * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2340781Snsouch * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2440781Snsouch * SUCH DAMAGE.
2540781Snsouch *
2650477Speter * $FreeBSD: releng/10.2/sys/dev/bktr/bktr_i2c.h 162421 2006-09-18 20:17:42Z jhb $
2740781Snsouch *
2840781Snsouch */
2940781Snsouch#ifndef _BT848_I2C_H
3040781Snsouch#define _BT848_I2C_H
3140781Snsouch
3293023Snsouchextern int bt848_i2c_attach(device_t);
3393023Snsouchextern int bt848_i2c_detach(device_t);
3440781Snsouch
3593023Snsouchextern int bti2c_iic_callback(device_t, int, caddr_t *);
3693023Snsouchextern void bti2c_iic_setsda(device_t, int);
3793023Snsouchextern void bti2c_iic_setscl(device_t, int);
3893023Snsouchextern int bti2c_iic_getsda(device_t);
3993023Snsouchextern int bti2c_iic_getscl(device_t);
4093023Snsouchextern int bti2c_iic_reset(device_t, u_char, u_char, u_char *);
4193023Snsouch
42162421Sjhbextern int bti2c_smb_callback(device_t, int, void *);
4393023Snsouchextern int bti2c_smb_writeb(device_t dev, u_char slave, char cmd, char byte);
4493023Snsouchextern int bti2c_smb_writew(device_t dev, u_char slave, char cmd, short word);
4593023Snsouchextern int bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte);
4693023Snsouch
4740781Snsouch#endif
48