From e670443158fa0f8567cc666000f1cf5819c156ca Mon Sep 17 00:00:00 2001 From: nsouch Date: Sat, 9 Jan 1999 18:08:24 +0000 Subject: Change /dev/smb and /dev/iic interface to allow user programs to interact with devices dynamically. That means, + only one /dev/iic or /dev/smb device for each smb/iic bus to access + I2C/SMB device address must be given to any ioctl + new devices may be plugged and accessed after boot, which was impossible previously (device addresses were hardcoded into the kernel) --- sys/dev/smbus/smb.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/dev/smbus/smb.h') diff --git a/sys/dev/smbus/smb.h b/sys/dev/smbus/smb.h index 1338a15..e0ebef8 100644 --- a/sys/dev/smbus/smb.h +++ b/sys/dev/smbus/smb.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: smb.h,v 1.1 1998/08/13 17:13:20 son Exp $ + * $Id: smb.h,v 1.1 1998/09/03 21:00:08 nsouch Exp $ * */ #ifndef __SMB_H @@ -34,6 +34,7 @@ struct smbcmd { char cmd; int count; + u_char slave; union { char byte; short word; @@ -48,8 +49,8 @@ struct smbcmd { } data; }; -#define SMB_QUICK_WRITE _IO('i', 1) -#define SMB_QUICK_READ _IO('i', 2) +#define SMB_QUICK_WRITE _IOW('i', 1, struct smbcmd) +#define SMB_QUICK_READ _IOW('i', 2, struct smbcmd) #define SMB_SENDB _IOW('i', 3, struct smbcmd) #define SMB_RECVB _IOW('i', 4, struct smbcmd) #define SMB_WRITEB _IOW('i', 5, struct smbcmd) -- cgit v1.1