24 #include <linux/kernel.h>
25 #include <linux/module.h>
26 #include <linux/pci.h>
27 #include <linux/types.h>
28 #include <linux/i2c.h>
35 #define HYDRA_CPD_PD0 0x00000001
36 #define HYDRA_CPD_PD1 0x00000002
37 #define HYDRA_CPD_PD2 0x00000004
38 #define HYDRA_CPD_PD3 0x00000008
40 #define HYDRA_SCLK HYDRA_CPD_PD0
41 #define HYDRA_SDAT HYDRA_CPD_PD1
42 #define HYDRA_SCLK_OE 0x00000010
43 #define HYDRA_SDAT_OE 0x00000020
48 writel(val, &hydra->CachePD);
51 static inline u32 pdregr(
void *
data)
54 return readl(&hydra->CachePD);
57 static void hydra_bit_setscl(
void *
data,
int state)
69 static void hydra_bit_setsda(
void *data,
int state)
71 u32 val = pdregr(data);
81 static int hydra_bit_getscl(
void *data)
86 static int hydra_bit_getsda(
void *data)
94 .setsda = hydra_bit_setsda,
95 .setscl = hydra_bit_setscl,
96 .getsda = hydra_bit_getsda,
97 .getscl = hydra_bit_getscl,
105 .algo_data = &hydra_bit_data,
131 pdregw(hydra_bit_data.
data, 0);
132 hydra_adap.
dev.parent = &dev->
dev;
144 pdregw(hydra_bit_data.
data, 0);
153 .name =
"hydra_smbus",
154 .id_table = hydra_ids,
155 .probe = hydra_probe,