1. 13 Apr, 2009 1 commit
  2. 06 Apr, 2009 1 commit
  3. 24 Feb, 2009 1 commit
  4. 26 Jan, 2009 1 commit
  5. 07 Jan, 2009 3 commits
  6. 22 Oct, 2008 5 commits
  7. 28 Aug, 2008 1 commit
  8. 14 Jul, 2008 6 commits
    • Jean Delvare's avatar
      i2c: Add detection capability to new-style drivers · 4735c98f
      Jean Delvare authored
      
      
      Add a mechanism to let new-style i2c drivers optionally autodetect
      devices they would support on selected buses and ask i2c-core to
      instantiate them. This is a replacement for legacy i2c drivers, much
      cleaner.
      
      Where drivers had to implement both a legacy i2c_driver and a
      new-style i2c_driver so far, this mechanism makes it possible to get
      rid of the legacy i2c_driver and implement both enumerated and
      detected device support with just one (new-style) i2c_driver.
      
      Here is a quick conversion guide for these drivers, step by step:
      
      * Delete the legacy driver definition, registration and removal.
        Delete the attach_adapter and detach_client methods of the legacy
        driver.
      
      * Change the prototype of the legacy detect function from
          static int foo_detect(struct i2c_adapter *adapter, int address, int kind);
        to
          static int foo_detect(struct i2c_client *client, int kind,
          			  struct i2c_board_info *info);
      
      * Set the new-style driver detect callback to this new function, and
        set its address_data to &addr_data (addr_data is generally provided
        by I2C_CLIENT_INSMOD.)
      
      * Add the appropriate class to the new-style driver. This is
        typically the class the legacy attach_adapter method was checking
        for. Class checking is now mandatory (done by i2c-core.) See
        <linux/i2c.h> for the list of available classes.
      
      * Remove the i2c_client allocation and freeing from the detect
        function. A pre-allocated client is now handed to you by i2c-core,
        and is freed automatically.
      
      * Make the detect function fill the type field of the i2c_board_info
        structure it was passed as a parameter, and return 0, on success. If
        the detection fails, return -ENODEV.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      4735c98f
    • Jon Smirl's avatar
      i2c: Export the i2c_bus_type symbol · e9ca9eb9
      Jon Smirl authored
      
      
      Export the root of the i2c bus so that PowerPC device tree code can
      iterate over devices on the i2c bus.
      Signed-off-by: default avatarJon Smirl <jonsmirl@gmail.com>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      e9ca9eb9
    • Jean Delvare's avatar
      i2c: Let bus drivers add SPD to their class · 3401b2ff
      Jean Delvare authored
      
      
      Let general purpose I2C/SMBus bus drivers add SPD to their class. Once
      this is done, we will be able to tell the eeprom driver to only probe
      for SPD EEPROMs and similar on these buses.
      
      Note that I took a conservative approach here, adding I2C_CLASS_SPD to
      many drivers that have no idea whether they can host SPD EEPROMs or not.
      This is to make sure that the eeprom driver doesn't stop probing buses
      where SPD EEPROMs or equivalent live.
      
      So, bus driver maintainers and users should feel free to remove the SPD
      class from drivers those buses never have SPD EEPROMs or they don't
      want the eeprom driver to bind to them. Likewise, feel free to add the
      SPD class to any bus driver I might have missed.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      3401b2ff
    • Jean Delvare's avatar
      i2c: Let framebuffer drivers set their I2C bus class to DDC · c1b6b4f2
      Jean Delvare authored
      
      
      Let framebuffer drivers set their I2C bus class to DDC. Once this is
      done, we will be able to tell the eeprom driver to only probe for
      EDID EEPROMs on these buses.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      c1b6b4f2
    • Jean Delvare's avatar
      i2c: Update stray references to smbus_access · ae7193f7
      Jean Delvare authored
      
      
      That function is actually named i2c_smbus_xfer.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      ae7193f7
    • Jean Delvare's avatar
      i2c: Delete unused function i2c_smbus_write_quick · 67c2e665
      Jean Delvare authored
      
      
      Function i2c_smbus_write_quick has no users left, so we can delete it.
      
      Also update the list of these helper functions which are gone but
      could be added back if needed.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      67c2e665
  9. 01 Jul, 2008 1 commit
  10. 18 May, 2008 1 commit
  11. 11 May, 2008 1 commit
    • Jean Delvare's avatar
      i2c: Match dummy devices by type · 60b129d7
      Jean Delvare authored
      
      
      As the old driver_name/type matching scheme is going away soon, change
      the dummy device mechanism to use the new matching scheme.
      
      This has the downside that dummy i2c clients can no longer choose
      their name, they'll all appear as "dummy" in sysfs and in log
      messages. I don't think it is a problem in practice though, as there
      is little reason to use these i2c clients to log messages.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      60b129d7
  12. 29 Apr, 2008 2 commits
    • Jean Delvare's avatar
      i2c: Convert most new-style drivers to use module aliasing · 3760f736
      Jean Delvare authored
      
      
      Based on earlier work by Jon Smirl and Jochen Friedrich.
      
      Update most new-style i2c drivers to use standard module aliasing
      instead of the old driver_name/type driver matching scheme. I've
      left the video drivers apart (except for SoC camera drivers) as
      they're a bit more diffcult to deal with, they'll have their own
      patch later.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Jon Smirl <jonsmirl@gmail.com>
      Cc: Jochen Friedrich <jochen@scram.de>
      3760f736
    • Jean Delvare's avatar
      i2c: Add support for device alias names · d2653e92
      Jean Delvare authored
      
      
      Based on earlier work by Jon Smirl and Jochen Friedrich.
      
      This patch allows new-style i2c chip drivers to have alias names using
      the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this
      point, the old i2c driver binding scheme (driver_name/type) is still
      supported.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Jochen Friedrich <jochen@scram.de>
      Cc: Jon Smirl <jonsmirl@gmail.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      d2653e92
  13. 24 Feb, 2008 2 commits
  14. 27 Jan, 2008 7 commits
  15. 15 Nov, 2007 1 commit
  16. 13 Oct, 2007 6 commits