Skip to content
Snippets Groups Projects
  1. Dec 06, 2009
  2. Nov 07, 2009
  3. Oct 04, 2009
  4. Sep 18, 2009
  5. Jun 19, 2009
    • Jean Delvare's avatar
      i2c: Add a sysfs interface to instantiate devices · 99cd8e25
      Jean Delvare authored
      
      Add a sysfs interface to instantiate and delete I2C devices. This is
      primarily a replacement of the force_* module parameters implemented
      by some i2c drivers. These module parameters were implemented
      internally by the I2C_CLIENT_INSMOD* macros, which don't scale well.
      
      This can also be used when developing a driver on a self-soldered
      board which doesn't yet have proper I2C device declaration at the
      platform level, and presumably for various debugging situations.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      99cd8e25
    • Jean Delvare's avatar
      i2c: Get rid of the legacy binding model · 729d6dd5
      Jean Delvare authored
      
      We converted all the legacy i2c drivers so we can finally get rid of
      the legacy binding model. Hooray!
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      729d6dd5
  6. Jun 15, 2009
  7. Jun 13, 2009
    • Richard Röjfors's avatar
      i2c-ocores: Can add I2C devices to the bus · dd14be4c
      Richard Röjfors authored
      
      There is sometimes a need for the ocores driver to add devices to the
      bus when installed.
      
      i2c_register_board_info can not always be used, because the I2C devices
       are not known at an early state, they could for instance be connected
       on a I2C bus on a PCI device which has the Open Cores IP.
      
      i2c_new_device can not be used in all cases either since the resulting
      bus nummer might be unknown.
      
      The solution is the pass a list of I2C devices in the platform data to
      the Open Cores driver. This is useful for MFD drivers.
      
      Signed-off-by: default avatarRichard Röjfors <richard.rojfors.ext@mocean-labs.com>
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      dd14be4c
  8. Mar 30, 2009
    • Jean Delvare's avatar
      Move the pcf8591 driver to hwmon · fb4504fe
      Jean Delvare authored
      
      Directory drivers/i2c/chips is going away, so drivers there must find
      new homes. For the pcf8591 driver, the best choice seems to be the
      hwmon subsystem. While the Philips PCF8591 device isn't a typical
      hardware monitoring chip, its DAC interface is compatible with the
      hwmon one, so it fits somewhat.
      
      If a better subsystem is ever created for ADC/DAC chips, the driver
      could be moved there.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      fb4504fe
  9. Mar 28, 2009
  10. Oct 30, 2008
  11. Oct 22, 2008
  12. Oct 14, 2008
  13. Jul 28, 2008
  14. Jul 16, 2008
    • Jean Delvare's avatar
      i2c: Convert the max6875 driver to a new-style i2c driver · bd8d421f
      Jean Delvare authored
      
      The new-style max6875 driver implements the optional detect() callback
      to cover the use cases of the legacy driver. I'm curious if anyone
      really needs this though, so it might be removed in the feature.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      bd8d421f
    • Jean Delvare's avatar
      i2c: Convert the pca9539 driver to a new-style i2c driver · 3d63430a
      Jean Delvare authored
      
      The new-style pca9539 driver implements the optional detect() callback
      to cover the use cases of the legacy driver.
      
      Warning: users will now have to use the force module parameter to get
      the driver to attach to their device. That's not a bad thing as these
      devices can't be detected anyway.
      
      Note that this doesn't change the fact that this driver is deprecated
      in favor of gpio/pca953x.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      3d63430a
    • Jean Delvare's avatar
      i2c: Convert the pcf8575 driver to a new-style i2c driver · 97addff6
      Jean Delvare authored
      
      The new-style pcf8575 driver implements the optional detect() callback
      to cover the use cases of the legacy driver.
      
      Warning: users will now have to use the force module parameter to get
      the driver to attach to their device. That's not a bad thing as these
      devices can't be detected anyway.
      
      Note that this doesn't change the fact that this driver is deprecated
      in favor of gpio/pcf857x.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      97addff6
    • Jean Delvare's avatar
      i2c: Convert the pcf8574 driver to a new-style i2c driver · 833bedb8
      Jean Delvare authored
      
      The new-style pcf8574 driver implements the optional detect() callback
      to cover the use cases of the legacy driver.
      
      Warning: users will now have to use the force module parameter to get
      the driver to attach to their device. That's not a bad thing as these
      devices can't be detected anyway.
      
      Note that this doesn't change the fact that this driver is deprecated
      in favor of gpio/pcf857x.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      833bedb8
  15. Jul 14, 2008
    • 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
    • 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
    • David Brownell's avatar
      i2c-core: Return -Errno, not -1 · 24a5bb7b
      David Brownell authored
      
      More updates to the I2C stack's fault reporting:  make the core stop
      returning "-1" (usually "-EPERM") for all faults.  Instead, pass lower
      level fault code up the stack, or return some appropriate errno.
      
      This patch happens to touch almost exclusively SMBus calls.
      
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      24a5bb7b
    • David Brownell's avatar
      i2c: Document standard fault codes · 81fded1f
      David Brownell authored
      
      Create Documentation/i2c/fault-codes to help standardize
      fault/error code usage in the I2C stack.  It turns out that
      returning -1 (-EPERM) for everything was not at all helpful.
      
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      81fded1f
    • Adrian Bunk's avatar
      i2c: Remove 3 deprecated bus drivers · 20a9b6e7
      Adrian Bunk authored
      
      This patch contains the scheduled removal of i2c-i810, i2c-prosavage
      and i2c-savage4.
      
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      20a9b6e7
  16. Jul 01, 2008
  17. May 11, 2008
Loading