1. 18 10月, 2017 2 次提交
  2. 12 2月, 2017 1 次提交
    • B
      misc: eeprom: at24: use device_property_*() functions instead of of_get_property() · dd905a61
      Ben Gardner 提交于
      Allow the at24 driver to get configuration information from both OF and
      ACPI by using the more generic device_property functions.
      This change was inspired by the at25.c driver.
      
      I have a custom board with a ST M24C02 EEPROM attached to an I2C bus.
      With the following ACPI construct, this patch instantiates a working
      instance of the driver.
      
      Device (EEP0) {
       Name (_HID, "PRP0001")
       Name (_DSD, Package () {
        ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
        Package () {
         Package () {"compatible", Package () {"st,24c02"}},
         Package () {"pagesize", 16},
        },
       })
       Name (_CRS, ResourceTemplate () {
        I2cSerialBus (
         0x0057, ControllerInitiated, 400000,
         AddressingMode7Bit, "\\_SB.PCI0.I2C3", 0x00,
         ResourceConsumer,,)
       })
      }
      Signed-off-by: NBen Gardner <gardner.ben@gmail.com>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      dd905a61
  3. 22 8月, 2016 1 次提交
    • B
      eeprom: at24: check if the chip is functional in probe() · 00f0ea70
      Bartosz Golaszewski 提交于
      The at24 driver doesn't check if the chip is functional in its probe
      function. This leads to instantiating devices that are not physically
      present. For example the cape EEPROMs for BeagleBone Black are defined
      in the device tree at four addresses on i2c2, but normally only one of
      them is present.
      
      If the userspace doesn't know the location in advance, it will need to
      check if reading the nvmem attributes fails to determine which EEPROM
      is actually there.
      
      Try to read a single byte in probe() and bail-out with -ENODEV if the
      read fails.
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      00f0ea70
  4. 19 7月, 2016 1 次提交
  5. 18 7月, 2016 9 次提交
  6. 02 5月, 2016 1 次提交
  7. 17 4月, 2016 2 次提交
  8. 02 3月, 2016 2 次提交
  9. 08 2月, 2016 1 次提交
  10. 26 10月, 2015 1 次提交
  11. 24 10月, 2015 1 次提交
  12. 24 8月, 2015 1 次提交
  13. 10 8月, 2015 1 次提交
  14. 31 7月, 2015 1 次提交
  15. 28 7月, 2015 1 次提交
  16. 18 11月, 2014 1 次提交
  17. 30 10月, 2013 1 次提交
  18. 30 9月, 2013 1 次提交
  19. 30 5月, 2013 1 次提交
  20. 22 11月, 2012 2 次提交
  21. 24 12月, 2010 2 次提交
  22. 03 6月, 2010 1 次提交
  23. 22 5月, 2010 2 次提交
    • J
      at24: Fall back to byte or word reads if needed · 7aeb9664
      Jean Delvare 提交于
      Increase the portability of the at24 driver by letting it read from
      EEPROM chips connected to cheap SMBus controllers that support neither
      raw I2C messages nor even I2C block reads. All SMBus controllers
      should support either word reads or byte reads, so read support
      becomes universal, much like with the legacy "eeprom" driver.
      
      Obviously, this only works with EEPROM chips up to AT24C16, that use
      8-bit offset addressing. 16-bit offset addressing is almost impossible
      to support on SMBus controllers.
      
      I did not add universal support for writes, as I had no immediate need
      for this, but it could be added later if needed (with the same
      performance issue as byte and word reads have, of course.)
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Reviewed-by: NWolfram Sang <w.sang@pengutronix.de>
      Cc: Konstantin Lazarev <klazarev@sbcglobal.net>
      7aeb9664
    • C
      sysfs: add struct file* to bin_attr callbacks · 2c3c8bea
      Chris Wright 提交于
      This allows bin_attr->read,write,mmap callbacks to check file specific data
      (such as inode owner) as part of any privilege validation.
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2c3c8bea
  24. 14 3月, 2010 1 次提交
  25. 26 11月, 2009 1 次提交
  26. 14 4月, 2009 1 次提交