1. 16 11月, 2007 3 次提交
    • J
      i2c: Make i2c_check_addr static · 5e31c2bd
      Jean Delvare 提交于
      i2c_check_addr is only used inside i2c-core now, so we can make it
      static and stop exporting it. Thanks to David Brownell for noticing.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      5e31c2bd
    • J
      i2c-dev: Unbound new-style i2c clients aren't busy · bd4217d8
      Jean Delvare 提交于
      Let i2c-dev deal properly with new-style i2c clients. Instead of
      considering them always busy, it needs to check wether a driver is
      bound to them or not.
      
      This is still not completely correct, as the client could become
      busy later, but the same problem already existed before new-style
      clients were introduced. We'll want to fix it someday.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      bd4217d8
    • D
      i2c-dev: "how does it work" comments · 907135aa
      David Brownell 提交于
      This adds some "how does this work" comments to the i2c-dev driver,
      plus separators between the three main components:
      
        - The parallel list of i2c_adapters ("i2c_dev_list"), each of which
          gets a "struct i2c_dev" and a /dev/i2c-X character special file.
      
        - An i2cdev_driver gets adapter add/remove notifications, which are
          used to maintain that list of adapters.
      
        - Special file operations, which let userspace talk either directly to
          the adapter (for i2c_msg operations) or through cached addressing info
          using an anonymous i2c_client (never registered anywhere).
      
      Plus there's the usual module load/unload record keeping.
      
      After making sense of this code, I think that the anonymous i2c_client
      is pretty shady.  But since it's never registered, using this code with
      a system set up for "new style" I2C drivers is no more complicated than
      always using the I2C_SLAVE_FORCE ioctl (instead of I2C_SLAVE).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      907135aa
  2. 15 11月, 2007 37 次提交