1. 24 Jan, 2018 4 commits
  2. 17 Jan, 2018 4 commits
  3. 15 Jan, 2018 20 commits
  4. 04 Jan, 2018 1 commit
    • Jan Kundrát's avatar
      i2c: gpio: Enable working over slow can_sleep GPIOs · f11a0446
      Jan Kundrát authored
      "Slow" GPIOs (usually those connected over an SPI or an I2C bus) are,
      well, slow in their operation. It is generally a good idea to avoid
      using them for time-critical operation, but sometimes the hardware just
      sucks, and the software has to cope. In addition to that, the I2C bus
      itself does not actually define any strict timing limits; the bus is
      free to go all the way down to DC. The timeouts (and therefore the
      slowest acceptable frequency) are present only in SMBus.
      
      The `can_sleep` is IMHO a wrong concept to use here. My SPI-to-quad-UART
      chip (MAX14830) is connected via a 26MHz SPI bus, and it happily drives
      SCL at 200kHz (5µs pulses) during my benchmarks. That's faster than the
      maximal allowed speed of the traditional I2C.
      
      The previous version of this code did not really block operation over
      slow GPIO pins, anyway. Instead, it just resorted to printing a warning
      with a backtrace each time a GPIO pin was accessed, thereby slowing
      things down even more.
      
      Finally, it's not just me. A similar patch was originally submitted in
      2015 [1].
      
      [1] https://patchwork.ozlabs.org/patch/450956/Signed-off-by: default avatarJan Kundrát <jan.kundrat@cesnet.cz>
      Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      f11a0446
  5. 03 Jan, 2018 4 commits
  6. 02 Jan, 2018 4 commits
  7. 01 Jan, 2018 3 commits
    • Bartosz Golaszewski's avatar
      eeprom: at24: fix a whitespace error in platform data · 98fb3a34
      Bartosz Golaszewski authored
      Replace spaces with tabs in the definition of AT24_FLAG_NO_RDROL.
      
      Fixes: 9d404411091c ("eeprom: at24: support eeproms that do not auto-rollover reads")
      Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
      98fb3a34
    • Bartosz Golaszewski's avatar
      eeprom: at24: add support for the write-protect pin · 6ce261e8
      Bartosz Golaszewski authored
      AT24 EEPROMs have a write-protect pin, which - when pulled high -
      inhibits writes to the upper quadrant of memory (although it has been
      observed that on some chips it disables writing to the entire memory
      range).
      
      On some boards, this pin is connected to a GPIO and pulled high by
      default, which forces the user to manually change its state before
      writing. On linux this means that we either need to hog the line all
      the time, or set the GPIO value before writing from outside of the
      at24 driver.
      
      Make the driver check if the write-protect GPIO was defined in the
      device tree and pull it low whenever writing to the EEPROM.
      Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      6ce261e8
    • Bartosz Golaszewski's avatar
      dt-bindings: at24: new optional property - wp-gpios · 3f3d8ef7
      Bartosz Golaszewski authored
      AT24 EEPROMs have a write-protect pin, which - when pulled high -
      inhibits writes to the upper quadrant of memory (although it has been
      observed that on some chips it disables writing to the entire memory
      range).
      
      On some boards, this pin is connected to a GPIO and pulled high by
      default, which forces the user to manually change its state before
      writing. On linux this means that we either need to hog the line all
      the time, or set the GPIO value before writing from outside of the
      at24 driver.
      
      Add a new optional property to the device tree binding document, which
      allows to specify the GPIO line to which the write-protect pin is
      connected.
      Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      3f3d8ef7