diff options
41 files changed, 92 insertions, 304 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 1094edf0da17..7559c1ca56ba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -3193,6 +3193,7 @@ F: drivers/i2c/busses/i2c-stub.c | |||
| 3193 | I2C SUBSYSTEM | 3193 | I2C SUBSYSTEM |
| 3194 | M: "Jean Delvare (PC drivers, core)" <khali@linux-fr.org> | 3194 | M: "Jean Delvare (PC drivers, core)" <khali@linux-fr.org> |
| 3195 | M: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org> | 3195 | M: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org> |
| 3196 | M: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de> | ||
| 3196 | L: linux-i2c@vger.kernel.org | 3197 | L: linux-i2c@vger.kernel.org |
| 3197 | W: http://i2c.wiki.kernel.org/ | 3198 | W: http://i2c.wiki.kernel.org/ |
| 3198 | T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/ | 3199 | T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/ |
| @@ -4683,6 +4684,8 @@ Q: http://patchwork.kernel.org/project/linux-omap/list/ | |||
| 4683 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git | 4684 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git |
| 4684 | S: Maintained | 4685 | S: Maintained |
| 4685 | F: arch/arm/*omap*/ | 4686 | F: arch/arm/*omap*/ |
| 4687 | F: drivers/i2c/busses/i2c-omap.c | ||
| 4688 | F: include/linux/i2c-omap.h | ||
| 4686 | 4689 | ||
| 4687 | OMAP CLOCK FRAMEWORK SUPPORT | 4690 | OMAP CLOCK FRAMEWORK SUPPORT |
| 4688 | M: Paul Walmsley <paul@pwsan.com> | 4691 | M: Paul Walmsley <paul@pwsan.com> |
| @@ -5956,6 +5959,7 @@ L: davinci-linux-open-source@linux.davincidsp.com (subscribers-only) | |||
| 5956 | Q: http://patchwork.kernel.org/project/linux-davinci/list/ | 5959 | Q: http://patchwork.kernel.org/project/linux-davinci/list/ |
| 5957 | S: Supported | 5960 | S: Supported |
| 5958 | F: arch/arm/mach-davinci | 5961 | F: arch/arm/mach-davinci |
| 5962 | F: drivers/i2c/busses/i2c-davinci.c | ||
| 5959 | 5963 | ||
| 5960 | SIS 190 ETHERNET DRIVER | 5964 | SIS 190 ETHERNET DRIVER |
| 5961 | M: Francois Romieu <romieu@fr.zoreil.com> | 5965 | M: Francois Romieu <romieu@fr.zoreil.com> |
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index b6807db7b36f..e66d248fc126 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c | |||
| @@ -132,7 +132,8 @@ | |||
| 132 | #define ALI1535_SMBIO_EN 0x04 /* SMB I/O Space enable */ | 132 | #define ALI1535_SMBIO_EN 0x04 /* SMB I/O Space enable */ |
| 133 | 133 | ||
| 134 | static struct pci_driver ali1535_driver; | 134 | static struct pci_driver ali1535_driver; |
| 135 | static unsigned short ali1535_smba; | 135 | static unsigned long ali1535_smba; |
| 136 | static unsigned short ali1535_offset; | ||
| 136 | 137 | ||
| 137 | /* Detect whether a ALI1535 can be found, and initialize it, where necessary. | 138 | /* Detect whether a ALI1535 can be found, and initialize it, where necessary. |
| 138 | Note the differences between kernels with the old PCI BIOS interface and | 139 | Note the differences between kernels with the old PCI BIOS interface and |
| @@ -140,7 +141,7 @@ static unsigned short ali1535_smba; | |||
| 140 | defined to make the transition easier. */ | 141 | defined to make the transition easier. */ |
| 141 | static int __devinit ali1535_setup(struct pci_dev *dev) | 142 | static int __devinit ali1535_setup(struct pci_dev *dev) |
| 142 | { | 143 | { |
| 143 | int retval = -ENODEV; | 144 | int retval; |
| 144 | unsigned char temp; | 145 | unsigned char temp; |
| 145 | 146 | ||
| 146 | /* Check the following things: | 147 | /* Check the following things: |
| @@ -149,15 +150,28 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | |||
| 149 | - We can use the addresses | 150 | - We can use the addresses |
| 150 | */ | 151 | */ |
| 151 | 152 | ||
| 153 | retval = pci_enable_device(dev); | ||
| 154 | if (retval) { | ||
| 155 | dev_err(&dev->dev, "ALI1535_smb can't enable device\n"); | ||
| 156 | goto exit; | ||
| 157 | } | ||
| 158 | |||
| 152 | /* Determine the address of the SMBus area */ | 159 | /* Determine the address of the SMBus area */ |
| 153 | pci_read_config_word(dev, SMBBA, &ali1535_smba); | 160 | pci_read_config_word(dev, SMBBA, &ali1535_offset); |
| 154 | ali1535_smba &= (0xffff & ~(ALI1535_SMB_IOSIZE - 1)); | 161 | dev_dbg(&dev->dev, "ALI1535_smb is at offset 0x%04x\n", ali1535_offset); |
| 155 | if (ali1535_smba == 0) { | 162 | ali1535_offset &= (0xffff & ~(ALI1535_SMB_IOSIZE - 1)); |
| 163 | if (ali1535_offset == 0) { | ||
| 156 | dev_warn(&dev->dev, | 164 | dev_warn(&dev->dev, |
| 157 | "ALI1535_smb region uninitialized - upgrade BIOS?\n"); | 165 | "ALI1535_smb region uninitialized - upgrade BIOS?\n"); |
| 166 | retval = -ENODEV; | ||
| 158 | goto exit; | 167 | goto exit; |
| 159 | } | 168 | } |
| 160 | 169 | ||
| 170 | if (pci_resource_flags(dev, 0) & IORESOURCE_IO) | ||
| 171 | ali1535_smba = pci_resource_start(dev, 0) + ali1535_offset; | ||
| 172 | else | ||
| 173 | ali1535_smba = ali1535_offset; | ||
| 174 | |||
| 161 | retval = acpi_check_region(ali1535_smba, ALI1535_SMB_IOSIZE, | 175 | retval = acpi_check_region(ali1535_smba, ALI1535_SMB_IOSIZE, |
| 162 | ali1535_driver.name); | 176 | ali1535_driver.name); |
| 163 | if (retval) | 177 | if (retval) |
| @@ -165,8 +179,9 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | |||
| 165 | 179 | ||
| 166 | if (!request_region(ali1535_smba, ALI1535_SMB_IOSIZE, | 180 | if (!request_region(ali1535_smba, ALI1535_SMB_IOSIZE, |
| 167 | ali1535_driver.name)) { | 181 | ali1535_driver.name)) { |
| 168 | dev_err(&dev->dev, "ALI1535_smb region 0x%x already in use!\n", | 182 | dev_err(&dev->dev, "ALI1535_smb region 0x%lx already in use!\n", |
| 169 | ali1535_smba); | 183 | ali1535_smba); |
| 184 | retval = -EBUSY; | ||
| 170 | goto exit; | 185 | goto exit; |
| 171 | } | 186 | } |
| 172 | 187 | ||
| @@ -174,6 +189,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | |||
| 174 | pci_read_config_byte(dev, SMBCFG, &temp); | 189 | pci_read_config_byte(dev, SMBCFG, &temp); |
| 175 | if ((temp & ALI1535_SMBIO_EN) == 0) { | 190 | if ((temp & ALI1535_SMBIO_EN) == 0) { |
| 176 | dev_err(&dev->dev, "SMB device not enabled - upgrade BIOS?\n"); | 191 | dev_err(&dev->dev, "SMB device not enabled - upgrade BIOS?\n"); |
| 192 | retval = -ENODEV; | ||
| 177 | goto exit_free; | 193 | goto exit_free; |
| 178 | } | 194 | } |
| 179 | 195 | ||
| @@ -181,6 +197,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | |||
| 181 | pci_read_config_byte(dev, SMBHSTCFG, &temp); | 197 | pci_read_config_byte(dev, SMBHSTCFG, &temp); |
| 182 | if ((temp & 1) == 0) { | 198 | if ((temp & 1) == 0) { |
| 183 | dev_err(&dev->dev, "SMBus controller not enabled - upgrade BIOS?\n"); | 199 | dev_err(&dev->dev, "SMBus controller not enabled - upgrade BIOS?\n"); |
| 200 | retval = -ENODEV; | ||
| 184 | goto exit_free; | 201 | goto exit_free; |
| 185 | } | 202 | } |
| 186 | 203 | ||
| @@ -196,14 +213,13 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | |||
