/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _I2C_SVC_H
#define _I2C_SVC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* I2C interface return values
*/
#define I2C_SUCCESS 0
/*
* Used for flags in i2c_transfer_alloc()
*/
/*
* Version for i2c_transfer_t.i2c_version
*/
#define I2C_XFER_REV 0
/*
* Version for i2c_svc_t.i2c_nexus_version
*/
#define I2C_NEXUS_REV 0
/*
* Valid transfer flags for i2c_transfer.flags
*/
/*
* Developer's note: i2c_transfer_copyout is sensitive to
* the ordering of i2c_transfer structure fields. If any fields
* are changed, make sure to review i2c_transfer_copyout for
* possible changes.
*
* Fields prefixed with 'I' are input fields passed to the
* i2c_transfer function, while those prefixed with 'O'
* are returned from the transfer function.
*/
typedef struct i2c_transfer {
/*
* i2c_nexus_reg is passed to the I2C services module
* through the i2c_nexus_register() interface by the nexus
* driver. It contains a version plus the pointer to
* the functions that I2C services calls.
*/
typedef struct i2c_nexus_reg {
/*
* Interfaces for I2C client drivers
*/
/*
* Interfaces for I2C nexus drivers
*/
#ifdef __cplusplus
}
#endif
#endif /* _I2C_SVC_H */