aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
AgeCommit message (Collapse)Author
2008-11-19pcf50633-suspend-hacks.patchmokopatches
2008-11-19pcf50633.patchmokopatches
2008-11-19i2c-permit_invalid_addrs.patchmokopatches
We need this stupid workaround since our amplifier chip uses a 'reserved' I2C address Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-11-19gta01-pcf50606.patchmokopatches
This is a NXP PCF50606 power management unit driver. The PCF50606 is used in the FIC/OpenMoko Neo1973 GTA01 GSM phone. Signed-off-by: Harald Welte <laforge@openmoko.org>
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: Add info->archdata fieldAnton Vorontsov
If present the info->archdata is copied into the dev->archdata. Some (OpenFirmware) platforms need it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c: Inform about deprecated chips directoryWolfram Sang
The chips directory under drivers/i2c is deprecated. Spread the word! Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
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: Fix typo in debugging log messageDavid Miller
Fix typo in debugging log message. deteted --> detected Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c-algo-pcf: Add adapter hooks around xfer begin and endDavid Miller
Some I2C bus implementations need to synchronize with external entities, such as system firmware, which might also be programming the same I2C bus. In order to facilitate this add ->xfer_begin() and ->xfer_end() hooks which are invoked around pcf_xfer(). [JD: Make these hooks optional.] Signed-off-by: David S. Miller <davem@davemloft.net> 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-20x86: sysfs: kill owner field from attributeParag Warudkar
Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs attribute->owner unnecessary. But the field was left in the structure to ease the merge. It's been over a year since that change and it is now time to start killing attribute->owner along with its users - one arch at a time! This patch is attempt #1 to get rid of attribute->owner only for CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on as and when possible - avr32 will be the next since that is something I can test. Compile (make allyesconfig / make allmodconfig / custom config) and boot tested. akpm: the idea is that we put the declaration of sttribute.owner inside `#ifndef CONFIG_X86'. But that proved to be too ambitious for now because new usages kept on turning up in subsystem trees. [akpm: remove the ifdef for now] Signed-off-by: Parag Warudkar <parag.lkml@gmail.com> Cc: Greg KH <greg@kroah.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Tejun Heo <htejun@gmail.com> Cc: Len Brown <lenb@kernel.org> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: David Brownell <david-b@pacbell.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20i2c: use bcd2bin/bin2bcdAdrian Bunk
Change i2c to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD2BIN/BIN2BCD macros. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.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 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits) UIO: Fix mapping of logical and virtual memory UIO: add automata sercos3 pci card support UIO: Change driver name of uio_pdrv UIO: Add alignment warnings for uio-mem Driver core: add bus_sort_breadthfirst() function NET: convert the phy_device file to use bus_find_device_by_name kobject: Cleanup kobject_rename and !CONFIG_SYSFS kobject: Fix kobject_rename and !CONFIG_SYSFS sysfs: Make dir and name args to sysfs_notify() const platform: add new device registration helper sysfs: use ilookup5() instead of ilookup5_nowait() PNP: create device attributes via default device attributes Driver core: make bus_find_device_by_name() more robust usb: turn dev_warn+WARN_ON combos into dev_WARN debug: use dev_WARN() rather than WARN_ON() in device_pm_add() debug: Introduce a dev_WARN() function sysfs: fix deadlock device model: Do a quickcheck for driver binding before doing an expensive check Driver core: Fix cleanup in device_create_vargs(). Driver core: Clarify device cleanup. ...
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-16device create: misc: convert device_create_drvdata to device_createGreg Kroah-Hartman
Now that device_create() has been audited, rename things back to the original call to be sane. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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: Restore i2c_smbus_process_call functionPrakash Mortha
Restore the i2c_smbus_process_call() as one driver (for the Micronas MAP5401) will need it soon. [JD: Update documentation accordingly.] Signed-off-by: Prakash Mortha <pmortha@escient.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c: Do earlier driver model initDavid Brownell
Move I2C driver model init earlier in the boot sequence. This avoids oopsing in statically linked systems when some subsystems register I2C drivers in subsys_initcall() code, but those subsystems are linked (and initialized) before I2C. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> 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: Guard against oopses from bad init sequencesDavid Brownell
Guard I2C against oopsing because of init sequence problems, by verifying that i2c_init() has been called before calling any routines that rely on that initialization. This specific test just requires that bus_register(&i2c_bus_type) was called. Examples of this kind of oopsing come from subystems and drivers which register I2C drivers in their subsys_initcall code but which are statically linked before I2C by drivers/Makefile. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> 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/tps65010: Vibrator hookup to gpiolibMarek Vasut
All the tps6501{0,1,2,3,4} chips have a signal for hooking up with a vibrator (for non-auditory cell phone "ring") ... expose that as one more (output-only) GPIO. [ dbrownell@users.sourceforge.net: comments; list tps65014 too ] Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> 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-14i2c/isp1301_omap: Convert to a new-style i2c driver, part 2Jean Delvare
Based on David Brownell's patch for tps65010 and previous work by Felipe Balbi, this patch finishes converting isp1301_omap to a new-style i2c driver. There's definitely room for further drivers cleanups, but these are out of the scope of this patch. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Tony Lindgren <tony@atomide.com>