1. 02 5月, 2007 5 次提交
    • J
      i2c: Emulate SMBus block read over I2C · 209d27c3
      Jean Delvare 提交于
      Let the I2C bus drivers emulate the SMBus Block Read and Block Process
      Call transactions if they wish. This requires to define a new message
      flag, which i2c-core will use to let the underlying I2C bus driver
      know that the first received byte will specify the length of the read
      message.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      209d27c3
    • D
      i2c: Rename dev_to_i2c_adapter() · ef2c8321
      David Brownell 提交于
      Rename dev_to_i2c_adapter() as to_i2c_adapter(), since the previous
      syntax was a surprising and needless difference from normal naming
      conventions in Linux.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      ef2c8321
    • D
      i2c: Shrink struct i2c_client · 2096b956
      David Brownell 提交于
      This shrinks the size of "struct i2c_client" by 40 bytes:
      
       - Substantially shrinks the string used to identify the chip type
       - The "flags" don't need to be so big
       - Removes some internal padding
      
      It also adds kerneldoc for that struct, explaining how "name" is really a
      chip type identifier; it's otherwise potentially confusing.
      
      Because the I2C_NAME_SIZE symbol was abused for both i2c_client.name
      and for i2c_adapter.name, this needed to affect i2c_adapter too.  The
      adapters which used that symbol now use the more-obviously-correct
      idiom of taking the size of that field.
      
      JD: Shorten i2c_adapter.name from 50 to 48 bytes while we're here, to
      avoid wasting space in padding.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      2096b956
    • J
      i2c: i2c_adapter devices need no driver · b31366f4
      Jean Delvare 提交于
      Kill i2c_adapter_driver as it doesn't make sense and it prevents
      further i2c-core cleanups. i2c_adapter devices are virtual devices
      (ex-class devices) and as such they don't need a driver.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      b31366f4
    • J
      i2c: Kill i2c_adapter.class_dev · fccb56e4
      Jean Delvare 提交于
      Kill i2c_adapter.class_dev. Instead, set the class of i2c_adapter.dev
      to i2c_adapter_class, so that a symlink will be created for every
      i2c_adapter in /sys/class/i2c-adapter.
      
      The same change must be mirrored to i2c-isa as it duplicates some
      of the i2c-core functionalities.
      
      User-space tools and libraries might need some adjustments. In
      particular, libsensors from lm_sensors 2.10.3 or later is required for
      proper discovery of i2c adapter names after this change.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      fccb56e4
  2. 14 2月, 2007 1 次提交
    • D
      i2c: Add driver suspend/resume/shutdown support · f37dd80a
      David Brownell 提交于
      Driver model updates for the I2C core:
      
       - Add new suspend(), resume(), and shutdown() methods.  Use them in the
         standard driver model style; document them.
      
       - Minor doc updates to highlight zero-initialized fields in drivers, and
         the driver model accessors for "clientdata".
      
      If any i2c drivers were previously using the old suspend/resume calls
      in "struct driver", they were getting warning messages ... and will
      now no longer work.  Other than that, this patch changes no behaviors;
      and it lets I2C drivers use conventional PM and shutdown support.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      f37dd80a
  3. 11 12月, 2006 2 次提交
  4. 27 9月, 2006 2 次提交
  5. 13 7月, 2006 1 次提交
  6. 23 6月, 2006 1 次提交
  7. 25 4月, 2006 1 次提交
  8. 24 3月, 2006 1 次提交
  9. 07 2月, 2006 1 次提交
  10. 06 1月, 2006 9 次提交
  11. 31 10月, 2005 1 次提交
    • T
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau 提交于
      I recently picked up my older work to remove unnecessary #includes of
      sched.h, starting from a patch by Dave Jones to not include sched.h
      from module.h. This reduces the number of indirect includes of sched.h
      by ~300. Another ~400 pointless direct includes can be removed after
      this disentangling (patch to follow later).
      However, quite a few indirect includes need to be fixed up for this.
      
      In order to feed the patches through -mm with as little disturbance as
      possible, I've split out the fixes I accumulated up to now (complete for
      i386 and x86_64, more archs to follow later) and post them before the real
      patch.  This way this large part of the patch is kept simple with only
      adding #includes, and all hunks are independent of each other.  So if any
      hunk rejects or gets in the way of other patches, just drop it.  My scripts
      will pick it up again in the next round.
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4e57b681
  12. 29 10月, 2005 9 次提交
    • G
      [PATCH] I2C: add i2c module alias for i2c drivers to use · a9d1b24d
      Greg Kroah-Hartman 提交于
      This is the start of adding hotplug-like support for i2c devices.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a9d1b24d
    • J
      [PATCH] i2c: SMBus PEC support rewrite, 3 of 3 · 585b3160
      Jean Delvare 提交于
      The new SMBus PEC implementation doesn't support PEC emulation on
      non-PEC non-I2C SMBus masters, so we can drop all related code.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      585b3160
    • J
      [PATCH] i2c: SMBus PEC support rewrite, 2 of 3 · 421ef47b
      Jean Delvare 提交于
      This is my rewrite of the SMBus PEC support. The original
      implementation was known to have bugs (credits go to Hideki Iwamoto
      for reporting many of them recently), and was incomplete due to a
      conceptual limitation.
      
      The rewrite affects only software PEC. Hardware PEC needs very little
      code and is mostly untouched.
      
      Technically, both implementations differ in that the original one
      was emulating PEC in software by modifying the contents of an
      i2c_smbus_data union (changing the transaction to a different type),
      while the new one works one level lower, on i2c_msg structures (working
      on message contents). Due to the definition of the i2c_smbus_data union,
      not all SMBus transactions could be handled (at least not without
      changing the definition of this union, which would break user-space
      compatibility), and those which could had to be implemented
      individually. At the opposite, adding PEC to an i2c_msg structure
      can be done on any SMBus transaction with common code.
      
      Advantages of the new implementation:
      
      * It's about twice as small (from ~136 lines before to ~70 now, only
        counting i2c-core, including blank and comment lines). The memory
        used by i2c-core is down by ~640 bytes (~3.5%).
      
      * Easier to validate, less tricky code. The code being common to all
        transactions by design, the risk that a bug can stay uncovered is
        lower.
      
      * All SMBus transactions have PEC support in I2C emulation mode
        (providing the non-PEC transaction is also implemented). Transactions
        which have no emulation code right now will get PEC support for free
        when they finally get implemented.
      
      * Allows for code simplifications in header files and bus drivers
        (patch follows).
      
      Drawbacks (I guess there had to be at least one):
      
      * PEC emulation for non-PEC capable non-I2C SMBus masters was dropped.
        It was based on SMBus tricks and doesn't quite fit in the new design.
        I don't think it's really a problem, as the benefit was certainly
        not worth the additional complexity, but it's only fair that I at
        least mention it.
      
      Lastly, let's note that the new implementation does slightly affect
      compatibility (both in kernel and user-space), but doesn't actually
      break it. Some defines will be dropped, but the code can always be
      changed in a way that will work with both the old and the new
      implementations. It shouldn't be a problem as there doesn't seem to be
      many users of SMBus PEC to date anyway.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      421ef47b
    • J
      [PATCH] i2c: SMBus PEC support rewrite, 1 of 3 · b8095544
      Jean Delvare 提交于
      Discard I2C_FUNC_SMBUS_*_PEC defines. i2c clients are not supposed to
      check for PEC support of i2c bus drivers on individual SMBus
      transactions, and i2c bus drivers are not supposed to advertise them.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b8095544
    • J
      [PATCH] i2c: Drop I2C_SMBUS_I2C_BLOCK_MAX · 30dac746
      Jean Delvare 提交于
      Drop I2C_SMBUS_I2C_BLOCK_MAX, use I2C_SMBUS_BLOCK_MAX instead.
      
      I2C_SMBUS_I2C_BLOCK_MAX has always been defined to the same value as
      I2C_SMBUS_BLOCK_MAX, and this will never change: setting it to a lower
      value would make no sense, setting it to a higher value would break
      i2c_smbus_data compatibility. There is no point in changing
      i2c_smbus_data to support larger block transactions in SMBus mode, as
      no SMBus hardware supports more than 32 byte blocks. Thus, for larger
      transactions, direct I2C transfers are the way to go.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      30dac746
    • J
      [PATCH] i2c: Drop out-of-date, colliding ioctl definitions · 80ce3b7d
      Jean Delvare 提交于
      Delete 2 out-of-date, colliding ioctl defines. I2C_UDELAY and
      I2C_MDELAY are supposed to be used by i2c-algo-bit, but actually
      aren't (and I suspect never were). Moreover, their values are the same
      as I2C_FUNCS and I2C_SLAVE_FORCE, respectively, which *are* widely
      used.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      80ce3b7d
    • J
      [PATCH] i2c: Fix misplaced i2c.h comment · 31ec5bc5
      Jean Delvare 提交于
      Fix a misplaced comment in i2c.h. Spotted by Hideki Iwamoto.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      31ec5bc5
    • J
      [PATCH] i2c: Drop useless CVS revision IDs · bf813b31
      Jean Delvare 提交于
      CVS revision IDs are totally useless and irrelevant by now.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bf813b31
    • H
      [PATCH] i2c: Fix union i2c_smbus_data definition · 332bf92b
      Hideki Iwamoto 提交于
      The i2c_smbus_data union block member has a comment stating that an
      extra byte is required for SMBus Block Process Call transactions. This
      has been true for three weeks around June 2002, but no more since, so
      it is about time that we drop this comment and fix the definition.
      
      From: Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       include/linux/i2c.h |    3 +--
       1 file changed, 1 insertion(+), 2 deletions(-)
      332bf92b
  13. 18 9月, 2005 1 次提交
  14. 06 9月, 2005 5 次提交