diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:20:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:20:10 -0400 |
commit | c6799ade4ae04b53a5f677e5289116155ff01574 (patch) | |
tree | 3601b5e2387e39d62c207e4268c6cc5c68f2a364 /drivers/i2c | |
parent | b7405e16435f710edfae6ba32bef4ca20d3de145 (diff) | |
parent | 5cd47155155a32e5b944ac9fc3f3dc578e429aa0 (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: (82 commits)
[ARM] Add comments marking in-use ptrace numbers
[ARM] Move syscall saving out of the way of utrace
[ARM] 4360/1: S3C24XX: regs-udc.h remove unused macro
[ARM] 4358/1: S3C24XX: mach-qt2410.c: remove linux/mmc/protocol.h header
[ARM] mm 10: allow memory type to be specified with ioremap
[ARM] mm 9: add additional device memory types
[ARM] mm 8: define mem_types table L1 bit 4 to be for ARMv6
[ARM] iop: add missing parens in macro
[ARM] mm 7: remove duplicated __ioremap() prototypes
ARM: OMAP: fix OMAP1 mpuio suspend/resume oops
ARM: OMAP: MPUIO wake updates
ARM: OMAP: speed up gpio irq handling
ARM: OMAP: plat-omap changes for 2430 SDP
ARM: OMAP: gpio object shrinkage, cleanup
ARM: OMAP: /sys/kernel/debug/omap_gpio
ARM: OMAP: Implement workaround for GPIO wakeup bug in OMAP2420 silicon
ARM: OMAP: Enable 24xx GPIO autoidling
[ARM] 4318/2: DSM-G600 Board Support
[ARM] 4227/1: minor head.S fixups
[ARM] 4328/1: Move i.MX UART regs to driver
...
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index c059b27fa881..873544ab598e 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -852,9 +852,7 @@ static int i2c_pxa_probe(struct platform_device *dev) | |||
852 | { | 852 | { |
853 | struct pxa_i2c *i2c = &i2c_pxa; | 853 | struct pxa_i2c *i2c = &i2c_pxa; |
854 | struct resource *res; | 854 | struct resource *res; |
855 | #ifdef CONFIG_I2C_PXA_SLAVE | ||
856 | struct i2c_pxa_platform_data *plat = dev->dev.platform_data; | 855 | struct i2c_pxa_platform_data *plat = dev->dev.platform_data; |
857 | #endif | ||
858 | int ret; | 856 | int ret; |
859 | int irq; | 857 | int irq; |
860 | 858 | ||
@@ -902,14 +900,14 @@ static int i2c_pxa_probe(struct platform_device *dev) | |||
902 | pxa_gpio_mode(GPIO117_I2CSCL_MD); | 900 | pxa_gpio_mode(GPIO117_I2CSCL_MD); |
903 | pxa_gpio_mode(GPIO118_I2CSDA_MD); | 901 | pxa_gpio_mode(GPIO118_I2CSDA_MD); |
904 | #endif | 902 | #endif |
905 | pxa_set_cken(CKEN14_I2C, 1); | 903 | pxa_set_cken(CKEN_I2C, 1); |
906 | break; | 904 | break; |
907 | #ifdef CONFIG_PXA27x | 905 | #ifdef CONFIG_PXA27x |
908 | case 1: | 906 | case 1: |
909 | local_irq_disable(); | 907 | local_irq_disable(); |
910 | PCFR |= PCFR_PI2CEN; | 908 | PCFR |= PCFR_PI2CEN; |
911 | local_irq_enable(); | 909 | local_irq_enable(); |
912 | pxa_set_cken(CKEN15_PWRI2C, 1); | 910 | pxa_set_cken(CKEN_PWRI2C, 1); |
913 | #endif | 911 | #endif |
914 | } | 912 | } |
915 | 913 | ||
@@ -924,6 +922,10 @@ static int i2c_pxa_probe(struct platform_device *dev) | |||
924 | i2c->adap.algo_data = i2c; | 922 | i2c->adap.algo_data = i2c; |
925 | i2c->adap.dev.parent = &dev->dev; | 923 | i2c->adap.dev.parent = &dev->dev; |
926 | 924 | ||
925 | if (plat) { | ||
926 | i2c->adap.class = plat->class; | ||
927 | } | ||
928 | |||
927 | ret = i2c_add_adapter(&i2c->adap); | 929 | ret = i2c_add_adapter(&i2c->adap); |
928 | if (ret < 0) { | 930 | if (ret < 0) { |
929 | printk(KERN_INFO "I2C: Failed to add bus\n"); | 931 | printk(KERN_INFO "I2C: Failed to add bus\n"); |
@@ -946,11 +948,11 @@ eadapt: | |||
946 | ereqirq: | 948 | ereqirq: |
947 | switch (dev->id) { | 949 | switch (dev->id) { |
948 | case 0: | 950 | case 0: |
949 | pxa_set_cken(CKEN14_I2C, 0); | 951 | pxa_set_cken(CKEN_I2C, 0); |
950 | break; | 952 | break; |
951 | #ifdef CONFIG_PXA27x | 953 | #ifdef CONFIG_PXA27x |
952 | case 1: | 954 | case 1: |
953 | pxa_set_cken(CKEN15_PWRI2C, 0); | 955 | pxa_set_cken(CKEN_PWRI2C, 0); |
954 | local_irq_disable(); | 956 | local_irq_disable(); |
955 | PCFR &= ~PCFR_PI2CEN; | 957 | PCFR &= ~PCFR_PI2CEN; |
956 | local_irq_enable(); | 958 | local_irq_enable(); |
@@ -973,11 +975,11 @@ static int i2c_pxa_remove(struct platform_device *dev) | |||
973 | free_irq(i2c->irq, i2c); | 975 | free_irq(i2c->irq, i2c); |
974 | switch (dev->id) { | 976 | switch (dev->id) { |
975 | case 0: | 977 | case 0: |
976 | pxa_set_cken(CKEN14_I2C, 0); | 978 | pxa_set_cken(CKEN_I2C, 0); |
977 | break; | 979 | break; |
978 | #ifdef CONFIG_PXA27x | 980 | #ifdef CONFIG_PXA27x |
979 | case 1: | 981 | case 1: |
980 | pxa_set_cken(CKEN15_PWRI2C, 0); | 982 | pxa_set_cken(CKEN_PWRI2C, 0); |
981 | local_irq_disable(); | 983 | local_irq_disable(); |
982 | PCFR &= ~PCFR_PI2CEN; | 984 | PCFR &= ~PCFR_PI2CEN; |
983 | local_irq_enable(); | 985 | local_irq_enable(); |