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