1. 02 3月, 2010 1 次提交
    • M
      i2c: Make PCI device ids constant · 4111ecd2
      Márton Németh 提交于
      The id_table field of the struct pci_driver is constant in <linux/pci.h>
      so it is worth to make initialization data also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      disable decl_init,const_decl_init;
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      Signed-off-by: NMárton Németh <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      4111ecd2
  2. 17 1月, 2010 1 次提交
  3. 05 10月, 2009 1 次提交
  4. 16 6月, 2009 1 次提交
  5. 27 1月, 2009 1 次提交
  6. 21 10月, 2008 2 次提交
  7. 14 10月, 2008 2 次提交
  8. 15 7月, 2008 5 次提交
    • J
      i2c: Drop stray references to lm_sensors · 954a9930
      Jean Delvare 提交于
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      954a9930
    • J
      i2c: Check for ACPI resource conflicts · 54fb4a05
      Jean Delvare 提交于
      Check for ACPI resource conflicts in i2c bus drivers. I've included
      all recent SMBus master drivers for PC hardware.
      
      I've voluntarily left out:
      * Drivers that don't run on PCs: they can't conflict with ACPI.
      * Bit-banged bus device drivers: it's very unlikely that ACPI would
        deal with such buses.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      54fb4a05
    • J
      i2c: Let bus drivers add SPD to their class · 3401b2ff
      Jean Delvare 提交于
      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: NJean Delvare <khali@linux-fr.org>
      3401b2ff
    • J
      i2c: Consistently reject unsupported transactions · ac7fc4fb
      Jean Delvare 提交于
      Many PC SMBus host controller drivers don't properly handle the case
      where they are requested to achieve a transaction they do not support.
      Update them so that the consistently print a warning message and
      return a single error value in this case.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      ac7fc4fb
    • D
      i2c: Bus drivers return -Errno not -1 · 97140342
      David Brownell 提交于
      Tighten error paths used by various i2c adapters (mostly x86) so
      they return real fault/errno codes instead of a "-1" (which is
      most often interpreted as "-EPERM").  Build tested, with eyeball
      review.
      
      One minor initial goal is to have adapters consistently return
      the code "-ENXIO" when addressing a device doesn't get an ACK
      response, at least in the probe paths where they are already
      good at stifling related logspam.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      97140342
  9. 28 1月, 2008 2 次提交
  10. 20 10月, 2007 1 次提交
  11. 12 7月, 2007 2 次提交
    • J
      i2c: Fix the i2c_smbus_read_i2c_block_data() prototype · 4b2643d7
      Jean Delvare 提交于
      Let the drivers specify how many bytes they want to read with
      i2c_smbus_read_i2c_block_data(). So far, the block count was
      hard-coded to I2C_SMBUS_BLOCK_MAX (32), which did not make much sense.
      Many driver authors complained about this before, and I believe it's
      about time to fix it. Right now, authors have to do technically stupid
      things, such as individual byte reads or full-fledged I2C messaging,
      to work around the problem. We do not want to encourage that.
      
      I even found that some bus drivers (e.g. i2c-amd8111) already
      implemented I2C block read the "right" way, that is, they didn't
      follow the old, broken standard. The fact that it was never noticed
      before just shows how little i2c_smbus_read_i2c_block_data() was used,
      which isn't that surprising given how broken its prototype was so far.
      
      There are some obvious compatiblity considerations:
      * This changes the i2c_smbus_read_i2c_block_data() prototype. Users
        outside the kernel tree will notice at compilation time, and will
        have to update their code.
      * User-space has access to i2c_smbus_xfer() directly using i2c-dev, so
        the changed expectations would affect tools such as i2cdump. In order
        to preserve binary compatibility, we give I2C_SMBUS_I2C_BLOCK_DATA
        a new numeric value, and define I2C_SMBUS_I2C_BLOCK_BROKEN with the
        old numeric value. When i2c-dev receives a transaction with the
        old value, it can convert it to the new format on the fly.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      4b2643d7
    • A
      PCI: Change all drivers to use pci_device->revision · 44c10138
      Auke Kok 提交于
      Instead of all drivers reading pci config space to get the revision
      ID, they can now use the pci_device->revision member.
      
      This exposes some issues where drivers where reading a word or a dword
      for the revision number, and adding useless error-handling around the
      read. Some drivers even just read it for no purpose of all.
      
      In devices where the revision ID is being copied over and used in what
      appears to be the equivalent of hotpath, I have left the copy code
      and the cached copy as not to influence the driver's performance.
      
      Compile tested with make all{yes,mod}config on x86_64 and i386.
      Signed-off-by: NAuke Kok <auke-jan.h.kok@intel.com>
      Acked-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      44c10138
  12. 02 5月, 2007 1 次提交
    • 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
  13. 14 2月, 2007 2 次提交
  14. 27 9月, 2006 2 次提交
  15. 11 11月, 2005 1 次提交
  16. 08 11月, 2005 1 次提交
    • J
      [PATCH] i2c-viapro: Some adjustments · 8750197f
      Jean Delvare 提交于
      The big i2c-viapro SMBus driver update which went into 2.6.14-git1
      introduced a few minor issues. Nothing critical, but I would like a
      few adjustments to be merged in to fix the following problems:
      
      * VIA should not be spelled Via.
      * Frodo Looijaard and Philip Edelbrock did not write the i2c-viapro
        driver.
      * When debugging is disabled, half of messages would be logged.
      * Drop an unneeded masking.
      * Some port reads can be avoided now that the transaction size is
        passed as a parameter to vt596_transaction().
      * SMBus Receive Byte transactions are used for probing too (for
        EEPROMs), so hide errors on these too.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8750197f
  17. 29 10月, 2005 8 次提交
  18. 06 9月, 2005 2 次提交
  19. 22 6月, 2005 1 次提交
  20. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4