aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/busses
AgeCommit message (Collapse)Author
2008-11-19debug-i2c-s3c2410-dump-stack-on-suspended-tranfer.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19Fix possible null pointer dereference in s3c24xx_i2c_resumeHolger Freyther
From 0b9bae6aed5268707b348e48a01411ba420844e1 Mon Sep 17 00:00:00 2001 From: Holger Freyther <zecke@openmoko.org> Date: Tue, 27 May 2008 14:41:35 +0200 Subject: [PATCH] [janitor] Fix possible null pointer dereference Judging by the control flow of the resume method i2c->suspended++ could lead to a null pointer dereference.
2008-11-19fix-i2c-s3c2410-resume-race.patchmokopatches
fix-i2c-s3c2410-resume-race.patch There is a nasty race between i2c-s3c2410 resume and resume of I2C driver and the client drivers -- the watchdog device actually gets to use the dead I2C bus before it is reinitialized by the I2C driver resume! This patch makes sure any customers get turned away until the shopkeeper has woken up. Signed-off-by: Andy Green <andy@openmoko.com>
2008-10-31i2c-s3c2410: Change IRQ to be plain integer.Ben Dooks
Change the code to use a plain integer as the holder for the IRQ for the device and use platform_get_irq() to find it. This makes the code slightly neater, and easier to get the IRQ number. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-31i2c-s3c2410: Allow more than one i2c-s3c2410 adapterBen Dooks
Newer SoCs such as the S3C6410 have 2 instances of this i2c controller block in and thus require the ability to create two seperate busses from this. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-31i2c-s3c2410: Remove default platform data.Ben Dooks
The platform data should now always be present when the device is initialised, so we can remove the default platform data in the driver. All the device initialisation points in the board specific code should already have been changed to initialise this as necessary. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-31i2c-s3c2410: Add ARCH_S3C64XX to allowed archsBen Dooks
The i2c-s3c2410 driver should be able to support the ARCH_S3C64XX as well as the ARCH_S3C2410. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-31i2c-s3c2410: Use platform data for gpio configurationBen Dooks
Add a callback to set the gpio configuration for the i2c device instead of a set include. This also allows the remvoal of the machine gpio and hardware files. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-31i2c-s3c2410: Fixup style problems from checkpatch.plBen Dooks
Fixup the 36 warnings and errors generated from running checkpatch.pl on the driver. The warnings are too numerous to be listed here. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-31i2c-s3c2410: Use <linux/io.h> over <asm/io.h>Ben Dooks
The <linux/io.h> include should be used in prefference to <asm/io.h>, so replace it. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-31i2c-s3c2410: fix check for being in suspend.Ben Dooks
As noted by Julia Lawall <julia@diku.dk>, we can never trigger the check for being in suspend due to the result of !readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN always being 0. Add suspend/resume hooks to stop i2c transactions happening until the driver has been resumed. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-31Merge branch 'master' of ↵Ben Dooks
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into s3c64xx
2008-10-30i2c-s3c2410: Correct use of ! and &Julia Lawall
In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. In particular, the result of !readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN is always 0. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E; constant C; @@ ( !E & !C | - !E & C + !(E & C) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-30scx200_i2c: Add missing class parameterLennart Sorensen
The scx200_i2c driver is missing the .class parameter, which means no i2c drivers are willing to probe for devices on the bus and attach to them. Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-30[ARM] S3C: Move i2c headers to arch/arm/plat-s3c/include/plat.Ben Dooks
Move the i2c headers to arch/arm/plat-s3c/include/plat ready to clean out the old include directories. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-23Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c: Add info->archdata field i2c: Inform about deprecated chips directory i2c: Use pci_ioremap_bar() Schedule removal of the legacy i2c device driver binding model i2c: Clean up <linux/i2c.h> i2c: Update and clean up writing-clients document i2c: Drop 2-byte address block transfer defines i2c: Delete legacy model documentation i2c: Constify i2c_get_clientdata's parameter i2c: Delete outdated client porting guide i2c: Make clear what the class field of i2c_adapter is good for i2c-algo-pcf: Fix typo in debugging log message i2c-algo-pcf: Add adapter hooks around xfer begin and end i2c-algo-pcf: Pass adapter data into ->waitforpin() method i2c-i801: Add support for Intel Ibex Peak
2008-10-22i2c: Use pci_ioremap_bar()Arjan van de Ven
Use the newly introduced pci_ioremap_bar() function in drivers/i2c. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c-algo-pcf: Pass adapter data into ->waitforpin() methodDavid Miller
Pass adapter data into ->waitforpin() method. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c-i801: Add support for Intel Ibex PeakSeth Heasley
Adds the Intel Ibex Peak (PCH) SMBus Controller Device IDs. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-21Merge commit 'origin' into masterBenjamin Herrenschmidt
Manual merge of: arch/powerpc/Kconfig arch/powerpc/include/asm/page.h
2008-10-20i2c-cpm: Suppress autoprobing for devicesWolfram Sang
Similar to commit 618b26d52843c0f85b8eb143cf2695d7f6fd072d, also remove automatic probing for this i2c controller. Might need updates to dts files using it. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Jochen Friedrich <jochen@scram.de> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-20PCI: Check dynids driver_data value for validityJean Delvare
Only accept dynids whose driver_data value matches one of the driver's pci_driver_id entries. This prevents the user from accidentally passing values the drivers do not expect. Cc: Milton Miller <miltonm@bga.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-10-20PCI: remove dynids.use_driver_dataMilton Miller
The driver flag dynids.use_driver_data is almost consistently not set, and causes more problems than it solves. It was initially intended as a flag to indicate whether a driver's usage of driver_data had been carefully inspected and was ready for values from userspace. That audit was never done, so most drivers just get a 0 for driver_data when new IDs are added from userspace via sysfs. So remove the flag, allowing drivers to see the data directly (a followon patch validates the passed driver_data value against what the drivers expect). Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-10-17hwmon: (ams) Convert to a new-style i2c driverJean Delvare
The legacy i2c binding model is phasing out, so the ams driver needs to be converted to a new-style i2c driver. Here is a naive approach of this conversion. Basically it is moving the i2c device creation from the ams driver to the i2c-powermac driver. This should work, but I suspect we could come up with something cleaner by declaring the i2c device as part of the platform setup. This could be done later by someone more familiar with openfirmware-based platforms than I am myself. One nice thing brought by this conversion is that the ams driver should be loaded automatically on systems where is is needed (at least when the I2C interface to the chip is used) providing coldplug-aware user-space environment. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Johannes Berg <johannes@sipsolutions.net> Cc: Stelian Pop <stelian@popies.net> Cc: Michael Hanselmann <linux-kernel@hansmi.ch> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-10-16Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (51 commits) [ARM] 5308/1: Fix Viper ISA IRQ handling [ARM] 5307/1: pxa: fix CM-X2XX PCMCIA build error [ARM] 5306/1: pxa: fix build error on CM-X270 [ARM] 5302/1: ARM: OMAP: Revert omap3 WDT changes to avoid merge conflict [ARM] 5305/1: ARM: OMAP: Fix compile of McBSP by removing unnecessary check [ARM] 5301/1: ARM: OMAP: Add missing irq defines ARM: OMAP3: Add default kernel config for OMAP LDP ARM: OMAP3: Add basic board support for OMAP LDP ARM: OMAP3: Defconfig for the Gumstix Overo board (rev 3) ARM: OMAP3: Add support for the Gumstix Overo board (rev 3) ARM: OMAP3: Add Beagle defconfig ARM: OMAP3: Add minimal Beagle board support ARM: OMAP3: Add minimal omap3430 support ARM: OMAP2: Fix sparse, checkpatch warnings in OMAP2/3 IRQ code ARM: OMAP: Fixes to omap_mcbsp_request function ARM: OMAP: Add support for OMAP2430 in McBSP ARM: OMAP: Add support for McBSP devices 3 - 5 on 34xx ARM: OMAP: Allocate McBSP devices dynamically Fix sections for omap-mcbsp platform driver [ARM] S3C24XX: Additional include moves ...
2008-10-15Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (158 commits) powerpc: Fix CHRP PCI config access for indirect_pci powerpc/chrp: Fix detection of Python PCI host bridge on IBM CHRPs powerpc: Fix 32-bit SMP boot on CHRP powerpc: Fix link errors on 32-bit machines using legacy DMA powerpc/pci: Improve detection of unassigned bridge resources hvc_console: Fix free_irq in spinlocked section powerpc: Get USE_STRICT_MM_TYPECHECKS working again powerpc: Reflect the used arguments in machine_init() prototype powerpc: Fix DMA offset for non-coherent DMA powerpc: fix fsl_upm nand driver modular build powerpc/83xx: add NAND support for the MPC8360E-RDK boards powerpc: FPGA support for GE Fanuc SBC610 i2c: MPC8349E-mITX Power Management and GPIO expander driver powerpc: reserve two DMA channels for audio in MPC8610 HPCD device tree powerpc: document the "fsl,ssi-dma-channel" compatible property powerpc: disable CHRP and PMAC support in various defconfigs OF: add fsl,mcu-mpc8349emitx to the exception list powerpc/83xx: add DS1374 RTC support for the MPC837xE-MDS boards powerpc: remove support for bootmem-allocated memory for the DIU driver powerpc: remove non-dependent load fsl_booke PTE_64BIT ...
2008-10-15Merge commit 'origin'Benjamin Herrenschmidt
Manual fixup of conflicts on: arch/powerpc/include/asm/dcr-regs.h drivers/net/ibm_newemac/core.h
2008-10-14Merge branch 's3c-move' into develRussell King
Conflicts: arch/arm/mach-versatile/core.c
2008-10-14Merge branch 'omap-all' into develRussell King
Conflicts: arch/arm/mach-omap2/gpmc.c arch/arm/mach-omap2/irq.c
2008-10-14i2c-viapro: Add support for SMBus Process Call transactionsPrakash Mortha
Add support for SMBus Process Call transactions. These are combined word write, word read transactions. Signed-off-by: Prakash Mortha <pmortha@escient.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c: Only build Tyan SMBus mux drivers on x86Jean Delvare
The two Tyan SMBus mux drivers (i2c-amd756-s4882 and i2c-nforce2-s4985) are only useful on specific x86 motherboards, so there is no point in letting them be built on other architectures. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c-parport-light: Don't register a platform device resourceJean Delvare
The i2c-parport-light driver isn't a real platform driver, so it should not instantiate platform devices with resources. The resource management system can't cope with colliding resources, and we are likely to create such a colliding resource. So, better just try to grab the I/O ports we need right at module initialization time, and bail out if we can't. It has the added benefit that the module will no longer load if it isn't going to work, which is definitely more user-friendly. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c-viapro: Add VX800/VX820 supportRudolf Marek
Thanks to new datasheets published on http://linux.via.com.tw we can now add support for VX800/VX820 chipsets. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c: Renesas Highlander FPGA SMBus supportPaul Mundt
This adds support for the SMBus adapter found in the various FPGAs on the Renesas Highlander platforms. Particularly the R0P7780LC0011RL and R0P7785LC0011RL FPGAs. Functionality is fairly restricted, in that only byte and block data transfers are supported. Normal/fast mode and IRQ/polling are also supported. Primarily used for various RTCs and thermal sensors. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c-pca-isa: Don't grab arbitrary resourcesRene Herman
Grabbing ISA bus resources without anything or anyone telling us we should can break boot on randconfig/allyesconfig builds by keeping resources that are in fact owned by different hardware busy and does as reported by Ingo Molnar. Generally it's also dangerous to just poke at random I/O ports and especially those in the range where other old easily confused ISA hardware might live. For this specialized I2C bus driver, insist that the user specifies the resources before grabbing them. The^WA user of this driver is a one time echo "options i2c-pca-isa base=0x330 irq=10" >> /etc/modprobe.conf away from the old behaviour. Signed-off-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-11Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (236 commits) [ARM] 5300/1: fixup spitz reset during boot [ARM] 5295/1: make ZONE_DMA optional [ARM] 5239/1: Palm Zire 72 power management support [ARM] 5298/1: Drop desc_handle_irq() [ARM] 5297/1: [KS8695] Fix two compile-time warnings [ARM] 5296/1: [KS8695] Replace macro's with trailing underscores. [ARM] pxa: allow multi-machine PCMCIA builds [ARM] pxa: add preliminary CPUFREQ support for PXA3xx [ARM] pxa: add missing ACCR bit definitions to pxa3xx-regs.h [ARM] pxa: rename cpu-pxa.c to cpufreq-pxa2xx.c [ARM] pxa/zylonite: add support for USB OHCI [ARM] ohci-pxa27x: use ioremap() and offset for register access [ARM] ohci-pxa27x: introduce pxa27x_clear_otgph() [ARM] ohci-pxa27x: use platform_get_{irq,resource} for the resource [ARM] ohci-pxa27x: move OHCI controller specific registers into the driver [ARM] ohci-pxa27x: introduce flags to avoid direct access to OHCI registers [ARM] pxa: move I2S register and bit definitions into pxa2xx-i2s.c [ARM] pxa: simplify DMA register definitions [ARM] pxa: make additional DCSR bits valid for PXA3xx [ARM] pxa: move i2c register and bit definitions into i2c-pxa.c ... Fixed up conflicts in arch/arm/mach-versatile/core.c sound/soc/pxa/pxa2xx-ac97.c sound/soc/pxa/pxa2xx-i2s.c manually.
2008-10-08i2c-mpc: suppress I2C device probingWolfgang Grandegger
This patch suppresses I2C device probing by clearing the class field of the "struct i2c_adapter" for the MPC I2C bus adapters. Some board configurations which rely on probing must be fixed up by adding a proper I2C device node to the DTS file, like the TQM85xx modules. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-10-07[ARM] pxa: move i2c register and bit definitions into i2c-pxa.cEric Miao
Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-07Merge branches 'pxa-core' and 'pxa-machines' into pxa-allRussell King
Conflicts: arch/arm/mach-pxa/Kconfig arch/arm/mach-pxa/pxa25x.c arch/arm/mach-pxa/pxa27x.c
2008-10-03[ARM] 5278/1: i2c-pxa fast mode supportJonathan Cameron
Add fast_mode option to i2c_pxa_platform_data and use it to set the ICR_FM bit appropriately when i2c_pxa_reset is called. Parameter called fast_mode rather than frequency as this driver is also used for the i2c_pxa_pwr bus which has different normal and fast frequencies. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-24i2c-powermac: Fix section for probe and remove functionsUwe Kleine-Koenig
__devexit for i2c_powermac_probe is obviously wrong. In the definition of struct platform_driver i2c_powermac_driver the remove function i2c_powermac_remove is wrapped in __devexit_p, so it should be defined using __devexit. Signed-off-by: Uwe Kleine-Koenig <ukleinek@informatik.uni-freiburg.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-09-23powerpc: convert CONFIG_PPC_MERGE to CONFIG_PPC for legacy io checksKumar Gala
Now that arch/ppc is dead CONFIG_PPC_MERGE is always defined for all powerpc platforms and we want to get rid of CONFIG_PPC_MERGE use CONFIG_PPC instead. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-09[I2C] pxa: provide late suspend and early resume hooksRussell King
Properly hook the I2C driver into the PM code; the previous fix for this (ece5f7b3c4fde70a1ae4add7372ebca5c90bc34d) worked around the platform where I2C is required to be available early during resume. It has been found to be sufficient to use the early resume hook for this function, so the original hack can die. Leave the hack in place for the PIO transfer handler though. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-09[ARM] 5203/1: i2c-pxa: fix scheduling while atomic in i2c_pxa_abort()Dmitry Baryshkov
i2c_pxa_abort can be called from the atomic context. Change it to use mdelay and counted loop. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-09[ARM] 5201/1: PXA3xx: Add support for power i2c busMike Rapoport
Add power I2C support for PXA3xx processors Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-05[ARM] omap: convert OMAP drivers to use ioremap()Russell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-05i2c: fix i2c-sh_mobile timing issuesMagnus Damm
This patch teaches the i2c-sh_mobile driver to make use of wait irqs. Without this patch only dte irqs are used which may lead to overruns and cases of missing stop and extra bytes being read on the i2c bus. Use of wait irqs forces the hardware to pause and wait until the cpu is ready. Polling is also reworked in this patch to fix ms delay issues. Verified with bus analyzer and tested on MigoR and AP325RXA boards. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-23removed unused #include <linux/version.h>'sAdrian Bunk
This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-10i2c: Fix oops on bus multiplexer driver loadingJean Delvare
The two I2C bus multiplexer drivers (i2c-amd756-s4882 and i2c-nforce2-s4985) make use of the bus they want to multiplex before checking if it is really present. Swap the instructions to test for presence first. This fixes a oops reported by Ingo Molnar. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ingo Molnar <mingo@elte.hu>
2008-08-07[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King
This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>