bktr_i2c.h revision 93023
1193653Srwatson/*- 2193653Srwatson * Copyright (c) 1998, 2001 Nicolas Souchu 3193653Srwatson * All rights reserved. 4193653Srwatson * 5193653Srwatson * Redistribution and use in source and binary forms, with or without 6193653Srwatson * modification, are permitted provided that the following conditions 7193653Srwatson * are met: 8193653Srwatson * 1. Redistributions of source code must retain the above copyright 9193653Srwatson * notice, this list of conditions and the following disclaimer. 10193653Srwatson * 2. Redistributions in binary form must reproduce the above copyright 11193653Srwatson * notice, this list of conditions and the following disclaimer in the 12193653Srwatson * documentation and/or other materials provided with the distribution. 13193653Srwatson * 14193653Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15193653Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16193653Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17193653Srwatson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18193653Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19193653Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20193653Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21193653Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22193653Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23193653Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24193653Srwatson * SUCH DAMAGE. 25193653Srwatson * 26193653Srwatson * $FreeBSD: head/sys/dev/bktr/bktr_i2c.h 93023 2002-03-23 15:49:15Z nsouch $ 27193653Srwatson * 28193653Srwatson */ 29193653Srwatson#ifndef _BT848_I2C_H 30282781Shiren#define _BT848_I2C_H 31193653Srwatson 32193653Srwatsonextern int bt848_i2c_attach(device_t); 33193653Srwatsonextern int bt848_i2c_detach(device_t); 34193653Srwatson 35193653Srwatsonextern int bti2c_iic_callback(device_t, int, caddr_t *); 36193653Srwatsonextern void bti2c_iic_setsda(device_t, int); 37193653Srwatsonextern void bti2c_iic_setscl(device_t, int); 38193653Srwatsonextern int bti2c_iic_getsda(device_t); 39193653Srwatsonextern int bti2c_iic_getscl(device_t); 40193653Srwatsonextern int bti2c_iic_reset(device_t, u_char, u_char, u_char *); 41193653Srwatson 42193653Srwatsonextern int bti2c_smb_callback(device_t, int, caddr_t *); 43193653Srwatsonextern int bti2c_smb_writeb(device_t dev, u_char slave, char cmd, char byte); 44193653Srwatsonextern int bti2c_smb_writew(device_t dev, u_char slave, char cmd, short word); 45193653Srwatsonextern int bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte); 46193653Srwatson 47193653Srwatson#endif 48193653Srwatson