aboutsummaryrefslogtreecommitdiffstats
path: root/bttv/experimental/algo-bit.h
diff options
context:
space:
mode:
Diffstat (limited to 'bttv/experimental/algo-bit.h')
-rw-r--r--bttv/experimental/algo-bit.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/bttv/experimental/algo-bit.h b/bttv/experimental/algo-bit.h
new file mode 100644
index 0000000..0cd97d8
--- /dev/null
+++ b/bttv/experimental/algo-bit.h
@@ -0,0 +1,38 @@
+#ifndef ALGO_BIT_H
+#define AGLO_BIT_H 1
+
+/* --- Defines for bit-adapters --------------------------------------- */
+#include "i2c.h"
+/*
+ * This struct contains the hw-dependent functions of bit-style adapters to
+ * manipulate the line states, and to init any hw-specific features. This is
+ * only used if you have more than one hw-type of adapter running.
+ */
+struct bit_adapter {
+ char *name; /* give it a nice name */
+ unsigned int id; /* not used yet, maybe later */
+ void *data; /* private data for lolevel routines */
+ void (*setsda) (void *data, int state);
+ void (*setscl) (void *data, int state);
+ int (*getsda) (void *data);
+ int (*getscl) (void *data);
+
+ /* administrative calls */
+ int (*client_register)(struct i2c_client *);
+ int (*client_unregister)(struct i2c_client *);
+
+ /* local settings */
+ int udelay;
+ int mdelay;
+ int timeout;
+
+};
+
+extern struct bit_adapter *bit_adaps[];
+
+#define BIT_ADAP_MAX 16
+
+int i2c_bit_register_bus(struct bit_adapter *);
+int i2c_bit_unregister_bus(struct bit_adapter *);
+
+#endif /* ALGO_BIT_H */

Privacy Policy