1. 05 5月, 2007 27 次提交
  2. 02 5月, 2007 13 次提交
    • B
      i2c-s3c2410: Fix bug in releasing driver · 5b68790c
      Ben Dooks 提交于
      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: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      5b68790c
    • B
      i2c-s3c2410: Fix I2C SDA to SCL setup time · e00a8cdf
      Ben Dooks 提交于
      Fix the setup time for SDA to SCL due to the way
      the S3C24XX I2C controller works.
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      e00a8cdf
    • T
      i2c: New i2c-tiny-usb bus driver · e8c76eed
      Till Harbaum 提交于
      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: NTill Harbaum <till@harbaum.org>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      e8c76eed
    • J
      i2c: Documentation update · eefcd75e
      Jean Delvare 提交于
      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: NJean Delvare <khali@linux-fr.org>
      eefcd75e
    • M
      i2c: SPIN_LOCK_UNLOCKED cleanup · 35532d20
      Milind Arun Choudhary 提交于
      SPIN_LOCK_UNLOCKED cleanup, use __SPIN_LOCK_UNLOCKED instead.
      Signed-off-by: NMilind Arun Choudhary <milindchoudhary@gmail.com>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      35532d20
    • J
      i2c: Obsolete i2c-ixp2000, i2c-ixp4xx and scx200_i2c · 11de70bd
      Jean Delvare 提交于
      The new generic i2c-gpio driver should be used instead.
      The obsolete drivers will be removed in September 2007.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Deepak Saxena <dsaxena@plexity.net>
      Cc: Jordan Crouse <jordan.crouse@amd.com>
      11de70bd
    • B
      i2c: New Simtec I2C bus driver · bcda9f1e
      Ben Dooks 提交于
      Platform driver for the Simtec CPLD based simple I2C logic.
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      bcda9f1e
    • H
      i2c: Bitbanging I2C bus driver using the GPIO API · 1c23af90
      Haavard Skinnemoen 提交于
      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: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      1c23af90
    • J
      Use menuconfig objects - I2C · 16538e6b
      Jan Engelhardt 提交于
      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: NJan Engelhardt <jengelh@gmx.de>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      16538e6b
    • J
      i2c: Restore i2c_smbus_read_block_data · b86a1bc8
      Jean Delvare 提交于
      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: NJean Delvare <khali@linux-fr.org>
      b86a1bc8
    • J
      i2c-pxa: Clean transaction stop · 7d054817
      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: NJean Delvare <khali@linux-fr.org>
      Cc: Lennert Buytenhek <kernel@wantstofly.org>
      Cc: Nicolas Pitre <nico@cam.org>
      7d054817
    • J
      i2c-algo-bit: Improve debugging · 494dbb64
      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: NJean Delvare <khali@linux-fr.org>
      494dbb64
    • J
      i2c-algo-bit: Implement a 50/50 SCL duty cycle · 424ed67c
      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: NJean Delvare <khali@linux-fr.org>
      424ed67c