1. 10 8月, 2015 1 次提交
  2. 08 2月, 2014 1 次提交
  3. 25 1月, 2012 1 次提交
    • A
      MISC: convert drivers/misc/* to use module_i2c_driver() · a64fe2ed
      Axel Lin 提交于
      This patch converts the drivers in drivers/misc/* to use the
      module_i2c_driver() macro which makes the code smaller and a bit
      simpler.
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
      Cc: Anantha Narayanan <Anantha.Narayanan@intel.com>
      Cc: Hemanth V <hemanthv@ti.com>
      Cc: Christoph Mair <christoph.mair@gmail.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Ben Gardner <bgardner@wabtec.com>
      Cc: Minkyu Kang <mk7.kang@samsung.com>
      Cc: Kalhan Trisal <kalhan.trisal@intel.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Cc: Daniel Mack <zonque@gmail.com>
      Cc: Rodolfo Giometti <giometti@linux.it>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a64fe2ed
  4. 22 5月, 2010 1 次提交
  5. 14 5月, 2010 1 次提交
  6. 05 10月, 2009 1 次提交
  7. 16 6月, 2009 1 次提交
  8. 17 7月, 2008 1 次提交
  9. 15 7月, 2008 1 次提交
  10. 19 5月, 2008 1 次提交
    • J
      i2c/max6875: Really prevent 24RF08 corruption · 70455e79
      Jean Delvare 提交于
      i2c-core takes care of the possible corruption of 24RF08 chips for
      quite some times, so device devices no longer need to do it. And they
      really should not, as applying the prevention twice voids it.
      
      I thought that I had fixed all drivers long ago but apparently I had
      missed that one.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Ben Gardner <bgardner@wabtec.com>
      70455e79
  11. 28 1月, 2008 1 次提交
  12. 12 7月, 2007 3 次提交
    • 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
    • Z
      sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes · 91a69029
      Zhang Rui 提交于
      Well, first of all, I don't want to change so many files either.
      
      What I do:
      Adding a new parameter "struct bin_attribute *" in the
      .read/.write methods for the sysfs binary attributes.
      
      In fact, only the four lines change in fs/sysfs/bin.c and
      include/linux/sysfs.h do the real work.
      But I have to update all the files that use binary attributes
      to make them compatible with the new .read and .write methods.
      I'm not sure if I missed any. :(
      
      Why I do this:
      For a sysfs attribute, we can get a pointer pointing to the
      struct attribute in the .show/.store method,
      while we can't do this for the binary attributes.
      I don't know why this is different, but this does make it not
      so handy to use the binary attributes as the regular ones.
      So I think this patch is reasonable. :)
      
      Who benefits from it:
      The patch that exposes ACPI tables in sysfs
      requires such an improvement.
      All the table binary attributes share the same .read method.
      Parameter "struct bin_attribute *" is used to get
      the table signature and instance number which are used to
      distinguish different ACPI table binary attributes.
      
      Without this parameter, we need to offer different .read methods
      for different ACPI table binary attributes.
      This is impossible as there are various ACPI tables on different
      platforms, and we don't know what they are until they are loaded.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      91a69029
    • T
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo 提交于
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
  13. 27 9月, 2006 1 次提交
  14. 24 3月, 2006 1 次提交
  15. 06 1月, 2006 3 次提交
  16. 29 10月, 2005 1 次提交
  17. 06 9月, 2005 9 次提交
  18. 30 7月, 2005 1 次提交
    • J
      [PATCH] I2C: 24RF08 corruption prevention (again) · 0d73adc1
      Jean Delvare 提交于
      The 24RF08 corruption prevention in the eeprom and max6875 drivers wasn't
      complete. For one thing, the additional quick write should happen as soon
      as possible and unconditionally, while both drivers had error paths before.
      For another, when a given chip is forced, the core does not emit a quick
      write, so a second quick write would cause the corruption rather than
      prevent it.
      
      I plan to move the corruption prevention in the core in the long run, so
      that individual drivers don't have to care anymore. But I need to merge
      i2c_probe and i2c_detect before I do (work in progress).
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0d73adc1
  19. 12 7月, 2005 1 次提交
    • J
      [PATCH] I2C: New max6875 driver may corrupt EEPROMs · 9ab1ee2a
      Jean Delvare 提交于
      After a careful code analysis on the new max6875 driver
      (drivers/i2c/chips/max6875.c), I have come to the conclusion that this
      driver may cause EEPROM corruptions if used on random systems.
      
      The EEPROM part of the MAX6875 chip is accessed using rather uncommon
      I2C sequences. What is seen by the MAX6875 as reads can be seen by a
      standard EEPROM (24C02) as writes. If you check the detection method
      used by the driver, you'll find that the first SMBus command it will
      send on the bus is i2c_smbus_write_byte_data(client, 0x80, 0x40). For
      the MAX6875 it makes an internal pointer point to a specific offset of
      the EEPROM waiting for a subsequent read command, so it's not an actual
      data write operation, but for a standard EEPROM, this instead means
      writing value 0x40 to offset 0x80. Blame Philips and Intel for the
      obscure protocol.
      
      Since the MAX6875 and the standard, common 24C02 EEPROMs share two I2C
      addresses (0x50 and 0x52), loading the max6875 driver on a system with
      standard EEPROMs at either address will trigger a write on these
      EEPROMs, which will lead to their corruption if they happen not to be
      write protected. This kind of EEPROMs can be found on memory modules
      (SPD), ethernet adapters (MAC address), laptops (proprietary data) and
      displays (EDID/DDC). Most of these are hopefully write-protected, but
      not all of them.
      
      For this reason, I would recommend that the max6875 driver be
      neutralized, in a way that nobody can corrupt his/her EEPROMs by just
      loading the driver. This means either deleting the driver completely, or
      not listing any default address for it. I'd like this to be done before
      2.6.13-rc1 is released.
      
      Additionally, the max6875 driver lacks the 24RF08 corruption preventer
      present in the eeprom driver, which means that loading this driver in a
      system with such a chip would corrupt it as well.
      
      Here is a proposed quick patch addressing the issue, although I wouldn't
      mind a complete removal if it makes everyone feel safer. I think Ben
      has plans to replace this driver by a much simplified one anyway.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9ab1ee2a
  20. 22 6月, 2005 1 次提交