1998-10-31 11:26:38 +00:00
|
|
|
/*-
|
|
|
|
* Copyright (c) 1998 Nicolas Souchu
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
1999-08-28 01:08:13 +00:00
|
|
|
* $FreeBSD$
|
1998-10-31 11:26:38 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* I2C support for the bti2c chipset.
|
|
|
|
*
|
|
|
|
* From brooktree848.c <fsmp@freefall.org>
|
|
|
|
*/
|
|
|
|
|
1999-05-10 10:08:05 +00:00
|
|
|
#include "bktr.h"
|
|
|
|
|
1998-10-31 11:26:38 +00:00
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/kernel.h>
|
|
|
|
#include <sys/systm.h>
|
|
|
|
#include <sys/module.h>
|
|
|
|
#include <sys/bus.h>
|
|
|
|
#include <sys/uio.h>
|
2001-01-20 02:24:07 +00:00
|
|
|
|
|
|
|
#if __FreeBSD_version >= 500014
|
|
|
|
#include <sys/selinfo.h>
|
|
|
|
#else
|
1999-08-30 09:28:47 +00:00
|
|
|
#include <sys/select.h>
|
2001-01-20 02:24:07 +00:00
|
|
|
#endif
|
1998-10-31 11:26:38 +00:00
|
|
|
|
2000-10-19 07:33:28 +00:00
|
|
|
#if (__FreeBSD_version < 500000)
|
|
|
|
#include <machine/clock.h> /* for DELAY */
|
|
|
|
#endif
|
1998-10-31 11:26:38 +00:00
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
#if (__FreeBSD_version >=300000)
|
|
|
|
#include <machine/bus_memio.h> /* for bus space */
|
|
|
|
#include <machine/bus.h>
|
|
|
|
#include <sys/bus.h>
|
|
|
|
#endif
|
|
|
|
|
1998-10-31 11:26:38 +00:00
|
|
|
#include <pci/pcivar.h>
|
|
|
|
#include <pci/pcireg.h>
|
|
|
|
#include <machine/ioctl_meteor.h>
|
|
|
|
#include <machine/ioctl_bt848.h> /* extensions to ioctl_meteor.h */
|
1999-09-22 06:46:08 +00:00
|
|
|
#include <dev/bktr/bktr_reg.h>
|
1998-10-31 11:26:38 +00:00
|
|
|
|
1999-09-22 06:46:08 +00:00
|
|
|
#include <dev/bktr/bktr_i2c.h>
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
#include <dev/iicbus/iiconf.h>
|
|
|
|
#include <dev/iicbus/iicbus.h>
|
|
|
|
|
|
|
|
#include <dev/smbus/smbconf.h>
|
|
|
|
|
|
|
|
#include "iicbb_if.h"
|
|
|
|
#include "smbus_if.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define I2C_DELAY 40
|
|
|
|
|
|
|
|
#define BTI2C_DEBUG(x) if (bti2c_debug) (x)
|
|
|
|
static int bti2c_debug = 0;
|
|
|
|
|
|
|
|
struct bti2c_softc {
|
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
bus_space_tag_t memt; /* Bus space register access */
|
|
|
|
bus_space_handle_t memh; /* Bus space register access */
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
int iic_owned; /* 1 if we own the iicbus */
|
|
|
|
int smb_owned; /* 1 if we own the smbbus */
|
|
|
|
|
|
|
|
device_t smbus;
|
|
|
|
device_t iicbus;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct bt_data {
|
2000-04-04 16:54:13 +00:00
|
|
|
bus_space_tag_t memt;
|
|
|
|
bus_space_handle_t memh;
|
1998-10-31 11:26:38 +00:00
|
|
|
};
|
|
|
|
struct bt_data btdata[NBKTR];
|
|
|
|
|
|
|
|
static int bti2c_probe(device_t);
|
|
|
|
static int bti2c_attach(device_t);
|
|
|
|
|
|
|
|
static int bti2c_iic_callback(device_t, int, caddr_t *);
|
|
|
|
static void bti2c_iic_setlines(device_t, int, int);
|
|
|
|
static int bti2c_iic_getdataline(device_t);
|
|
|
|
static int bti2c_iic_reset(device_t, u_char, u_char, u_char *);
|
|
|
|
|
|
|
|
static int bti2c_smb_callback(device_t, int, caddr_t *);
|
|
|
|
static int bti2c_smb_writeb(device_t dev, u_char slave, char cmd, char byte);
|
|
|
|
static int bti2c_smb_writew(device_t dev, u_char slave, char cmd, short word);
|
|
|
|
static int bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte);
|
|
|
|
|
|
|
|
static devclass_t bti2c_devclass;
|
|
|
|
|
|
|
|
static device_method_t bti2c_methods[] = {
|
|
|
|
/* device interface */
|
|
|
|
DEVMETHOD(device_probe, bti2c_probe),
|
|
|
|
DEVMETHOD(device_attach, bti2c_attach),
|
|
|
|
|
|
|
|
/* bus interface */
|
1999-07-29 01:03:04 +00:00
|
|
|
DEVMETHOD(bus_print_child, bus_generic_print_child),
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
/* iicbb interface */
|
|
|
|
DEVMETHOD(iicbb_callback, bti2c_iic_callback),
|
|
|
|
DEVMETHOD(iicbb_setlines, bti2c_iic_setlines),
|
|
|
|
DEVMETHOD(iicbb_getdataline, bti2c_iic_getdataline),
|
|
|
|
DEVMETHOD(iicbb_reset, bti2c_iic_reset),
|
|
|
|
|
|
|
|
/* smbus interface */
|
|
|
|
DEVMETHOD(smbus_callback, bti2c_smb_callback),
|
|
|
|
DEVMETHOD(smbus_writeb, bti2c_smb_writeb),
|
|
|
|
DEVMETHOD(smbus_writew, bti2c_smb_writew),
|
|
|
|
DEVMETHOD(smbus_readb, bti2c_smb_readb),
|
|
|
|
|
|
|
|
{ 0, 0 }
|
|
|
|
};
|
|
|
|
|
1999-10-28 13:58:17 +00:00
|
|
|
#if (__FreeBSD_version < 400000)
|
|
|
|
/* FreeBSD 3.x needs DRIVER_TYPE_MISC */
|
1998-10-31 11:26:38 +00:00
|
|
|
static driver_t bti2c_driver = {
|
|
|
|
"bti2c",
|
|
|
|
bti2c_methods,
|
1999-10-28 13:58:17 +00:00
|
|
|
DRIVER_TYPE_MISC,
|
1998-10-31 11:26:38 +00:00
|
|
|
sizeof(struct bti2c_softc),
|
|
|
|
};
|
1999-10-28 13:58:17 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (__FreeBSD_version >=400000)
|
|
|
|
static driver_t bti2c_driver = {
|
|
|
|
"bti2c",
|
|
|
|
bti2c_methods,
|
|
|
|
sizeof(struct bti2c_softc),
|
|
|
|
};
|
|
|
|
#endif
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
/*
|
2000-04-04 16:54:13 +00:00
|
|
|
* Call this to pass the address of the bktr device to the
|
1998-10-31 11:26:38 +00:00
|
|
|
* bti2c_i2c layer and initialize all the I2C bus architecture
|
|
|
|
*/
|
|
|
|
int
|
2000-04-04 16:54:13 +00:00
|
|
|
bt848_i2c_attach(int unit, struct bktr_softc * bktr, struct bktr_i2c_softc *i2c_sc)
|
1998-10-31 11:26:38 +00:00
|
|
|
{
|
|
|
|
device_t interface;
|
|
|
|
device_t bitbang;
|
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
btdata[unit].memh = bktr->memh;
|
|
|
|
btdata[unit].memt = bktr->memt;
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
/* XXX add the I2C interface to the root_bus until pcibus is ready */
|
2000-01-24 14:00:21 +00:00
|
|
|
#if (__FreeBSD_version < 400000)
|
|
|
|
interface = device_add_child(root_bus, "bti2c", unit, NULL);
|
|
|
|
#else
|
1999-12-03 08:41:24 +00:00
|
|
|
interface = device_add_child(root_bus, "bti2c", unit);
|
2000-01-24 14:00:21 +00:00
|
|
|
#endif
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
/* add bit-banging generic code onto bti2c interface */
|
2000-01-24 14:00:21 +00:00
|
|
|
#if (__FreeBSD_version < 400000)
|
|
|
|
bitbang = device_add_child(interface, "iicbb", -1, NULL);
|
|
|
|
#else
|
1999-12-03 08:41:24 +00:00
|
|
|
bitbang = device_add_child(interface, "iicbb", -1);
|
2000-01-24 14:00:21 +00:00
|
|
|
#endif
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
/* probe and attach the interface, we need it NOW
|
|
|
|
* bit-banging code is also probed and attached */
|
|
|
|
device_probe_and_attach(interface);
|
|
|
|
device_probe_and_attach(bitbang);
|
|
|
|
|
|
|
|
/* smb and i2c interfaces are available for the bt848 chip
|
|
|
|
* connect bit-banging generic code to an iicbus */
|
|
|
|
if ((i2c_sc->iicbus = iicbus_alloc_bus(bitbang)))
|
|
|
|
device_probe_and_attach(i2c_sc->iicbus);
|
|
|
|
|
|
|
|
/* hardware i2c is actually smb over the bti2c interface */
|
|
|
|
if ((i2c_sc->smbus = smbus_alloc_bus(interface)))
|
|
|
|
device_probe_and_attach(i2c_sc->smbus);
|
|
|
|
|
|
|
|
return (0);
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Not a real probe, we know the device exists since the device has
|
|
|
|
* been added after the successfull pci probe.
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
bti2c_probe(device_t dev)
|
|
|
|
{
|
|
|
|
device_set_desc(dev, "bt848 Hard/Soft I2C controller");
|
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bti2c_attach(device_t dev)
|
|
|
|
{
|
|
|
|
struct bti2c_softc *sc = (struct bti2c_softc *)device_get_softc(dev);
|
|
|
|
|
|
|
|
/* XXX should use ivars with pcibus or pcibus methods to access
|
|
|
|
* onboard memory */
|
2000-04-04 16:54:13 +00:00
|
|
|
sc->memh = btdata[device_get_unit(dev)].memh;
|
|
|
|
sc->memt = btdata[device_get_unit(dev)].memt;
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bti2c_smb_callback(device_t dev, int index, caddr_t *data)
|
|
|
|
{
|
|
|
|
struct bti2c_softc *sc = (struct bti2c_softc *)device_get_softc(dev);
|
|
|
|
int error = 0;
|
|
|
|
int how;
|
|
|
|
|
|
|
|
/* test each time if we already have/haven't the iicbus
|
|
|
|
* to avoid deadlocks
|
|
|
|
*/
|
|
|
|
switch (index) {
|
|
|
|
case SMB_REQUEST_BUS:
|
|
|
|
if (!sc->iic_owned) {
|
|
|
|
/* request the iicbus */
|
|
|
|
how = *(int *)data;
|
|
|
|
error = iicbus_request_bus(sc->iicbus, dev, how);
|
|
|
|
if (!error)
|
|
|
|
sc->iic_owned = 1;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SMB_RELEASE_BUS:
|
|
|
|
if (sc->iic_owned) {
|
|
|
|
/* release the iicbus */
|
|
|
|
error = iicbus_release_bus(sc->iicbus, dev);
|
|
|
|
if (!error)
|
|
|
|
sc->iic_owned = 0;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
error = EINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (error);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bti2c_iic_callback(device_t dev, int index, caddr_t *data)
|
|
|
|
{
|
|
|
|
struct bti2c_softc *sc = (struct bti2c_softc *)device_get_softc(dev);
|
|
|
|
int error = 0;
|
|
|
|
int how;
|
|
|
|
|
|
|
|
/* test each time if we already have/haven't the smbus
|
|
|
|
* to avoid deadlocks
|
|
|
|
*/
|
|
|
|
switch (index) {
|
|
|
|
case IIC_REQUEST_BUS:
|
|
|
|
if (!sc->smb_owned) {
|
|
|
|
/* request the smbus */
|
|
|
|
how = *(int *)data;
|
|
|
|
error = smbus_request_bus(sc->smbus, dev, how);
|
|
|
|
if (!error)
|
|
|
|
sc->smb_owned = 1;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case IIC_RELEASE_BUS:
|
|
|
|
if (sc->smb_owned) {
|
|
|
|
/* release the smbus */
|
|
|
|
error = smbus_release_bus(sc->smbus, dev);
|
|
|
|
if (!error)
|
|
|
|
sc->smb_owned = 0;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
error = EINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (error);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bti2c_iic_reset(device_t dev, u_char speed, u_char addr, u_char * oldaddr)
|
|
|
|
{
|
|
|
|
if (oldaddr)
|
|
|
|
*oldaddr = 0; /* XXX */
|
|
|
|
|
|
|
|
return (IIC_ENOADDR);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
bti2c_iic_setlines(device_t dev, int ctrl, int data)
|
|
|
|
{
|
|
|
|
struct bti2c_softc *sc = (struct bti2c_softc *)device_get_softc(dev);
|
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
OUTL(sc, BKTR_I2C_DATA_CTL, (ctrl << 1) | data);;
|
1998-10-31 11:26:38 +00:00
|
|
|
DELAY(I2C_DELAY);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bti2c_iic_getdataline(device_t dev)
|
|
|
|
{
|
|
|
|
struct bti2c_softc *sc = (struct bti2c_softc *)device_get_softc(dev);
|
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
return ( INL(sc,BKTR_I2C_DATA_CTL) & 0x1);
|
1998-10-31 11:26:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2000-04-04 16:54:13 +00:00
|
|
|
bti2c_write(struct bti2c_softc* bti2c_sc, u_long data)
|
1998-10-31 11:26:38 +00:00
|
|
|
{
|
|
|
|
u_long x;
|
|
|
|
|
|
|
|
/* clear status bits */
|
2000-04-04 16:54:13 +00:00
|
|
|
OUTL(bti2c_sc, BKTR_INT_STAT, (BT848_INT_RACK | BT848_INT_I2CDONE));
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
BTI2C_DEBUG(printf("w%lx", data));
|
|
|
|
|
|
|
|
/* write the address and data */
|
2000-04-04 16:54:13 +00:00
|
|
|
OUTL(bti2c_sc, BKTR_I2C_DATA_CTL, data);
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
/* wait for completion */
|
|
|
|
for ( x = 0x7fffffff; x; --x ) { /* safety valve */
|
2000-04-04 16:54:13 +00:00
|
|
|
if ( INL(bti2c_sc, BKTR_INT_STAT) & BT848_INT_I2CDONE )
|
1998-10-31 11:26:38 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* check for ACK */
|
2000-04-04 16:54:13 +00:00
|
|
|
if ( !x || !( INL(bti2c_sc, BKTR_INT_STAT) & BT848_INT_RACK) ) {
|
1998-10-31 11:26:38 +00:00
|
|
|
BTI2C_DEBUG(printf("%c%c", (!x)?'+':'-',
|
2000-04-04 16:54:13 +00:00
|
|
|
(!( INL(bti2c_sc, BKTR_INT_STAT) & BT848_INT_RACK))?'+':'-'));
|
1998-10-31 11:26:38 +00:00
|
|
|
return (SMB_ENOACK);
|
|
|
|
}
|
|
|
|
BTI2C_DEBUG(printf("+"));
|
|
|
|
|
|
|
|
/* return OK */
|
|
|
|
return( 0 );
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bti2c_smb_writeb(device_t dev, u_char slave, char cmd, char byte)
|
|
|
|
{
|
|
|
|
struct bti2c_softc *sc = (struct bti2c_softc *)device_get_softc(dev);
|
|
|
|
u_long data;
|
|
|
|
|
1998-11-07 14:30:48 +00:00
|
|
|
data = ((slave & 0xff) << 24) | ((byte & 0xff) << 16) | (u_char)cmd;
|
1998-10-31 11:26:38 +00:00
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
return (bti2c_write(sc, data));
|
1998-10-31 11:26:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* byte1 becomes low byte of word
|
|
|
|
* byte2 becomes high byte of word
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
bti2c_smb_writew(device_t dev, u_char slave, char cmd, short word)
|
|
|
|
{
|
|
|
|
struct bti2c_softc *sc = (struct bti2c_softc *)device_get_softc(dev);
|
|
|
|
u_long data;
|
|
|
|
char low, high;
|
|
|
|
|
|
|
|
low = (char)(word & 0xff);
|
|
|
|
high = (char)((word & 0xff00) >> 8);
|
|
|
|
|
|
|
|
data = ((slave & 0xff) << 24) | ((low & 0xff) << 16) |
|
1998-11-07 14:30:48 +00:00
|
|
|
((high & 0xff) << 8) | BT848_DATA_CTL_I2CW3B | (u_char)cmd;
|
1998-10-31 11:26:38 +00:00
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
return (bti2c_write(sc, data));
|
1998-10-31 11:26:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The Bt878 and Bt879 differed on the treatment of i2c commands
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte)
|
|
|
|
{
|
|
|
|
struct bti2c_softc *sc = (struct bti2c_softc *)device_get_softc(dev);
|
|
|
|
u_long x;
|
|
|
|
|
|
|
|
/* clear status bits */
|
2000-04-04 16:54:13 +00:00
|
|
|
OUTL(sc,BKTR_INT_STAT, (BT848_INT_RACK | BT848_INT_I2CDONE));
|
1998-10-31 11:26:38 +00:00
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
OUTL(sc,BKTR_I2C_DATA_CTL, ((slave & 0xff) << 24) | (u_char)cmd);;
|
1998-10-31 11:26:38 +00:00
|
|
|
|
1998-11-07 14:30:48 +00:00
|
|
|
BTI2C_DEBUG(printf("r%lx/", (u_long)(((slave & 0xff) << 24) | (u_char)cmd)));
|
1998-10-31 11:26:38 +00:00
|
|
|
|
|
|
|
/* wait for completion */
|
|
|
|
for ( x = 0x7fffffff; x; --x ) { /* safety valve */
|
2000-04-04 16:54:13 +00:00
|
|
|
if ( INL(sc,BKTR_INT_STAT) & BT848_INT_I2CDONE )
|
1998-10-31 11:26:38 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* check for ACK */
|
2000-04-04 16:54:13 +00:00
|
|
|
if ( !x || !(INL(sc,BKTR_INT_STAT) & BT848_INT_RACK) ) {
|
1998-10-31 11:26:38 +00:00
|
|
|
BTI2C_DEBUG(printf("r%c%c", (!x)?'+':'-',
|
2000-04-04 16:54:13 +00:00
|
|
|
(!( INL(sc,BKTR_INT_STAT) & BT848_INT_RACK))?'+':'-'));
|
1998-10-31 11:26:38 +00:00
|
|
|
return (SMB_ENOACK);
|
|
|
|
}
|
|
|
|
|
2000-04-04 16:54:13 +00:00
|
|
|
*byte = (char)((INL(sc,BKTR_I2C_DATA_CTL) >> 8) & 0xff);
|
1998-10-31 11:26:38 +00:00
|
|
|
BTI2C_DEBUG(printf("r%x+", *byte));
|
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
DRIVER_MODULE(bti2c, root, bti2c_driver, bti2c_devclass, 0, 0);
|