05 May, 2007

24 commits


02 May, 2007

16 commits

  • 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: Ben Dooks
    Signed-off-by: Jean Delvare

    Ben Dooks
     
  • Fix the setup time for SDA to SCL due to the way
    the S3C24XX I2C controller works.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jean Delvare

    Ben Dooks
     
  • 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_usb

    Signed-off-by: Till Harbaum
    Signed-off-by: Jean Delvare

    Till Harbaum
     
  • 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: Jean Delvare

    Jean Delvare
     
  • SPIN_LOCK_UNLOCKED cleanup, use __SPIN_LOCK_UNLOCKED instead.

    Signed-off-by: Milind Arun Choudhary
    Signed-off-by: Jean Delvare

    Milind Arun Choudhary
     
  • The new generic i2c-gpio driver should be used instead.
    The obsolete drivers will be removed in September 2007.

    Signed-off-by: Jean Delvare
    Cc: Deepak Saxena
    Cc: Jordan Crouse

    Jean Delvare
     
  • Platform driver for the Simtec CPLD based simple I2C logic.

    Signed-off-by: Ben Dooks
    Signed-off-by: Jean Delvare

    Ben Dooks
     
  • 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

    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: Haavard Skinnemoen
    Signed-off-by: Jean Delvare

    Haavard Skinnemoen
     
  • 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: Jan Engelhardt
    Signed-off-by: Jean Delvare

    Jan Engelhardt
     
  • 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: Jean Delvare

    Jean Delvare
     
  • 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: Jean Delvare
    Cc: Lennert Buytenhek
    Cc: Nicolas Pitre

    Jean Delvare
     
  • 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: Jean Delvare

    Jean Delvare
     
  • 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: Jean Delvare

    Jean Delvare
     
  • Update the OMAP I2C driver to use i2c_add_numbered_adapter(), so that
    later patches can convert boards to using new-style drivers.

    Signed-off-by: David Brownell
    Signed-off-by: Jean Delvare

    David Brownell
     
  • The i2c linux driver for blackfin architecture which supports blackfin
    on-chip TWI controller i2c operation.

    Signed-off-by: Bryan Wu
    Reviewed-by: Alexey Dobriyan
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Jean Delvare

    Bryan Wu
     
  • Signed-off-by: Ladislav Michl
    Signed-off-by: Jean Delvare

    Ladislav Michl