diff options
-rw-r--r-- | drivers/i2c/busses/i2c-sibyte.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c index 503a134ec803..8fbbdb4c2f35 100644 --- a/drivers/i2c/busses/i2c-sibyte.c +++ b/drivers/i2c/busses/i2c-sibyte.c | |||
@@ -36,14 +36,6 @@ struct i2c_algo_sibyte_data { | |||
36 | /* ----- global defines ----------------------------------------------- */ | 36 | /* ----- global defines ----------------------------------------------- */ |
37 | #define SMB_CSR(a,r) ((long)(a->reg_base + r)) | 37 | #define SMB_CSR(a,r) ((long)(a->reg_base + r)) |
38 | 38 | ||
39 | /* ----- global variables --------------------------------------------- */ | ||
40 | |||
41 | /* module parameters: | ||
42 | */ | ||
43 | static int bit_scan; /* have a look at what's hanging 'round */ | ||
44 | module_param(bit_scan, int, 0); | ||
45 | MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus"); | ||
46 | |||
47 | 39 | ||
48 | static int smbus_xfer(struct i2c_adapter *i2c_adap, u16 addr, | 40 | static int smbus_xfer(struct i2c_adapter *i2c_adap, u16 addr, |
49 | unsigned short flags, char read_write, | 41 | unsigned short flags, char read_write, |
@@ -140,9 +132,8 @@ static const struct i2c_algorithm i2c_sibyte_algo = { | |||
140 | /* | 132 | /* |
141 | * registering functions to load algorithms at runtime | 133 | * registering functions to load algorithms at runtime |
142 | */ | 134 | */ |
143 | int i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed) | 135 | int __init i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed) |
144 | { | 136 | { |
145 | int i; | ||
146 | struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data; | 137 | struct i2c_algo_sibyte_data *adap = i2c_adap->algo_data; |
147 | 138 | ||
148 | /* register new adapter to i2c module... */ | 139 | /* register new adapter to i2c module... */ |
@@ -152,24 +143,6 @@ int i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed) | |||
152 | csr_out32(speed, SMB_CSR(adap,R_SMB_FREQ)); | 143 | csr_out32(speed, SMB_CSR(adap,R_SMB_FREQ)); |
153 | csr_out32(0, SMB_CSR(adap,R_SMB_CONTROL)); | 144 | csr_out32(0, SMB_CSR(adap,R_SMB_CONTROL)); |
154 | 145 | ||
155 | /* scan bus */ | ||
156 | if (bit_scan) { | ||
157 | union i2c_smbus_data data; | ||
158 | int rc; | ||
159 | printk(KERN_INFO " i2c-algo-sibyte.o: scanning bus %s.\n", | ||
160 | i2c_adap->name); | ||
161 | for (i = 0x00; i < 0x7f; i++) { | ||
162 | /* XXXKW is this a realistic probe? */ | ||
163 | rc = smbus_xfer(i2c_adap, i, 0, I2C_SMBUS_READ, 0, | ||
164 | I2C_SMBUS_BYTE_DATA, &data); | ||
165 | if (!rc) { | ||
166 | printk("(%02x)",i); | ||
167 | } else | ||
168 | printk("."); | ||
169 | } | ||
170 | printk("\n"); | ||
171 | } | ||
172 | |||
173 | return i2c_add_adapter(i2c_adap); | 146 | return i2c_add_adapter(i2c_adap); |
174 | } | 147 | } |
175 | 148 | ||