1. 24 6月, 2022 3 次提交
  2. 09 5月, 2022 1 次提交
  3. 05 5月, 2022 1 次提交
    • M
      regmap: Add bulk read/write callbacks into regmap_config · d77e7456
      Marek Vasut 提交于
      Currently the regmap_config structure only allows the user to implement
      single element register read/write using .reg_read/.reg_write callbacks.
      The regmap_bus already implements bulk counterparts of both, and is being
      misused as a workaround for the missing bulk read/write callbacks in
      regmap_config by a couple of drivers. To stop this misuse, add the bulk
      read/write callbacks to regmap_config and call them from the regmap core
      code.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Jagan Teki <jagan@amarulasolutions.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Maxime Ripard <maxime@cerno.tech>
      Cc: Robert Foss <robert.foss@linaro.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      To: dri-devel@lists.freedesktop.org
      Link: https://lore.kernel.org/r/20220430025145.640305-1-marex@denx.deSigned-off-by: NMark Brown <broonie@kernel.org>
      d77e7456
  4. 19 3月, 2022 2 次提交
  5. 08 1月, 2022 1 次提交
    • F
      regmap: Call regmap_debugfs_exit() prior to _init() · 530792ef
      Fabio Estevam 提交于
      Since commit cffa4b21 ("regmap: debugfs: Fix a memory leak when
      calling regmap_attach_dev"), the following debugfs error is seen
      on i.MX boards:
      
      debugfs: Directory 'dummy-iomuxc-gpr@20e0000' with parent 'regmap' already present!
      
      In the attempt to fix the memory leak, the above commit added a NULL check
      for map->debugfs_name. For the first debufs entry, map->debugfs_name is NULL
      and then the new name is allocated via kasprintf().
      
      For the second debugfs entry, map->debugfs_name() is no longer NULL, so
      it will keep using the old entry name and the duplicate name error is seen.
      
      Quoting Mark Brown:
      
      "That means that if the device gets freed we'll end up with the old debugfs
      file hanging around pointing at nothing.
      ...
      To be more explicit this means we need a call to regmap_debugfs_exit()
      which will clean up all the existing debugfs stuff before we loose
      references to it."
      
      Call regmap_debugfs_exit() prior to regmap_debugfs_init() to fix
      the problem.
      
      Tested on i.MX6Q and i.MX6SX boards.
      
      Fixes: cffa4b21 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev")
      Suggested-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NFabio Estevam <festevam@denx.de>
      Link: https://lore.kernel.org/r/20220107163307.335404-1-festevam@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
      530792ef
  6. 15 11月, 2021 1 次提交
  7. 26 8月, 2021 1 次提交
  8. 02 8月, 2021 1 次提交
  9. 12 7月, 2021 2 次提交
  10. 26 5月, 2021 1 次提交
  11. 14 5月, 2021 1 次提交
  12. 13 11月, 2020 1 次提交
  13. 29 9月, 2020 2 次提交
  14. 22 9月, 2020 3 次提交
  15. 18 9月, 2020 3 次提交
  16. 03 9月, 2020 1 次提交
  17. 01 9月, 2020 1 次提交
  18. 10 7月, 2020 1 次提交
  19. 03 7月, 2020 1 次提交
  20. 18 6月, 2020 1 次提交
  21. 16 6月, 2020 1 次提交
  22. 08 6月, 2020 1 次提交
  23. 02 6月, 2020 1 次提交
  24. 01 6月, 2020 1 次提交
  25. 29 5月, 2020 1 次提交
  26. 14 4月, 2020 1 次提交
  27. 22 1月, 2020 1 次提交
  28. 12 6月, 2019 1 次提交
    • S
      regmap: fix bulk writes on paged registers · db057679
      Srinivas Kandagatla 提交于
      On buses like SlimBus and SoundWire which does not support
      gather_writes yet in regmap, A bulk write on paged register
      would be silently ignored after programming page.
      This is because local variable 'ret' value in regmap_raw_write_impl()
      gets reset to 0 once page register is written successfully and the
      code below checks for 'ret' value to be -ENOTSUPP before linearising
      the write buffer to send to bus->write().
      
      Fix this by resetting the 'ret' value to -ENOTSUPP in cases where
      gather_writes() is not supported or single register write is
      not possible.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      db057679
  29. 26 4月, 2019 1 次提交
  30. 03 4月, 2019 1 次提交
    • H
      regmap: verify if register is writeable before writing operations · 8b9f9d4d
      Han Nandor 提交于
      regmap provides a couple of ways to validate the register range used.
      a) maxim allowed register, b) writable/readable register tables,
      c) callback function that can be provided by the driver to validate
      a register. regmap framework should verify if registers
      are writeable before every write operation. However this doesn't
      seems to happen in every situation.
      
      The method `_regmap_raw_write_impl` is only using the `writeable_reg`
      callback to verify if register is writeable, ignoring the other two.
      This can lead to undefined behaviour since this allows to write to
      registers that could be declared un-writeable by using any other
      option.
      
      Change `_regmap_raw_write_impl` to use the `regmap_writeable` method
      to verify if registers are writable before the write operation.
      Signed-off-by: NNandor Han <nandor.han@vaisala.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      8b9f9d4d
  31. 19 10月, 2018 1 次提交