aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-at91.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-at91.c')
-rw-r--r--drivers/i2c/busses/i2c-at91.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index f35156c58922..1dcb714af55a 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -226,13 +226,14 @@ static int __devinit at91_i2c_probe(struct platform_device *pdev)
226 adapter->algo = &at91_algorithm; 226 adapter->algo = &at91_algorithm;
227 adapter->class = I2C_CLASS_HWMON; 227 adapter->class = I2C_CLASS_HWMON;
228 adapter->dev.parent = &pdev->dev; 228 adapter->dev.parent = &pdev->dev;
229 /* adapter->id == 0 ... only one TWI controller for now */
229 230
230 platform_set_drvdata(pdev, adapter); 231 platform_set_drvdata(pdev, adapter);
231 232
232 clk_enable(twi_clk); /* enable peripheral clock */ 233 clk_enable(twi_clk); /* enable peripheral clock */
233 at91_twi_hwinit(); /* initialize TWI controller */ 234 at91_twi_hwinit(); /* initialize TWI controller */
234 235
235 rc = i2c_add_adapter(adapter); 236 rc = i2c_add_numbered_adapter(adapter);
236 if (rc) { 237 if (rc) {
237 dev_err(&pdev->dev, "Adapter %s registration failed\n", 238 dev_err(&pdev->dev, "Adapter %s registration failed\n",
238 adapter->name); 239 adapter->name);
@@ -295,6 +296,9 @@ static int at91_i2c_resume(struct platform_device *pdev)
295#define at91_i2c_resume NULL 296#define at91_i2c_resume NULL
296#endif 297#endif
297 298
299/* work with "modprobe at91_i2c" from hotplugging or coldplugging */
300MODULE_ALIAS("at91_i2c");
301
298static struct platform_driver at91_i2c_driver = { 302static struct platform_driver at91_i2c_driver = {
299 .probe = at91_i2c_probe, 303 .probe = at91_i2c_probe,
300 .remove = __devexit_p(at91_i2c_remove), 304 .remove = __devexit_p(at91_i2c_remove),