1. 05 May, 2007 18 commits
  2. 04 May, 2007 9 commits
  3. 01 May, 2007 13 commits
    • Ben Dooks's avatar
      i2c-s3c2410: Fix bug in releasing driver · 5b68790c
      Ben Dooks authored
      When compiled as a module, the i2c-s3c2410 driver does not
      free either the IRQ or the i2c adapter it attached to the system.
      
      As part of this fix, move to the usual kernel style
      of freeing items as part of the probe error path
      making the remove process easier.
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      5b68790c
    • Ben Dooks's avatar
      i2c-s3c2410: Fix I2C SDA to SCL setup time · e00a8cdf
      Ben Dooks authored
      Fix the setup time for SDA to SCL due to the way
      the S3C24XX I2C controller works.
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      e00a8cdf
    • Till Harbaum's avatar
      i2c: New i2c-tiny-usb bus driver · e8c76eed
      Till Harbaum authored
      Add a driver for the i2c-tiny-usb interface. This is a simple
      do-it-yourself USB to I2C interface targeted at experimental and
      home use. See the i2c-tiny-usb homepage for hardware details:
      http://www.harbaum.org/till/i2c_tiny_usbSigned-off-by: default avatarTill Harbaum <till@harbaum.org>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      e8c76eed
    • Jean Delvare's avatar
      i2c: Documentation update · eefcd75e
      Jean Delvare authored
      Make the documentation on how to write and port i2c drivers more in
      line with the current state of things:
      * i2c-isa is deprecated and soon gone, so stop advertising it.
      * Drop many sensors-specific references. Most of them were outdated
        anyway.
      * Update the example code to reflect the recent and not-so-recent
        API and coding style preference changes.
      * Simplify the example init and cleanup functions.
      
      This should make things less complex to understand for newcomers.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      eefcd75e
    • Milind Arun Choudhary's avatar
      i2c: SPIN_LOCK_UNLOCKED cleanup · 35532d20
      Milind Arun Choudhary authored
      SPIN_LOCK_UNLOCKED cleanup, use __SPIN_LOCK_UNLOCKED instead.
      Signed-off-by: default avatarMilind Arun Choudhary <milindchoudhary@gmail.com>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      35532d20
    • Jean Delvare's avatar
      i2c: Obsolete i2c-ixp2000, i2c-ixp4xx and scx200_i2c · 11de70bd
      Jean Delvare authored
      The new generic i2c-gpio driver should be used instead.
      The obsolete drivers will be removed in September 2007.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Deepak Saxena <dsaxena@plexity.net>
      Cc: Jordan Crouse <jordan.crouse@amd.com>
      11de70bd
    • Ben Dooks's avatar
      i2c: New Simtec I2C bus driver · bcda9f1e
      Ben Dooks authored
      Platform driver for the Simtec CPLD based simple I2C logic.
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      bcda9f1e
    • Haavard Skinnemoen's avatar
      i2c: Bitbanging I2C bus driver using the GPIO API · 1c23af90
      Haavard Skinnemoen authored
      This is a very simple bitbanging I2C bus driver utilizing the new
      arch-neutral GPIO API. Useful for chips that don't have a built-in
      I2C controller, additional I2C busses, or testing purposes.
      
      To use, include something similar to the following in the
      board-specific setup code:
      
        #include <linux/i2c-gpio.h>
      
        static struct i2c_gpio_platform_data i2c_gpio_data = {
      	.sda_pin	= GPIO_PIN_FOO,
      	.scl_pin	= GPIO_PIN_BAR,
        };
        static struct platform_device i2c_gpio_device = {
      	.name		= "i2c-gpio",
      	.id		= 0,
      	.dev		= {
      		.platform_data	= &i2c_gpio_data,
      	},
        };
      
      Register this platform_device, set up the I2C pins as GPIO if
      required and you're ready to go. This will use default values for
      udelay and timeout, and will work with GPIO hardware that does not
      support open drain mode, but allows sensing of the SDA and SCL lines
      even when they are being driven.
      Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      1c23af90
    • Jan Engelhardt's avatar
      Use menuconfig objects - I2C · 16538e6b
      Jan Engelhardt authored
      Allow the whole I2C menu to be disabled at once without diving into
      the submenus for deselecting all options (should the user desire so).
      Signed-off-by: default avatarJan Engelhardt <jengelh@gmx.de>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      16538e6b
    • Jean Delvare's avatar
      i2c: Restore i2c_smbus_read_block_data · b86a1bc8
      Jean Delvare authored
      Add back the i2c_smbus_read_block_data helper function, it is needed
      by the upcoming lm93 hardware monitoring driver and possibly others.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      b86a1bc8
    • Jean Delvare's avatar
      i2c-pxa: Clean transaction stop · 7d054817
      Jean Delvare authored
      It was reported to me that the i2c-pxa driver was not able to process
      more that 50 transactions per second. Investigation revealed that the
      I2C unit was busy for 20 ms after every transaction. The reason seems
      to be that we forget to clear the STOP and ACKNACK bits at the end of
      the transaction. According to the PXA27x developer's manual, we shall
      do so.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Lennert Buytenhek <kernel@wantstofly.org>
      Cc: Nicolas Pitre <nico@cam.org>
      7d054817
    • Jean Delvare's avatar
      i2c-algo-bit: Improve debugging · 494dbb64
      Jean Delvare authored
      Improve the debugging features of the i2c-algo-bit driver:
      * Make it possible to compile the driver without debugging support
        at all, making it much smaller.
      * Use dev_dbg() for debugging messages where possible, and dev_err()
        for error messages.
      * Remove redundant debugging messages.
      
      These changes allowed for minor code cleanups, which are included
      as well.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      494dbb64
    • Jean Delvare's avatar
      i2c-algo-bit: Implement a 50/50 SCL duty cycle · 424ed67c
      Jean Delvare authored
      The original i2c-algo-bit implementation uses a 33/66 SCL duty cycle
      when bits are being written on the bus. While the I2C specification
      doesn't forbid it, this prevents us from driving the I2C bus to its
      max speed, limiting us to 66 kbps max on standard I2C busses.
      
      Implementing a 50/50 duty cycle instead lets us max out the bandwidth
      up to the theoretical max of 100 kbps on standard I2C busses. This is
      particularly important when large amounts of data need to be transfered
      over the bus, as is the case with some TV adapters when the firmware is
      being uploaded.
      
      In fact this change even allows, at least in theory, fast-mode I2C
      support at 125, 166 and 250 kbps. There's no way to reach the
      theoretical max of 400 kbps with this implementation. But I don't
      think we want to put efforts in that direction anyway: software-driven
      I2C is very CPU-intensive and bad for latency.
      
      Other timing changes:
      * Don't set SDA high explicitly on error, we're going to issue a stop
        condition before we leave anyway.
      * If an error occurs when sending the slave address, yield the CPU
        before retrying, and remove the additional delay after the new start
        condition.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      424ed67c