It doesn't need to include i2c.h, because a forward declaration of
struct i2c_adapter is perfectly sufficient. And it can be inside
#ifdef __KERNEL__ along with the kernel-internal structure definition.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
#ifndef I2C_ALGO_ITE_H
#define I2C_ALGO_ITE_H 1
-#include <linux/i2c.h>
+#include <linux/types.h>
/* Example of a sequential read request:
struct i2c_iic_msg s_msg;
char *buf; /* pointer to msg data */
};
+#ifdef __KERNEL__
+struct i2c_adapter;
+
struct i2c_algo_iic_data {
void *data; /* private data for lolevel routines */
void (*setiic) (void *data, int ctl, int val);
int i2c_iic_add_bus(struct i2c_adapter *);
int i2c_iic_del_bus(struct i2c_adapter *);
-
+#endif /* __KERNEL__ */
#endif /* I2C_ALGO_ITE_H */