More i2c-dev fixes

* Made some smbus.h symbols visible in non-kernel mode
* Some i2c-dev.h fixes


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@164 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1999-01-13 20:25:21 +00:00
1 parent 351441d5d8
commit 50573c910d
4 files changed
+84 -74

No files matched your search

+22 -21
View File
@@ -21,14 +21,34 @@
#ifndef SENSORS_SMBUS_H
#define SENSORS_SMBUS_H
#ifdef __KERNEL__
/* This file must interface with Simon Vogl's i2c driver. Version 19981006 is
OK, earlier versions are not; later versions will probably give problems
too.
*/
#include <asm/types.h>
/* This union is used within smbus_access routines */
union smbus_data {
__u8 byte;
__u16 word;
__u8 block[32];
};
/* smbus_access read or write markers */
#define SMBUS_READ 1
#define SMBUS_WRITE 0
/* SMBus transaction types (size parameter in the above functions)
Note: these no longer correspond to the (arbitrary) PIIX4 internal codes! */
#define SMBUS_QUICK 0
#define SMBUS_BYTE 1
#define SMBUS_BYTE_DATA 2
#define SMBUS_WORD_DATA 3
#define SMBUS_PROC_CALL 4
#define SMBUS_BLOCK_DATA 5
#ifdef __KERNEL__
/* SPINLOCK is defined in i2c.h. */
#ifdef SPINLOCK
#include <asm/spinlock.h>
@@ -136,25 +156,6 @@ struct smbus_adapter {
#define i2c_is_smbus_adapter(adapptr) \
((adapptr)->algo->id == ALGO_SMBUS)
/* This union is used within smbus_access routines */
union smbus_data {
u8 byte;
u16 word;
u8 block[32];
};
/* smbus_access read or write markers */
#define SMBUS_READ 1
#define SMBUS_WRITE 0
/* SMBus transaction types (size parameter in the above functions)
Note: these no longer correspond to the (arbitrary) PIIX4 internal codes! */
#define SMBUS_QUICK 0
#define SMBUS_BYTE 1
#define SMBUS_BYTE_DATA 2
#define SMBUS_WORD_DATA 3
#define SMBUS_PROC_CALL 4
#define SMBUS_BLOCK_DATA 5
/* Declare an algorithm structure. All SMBus derived adapters should use this
algorithm! */