aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-at91.c7
-rw-r--r--drivers/i2c/busses/i2c-pxa.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index f35156c58922..9c8b6d5eaec9 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/version.h> 17#include <linux/version.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/err.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
20#include <linux/types.h> 21#include <linux/types.h>
21#include <linux/delay.h> 22#include <linux/delay.h>
@@ -226,13 +227,14 @@ static int __devinit at91_i2c_probe(struct platform_device *pdev)
226 adapter->algo = &at91_algorithm; 227 adapter->algo = &at91_algorithm;
227 adapter->class = I2C_CLASS_HWMON; 228 adapter->class = I2C_CLASS_HWMON;
228 adapter->dev.parent = &pdev->dev; 229 adapter->dev.parent = &pdev->dev;
230 /* adapter->id == 0 ... only one TWI controller for now */
229 231
230 platform_set_drvdata(pdev, adapter); 232 platform_set_drvdata(pdev, adapter);
231 233
232 clk_enable(twi_clk); /* enable peripheral clock */ 234 clk_enable(twi_clk); /* enable peripheral clock */
233 at91_twi_hwinit(); /* initialize TWI controller */ 235 at91_twi_hwinit(); /* initialize TWI controller */
234 236
235 rc = i2c_add_adapter(adapter); 237 rc = i2c_add_numbered_adapter(adapter);
236 if (rc) { 238 if (rc) {
237 dev_err(&pdev->dev, "Adapter %s registration failed\n", 239 dev_err(&pdev->dev, "Adapter %s registration failed\n",
238 adapter->name); 240 adapter->name);
@@ -295,6 +297,9 @@ static int at91_i2c_resume(struct platform_device *pdev)
295#define at91_i2c_resume NULL 297#define at91_i2c_resume NULL
296#endif 298#endif
297 299
300/* work with "modprobe at91_i2c" from hotplugging or coldplugging */
301MODULE_ALIAS("at91_i2c");
302
298static struct platform_driver at91_i2c_driver = { 303static struct platform_driver at91_i2c_driver = {
299 .probe = at91_i2c_probe, 304 .probe = at91_i2c_probe,
300 .remove = __devexit_p(at91_i2c_remove), 305 .remove = __devexit_p(at91_i2c_remove),
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 873544ab598e..8a0a99b93641 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -548,7 +548,7 @@ static inline void i2c_pxa_stop_message(struct pxa_i2c *i2c)
548 */ 548 */
549 icr = readl(_ICR(i2c)); 549 icr = readl(_ICR(i2c));
550 icr &= ~(ICR_STOP | ICR_ACKNAK); 550 icr &= ~(ICR_STOP | ICR_ACKNAK);
551 writel(icr, _IRC(i2c)); 551 writel(icr, _ICR(i2c));
552} 552}
553 553
554/* 554/*