diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
commit | 2cf4d4514d5b43c1f3b64bd0ec8b9853bde8f1dc (patch) | |
tree | e35a625496acc6ac852846d40b8851186b9d1ac4 /drivers/i2c | |
parent | 44b7532b8b464f606053562400719c9c21276037 (diff) | |
parent | ce53895a5d24e0ee19fb92f56c17323fb4c9ab27 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
MAINTAINERS: EB110ATX is not ebsa110
MAINTAINERS: update Eric Miao's email address and status
fb: add support of LCD display controller on pxa168/910 (base layer)
[ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
[ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
[ARM] 5544/1: Trust PrimeCell resource sizes
[ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
[ARM] pxa/sharpsl_pm: drop set_irq_type calls
[ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
[ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
[ARM] sa1100: remove unused collie_pm.c
[ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
[ARM] 5550/1: Add default configure file for w90p910 platform
[ARM] 5549/1: Add clock api for w90p910 platform.
[ARM] 5548/1: Add gpio api for w90p910 platform
[ARM] 5551/1: Add multi-function pin api for w90p910 platform.
[ARM] Make ARM_VIC_NR depend on ARM_VIC
[ARM] 5546/1: ARM PL022 SSP/SPI driver v3
ARM: OMAP4: SMP: Update defconfig for OMAP4430
ARM: OMAP4: SMP: Enable SMP support for OMAP4430
...
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index acc7143d9655..035a6c7e59df 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -34,10 +34,24 @@ | |||
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/clk.h> | 35 | #include <linux/clk.h> |
36 | 36 | ||
37 | #include <mach/hardware.h> | ||
38 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
39 | #include <asm/io.h> | 38 | #include <asm/io.h> |
40 | #include <mach/i2c.h> | 39 | #include <plat/i2c.h> |
40 | |||
41 | /* | ||
42 | * I2C register offsets will be shifted 0 or 1 bit left, depending on | ||
43 | * different SoCs | ||
44 | */ | ||
45 | #define REG_SHIFT_0 (0 << 0) | ||
46 | #define REG_SHIFT_1 (1 << 0) | ||
47 | #define REG_SHIFT(d) ((d) & 0x1) | ||
48 | |||
49 | static const struct platform_device_id i2c_pxa_id_table[] = { | ||
50 | { "pxa2xx-i2c", REG_SHIFT_1 }, | ||
51 | { "pxa3xx-pwri2c", REG_SHIFT_0 }, | ||
52 | { }, | ||
53 | }; | ||
54 | MODULE_DEVICE_TABLE(platform, i2c_pxa_id_table); | ||
41 | 55 | ||
42 | /* | 56 | /* |
43 | * I2C registers and bit definitions | 57 | * I2C registers and bit definitions |
@@ -985,6 +999,7 @@ static int i2c_pxa_probe(struct platform_device *dev) | |||
985 | struct pxa_i2c *i2c; | 999 | struct pxa_i2c *i2c; |
986 | struct resource *res; | 1000 | struct resource *res; |
987 | struct i2c_pxa_platform_data *plat = dev->dev.platform_data; | 1001 | struct i2c_pxa_platform_data *plat = dev->dev.platform_data; |
1002 | struct platform_device_id *id = platform_get_device_id(dev); | ||
988 | int ret; | 1003 | int ret; |
989 | int irq; | 1004 | int irq; |
990 | 1005 | ||
@@ -1028,7 +1043,7 @@ static int i2c_pxa_probe(struct platform_device *dev) | |||
1028 | ret = -EIO; | 1043 | ret = -EIO; |
1029 | goto eremap; | 1044 | goto eremap; |
1030 | } | 1045 | } |
1031 | i2c->reg_shift = (cpu_is_pxa3xx() && (dev->id == 1)) ? 0 : 1; | 1046 | i2c->reg_shift = REG_SHIFT(id->driver_data); |
1032 | 1047 | ||
1033 | i2c->iobase = res->start; | 1048 | i2c->iobase = res->start; |
1034 | i2c->iosize = res_len(res); | 1049 | i2c->iosize = res_len(res); |
@@ -1150,6 +1165,7 @@ static struct platform_driver i2c_pxa_driver = { | |||
1150 | .name = "pxa2xx-i2c", | 1165 | .name = "pxa2xx-i2c", |
1151 | .owner = THIS_MODULE, | 1166 | .owner = THIS_MODULE, |
1152 | }, | 1167 | }, |
1168 | .id_table = i2c_pxa_id_table, | ||
1153 | }; | 1169 | }; |
1154 | 1170 | ||
1155 | static int __init i2c_adap_pxa_init(void) | 1171 | static int __init i2c_adap_pxa_init(void) |