1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * Copyright (c) 1999-2000 by Sun Microsystems, Inc. 3*0Sstevel@tonic-gate * All rights reserved. 4*0Sstevel@tonic-gate */ 5*0Sstevel@tonic-gate 6*0Sstevel@tonic-gate #ifndef _I2C_SVC_IMPL_H 7*0Sstevel@tonic-gate #define _I2C_SVC_IMPL_H 8*0Sstevel@tonic-gate 9*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 10*0Sstevel@tonic-gate 11*0Sstevel@tonic-gate #ifdef __cplusplus 12*0Sstevel@tonic-gate extern "C" { 13*0Sstevel@tonic-gate #endif 14*0Sstevel@tonic-gate 15*0Sstevel@tonic-gate /* 16*0Sstevel@tonic-gate * i2c_transfer_alloc is a wrapper structure that is used 17*0Sstevel@tonic-gate * to store i2c_transfer_t allocation information so that 18*0Sstevel@tonic-gate * the caller to i2c_transfer_allocate() can modify the 19*0Sstevel@tonic-gate * buffer/size fields and i2c_transfer_free() will still 20*0Sstevel@tonic-gate * be able to recover all buffers. 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate typedef struct i2c_transfer_alloc { 23*0Sstevel@tonic-gate i2c_transfer_t i2cw_i2ct; 24*0Sstevel@tonic-gate uint32_t i2cw_size; 25*0Sstevel@tonic-gate } i2c_transfer_alloc_t; 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #define CHDL(client_hdl) ((i2c_client_hdl_impl_t *)(client_hdl)) 28*0Sstevel@tonic-gate 29*0Sstevel@tonic-gate /* 30*0Sstevel@tonic-gate * i2c_client_hdl_impl is the real implementation of 31*0Sstevel@tonic-gate * i2c_client_hdl. 32*0Sstevel@tonic-gate */ 33*0Sstevel@tonic-gate typedef struct i2c_client_hdl_impl { 34*0Sstevel@tonic-gate dev_info_t *chdl_dip; /* dip for I2C device */ 35*0Sstevel@tonic-gate struct i2c_nexus_reg *chdl_nexus_reg; 36*0Sstevel@tonic-gate } i2c_client_hdl_impl_t; 37*0Sstevel@tonic-gate 38*0Sstevel@tonic-gate /* 39*0Sstevel@tonic-gate * i2c_nexus_reg_list are the elements of a linked list which 40*0Sstevel@tonic-gate * tracks all I2C parents. 41*0Sstevel@tonic-gate */ 42*0Sstevel@tonic-gate typedef struct i2c_nexus_reg_list { 43*0Sstevel@tonic-gate i2c_nexus_reg_t nexus_reg; 44*0Sstevel@tonic-gate dev_info_t *dip; 45*0Sstevel@tonic-gate struct i2c_nexus_reg_list *next; 46*0Sstevel@tonic-gate } i2c_nexus_reg_list_t; 47*0Sstevel@tonic-gate 48*0Sstevel@tonic-gate #ifdef __cplusplus 49*0Sstevel@tonic-gate } 50*0Sstevel@tonic-gate #endif 51*0Sstevel@tonic-gate 52*0Sstevel@tonic-gate #endif /* _I2C_SVC_IMPL_H */ 53