1. 06 10月, 2020 1 次提交
  2. 29 9月, 2020 1 次提交
  3. 03 9月, 2020 1 次提交
  4. 27 8月, 2020 1 次提交
  5. 17 7月, 2020 1 次提交
  6. 08 7月, 2020 1 次提交
  7. 16 6月, 2020 1 次提交
  8. 02 6月, 2020 1 次提交
  9. 29 5月, 2020 2 次提交
  10. 20 4月, 2020 2 次提交
  11. 14 4月, 2020 2 次提交
  12. 20 2月, 2020 1 次提交
  13. 10 1月, 2020 1 次提交
  14. 19 6月, 2019 1 次提交
  15. 15 6月, 2019 1 次提交
  16. 07 6月, 2019 1 次提交
  17. 23 1月, 2019 1 次提交
    • M
      regmap: regmap-irq: Add main status register support · a2d21848
      Matti Vaittinen 提交于
      There is bunch of devices with multiple logical blocks which
      can generate interrupts. It's not a rare case that the interrupt
      reason registers are arranged so that there is own status/ack/mask
      register for each logical block. In some devices there is also a
      'main interrupt register(s)' which can indicate what sub blocks
      have interrupts pending.
      
      When such a device is connected via slow bus like i2c the main
      part of interrupt handling latency can be caused by bus accesses.
      On systems where it is expected that only one (or few) sub blocks
      have active interrupts we can reduce the latency by only reading
      the main register and those sub registers which have active
      interrupts. Support this with regmap-irq for simple cases where
      main register does not require acking or masking.
      Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a2d21848
  18. 20 12月, 2018 2 次提交
    • B
      regmap: irq: add an option to clear status registers on unmask · c82ea33e
      Bartosz Golaszewski 提交于
      Some interrupt controllers whose interrupts are acked on read will set
      the status bits for masked interrupts without changing the state of
      the IRQ line.
      
      Some chips have an additional "feature" where if those set bits are
      not cleared before unmasking their respective interrupts, the IRQ
      line will change the state and we'll interpret this as an interrupt
      although it actually fired when it was masked.
      
      Add a new field to the irq chip struct that tells the regmap irq chip
      code to always clear the status registers before actually changing the
      irq mask values.
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      c82ea33e
    • M
      regmap: regmap-irq/gpio-max77620: add level-irq support · 1c2928e3
      Matti Vaittinen 提交于
      Add level active IRQ support to regmap-irq irqchip. Change breaks
      existing regmap-irq type setting. Convert the existing drivers which
      use regmap-irq with trigger type setting (gpio-max77620) to work
      with this new approach. So we do not magically support level-active
      IRQs on gpio-max77620 - but add support to the regmap-irq for chips
      which support them =)
      
      We do not support distinguishing situation where HW supports rising
      and falling edge detection but not both. Separating this would require
      inventing yet another flags for IRQ types.
      Signed-off-by: NMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1c2928e3
  19. 14 12月, 2018 1 次提交
    • B
      regmap: irq: handle HW using separate rising/falling edge interrupts · bc998a73
      Bartosz Golaszewski 提交于
      Some interrupt controllers use separate bits for controlling rising
      and falling edge interrupts in the mask register i.e. they have one
      interrupt for rising edge and one for falling.
      
      We already handle the case where we have a single interrupt in the
      mask register and a separate type configuration register.
      
      Add a new switch to regmap_irq_chip which tells the framework to use
      the mask_base address for configuring the edge of the interrupts that
      define type_falling/rising_mask values.
      
      For such interrupts we never update the type_base bits. For interrupts
      that don't define type masks or their regmap irq chip doesn't set the
      type_in_mask to true everything stays the same.
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      bc998a73
  20. 15 11月, 2018 1 次提交
  21. 19 10月, 2018 1 次提交
  22. 07 9月, 2018 1 次提交
    • D
      regmap: split up regmap_config.use_single_rw · 1c96a2f6
      David Frey 提交于
      Split regmap_config.use_single_rw into use_single_read and
      use_single_write. This change enables drivers of devices which only
      support bulk operations in one direction to use the regmap_bulk_*()
      functions for both directions and have their bulk operation split into
      single operations only when necessary.
      
      Update all struct regmap_config instances where use_single_rw==true to
      instead set both use_single_read and use_single_write. No attempt was
      made to evaluate whether it is possible to set only one of
      use_single_read or use_single_write.
      Signed-off-by: NDavid Frey <dpfrey@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1c96a2f6
  23. 09 8月, 2018 1 次提交
    • C
      regmap: Add regmap_noinc_read API · 74fe7b55
      Crestez Dan Leonard 提交于
      The regmap API usually assumes that bulk read operations will read a
      range of registers but some I2C/SPI devices have certain registers for
      which a such a read operation will return data from an internal FIFO
      instead. Add an explicit API to support bulk read without range semantics.
      
      Some linux drivers use regmap_bulk_read or regmap_raw_read for such
      registers, for example mpu6050 or bmi150 from IIO. This only happens to
      work because when caching is disabled a single regmap read op will map
      to a single bus read op (as desired). This breaks if caching is enabled and
      reg+1 happens to be a cacheable register.
      
      Without regmap support refactoring a driver to enable regmap caching
      requires separate I2C and SPI paths. This is exactly what regmap is
      supposed to help avoid.
      Suggested-by: NJonathan Cameron <jic23@kernel.org>
      Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com>
      Signed-off-by: NStefan Popa <stefan.popa@analog.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      74fe7b55
  24. 18 7月, 2018 1 次提交
    • A
      regmap: add SCCB support · bcf7eac3
      Akinobu Mita 提交于
      This adds Serial Camera Control Bus (SCCB) support for regmap API that
      is intended to be used by some of Omnivision sensor drivers.
      
      The ov772x and ov9650 drivers are going to use this SCCB regmap API.
      
      The ov772x driver was previously only worked with the i2c controller
      drivers that support I2C_FUNC_PROTOCOL_MANGLING, because the ov772x
      device doesn't support repeated starts.  After commit 0b964d18
      ("media: ov772x: allow i2c controllers without
      I2C_FUNC_PROTOCOL_MANGLING"), reading ov772x register is replaced with
      issuing two separated i2c messages in order to avoid repeated start.
      Using this SCCB regmap hides the implementation detail.
      
      The ov9650 driver also issues two separated i2c messages to read the
      registers as the device doesn't support repeated start.  So it can
      make use of this SCCB regmap.
      
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
      Cc: Wolfram Sang <wsa@the-dreams.de>
      Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
      Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Hans Verkuil <hans.verkuil@cisco.com>
      Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
      Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      bcf7eac3
  25. 26 5月, 2018 1 次提交
  26. 25 4月, 2018 1 次提交
    • S
      regmap: include <linux/ktime.h> from include/linux/regmap.h · f15cd6d9
      Sean Wang 提交于
      Similar to the readx_poll_timeout() macro calling ktime_* and using
      ktime_t type, which is declared in <linux/ktime.h>. So, make
      include/linux/regmap.h explicitly include <linux/ktime.h>, like
      include/linux/iopoll.h does.  Otherwise, users of the macro will see
      below errors.
      
      error: implicit declaration of function ‘ktime_add_us’
      [-Werror=implicit-function-declaration]
      
      error: implicit declaration of function ‘ktime_get’
      [-Werror=implicit-function-declaration]
      
      error: implicit declaration of function ‘ktime_compare’
      [-Werror=implicit-function-declaration]
      
      include/linux/regmap.h:128:2: error: unknown type name ‘ktime_t’
        ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      f15cd6d9
  27. 26 2月, 2018 1 次提交
    • M
      regmap: mmio: Add function to attach a clock · 31895662
      Maxime Ripard 提交于
      regmap_init_mmio_clk allows to specify a clock that needs to be enabled
      while accessing the registers.
      
      However, that clock is retrieved through its clock ID, which means it will
      lookup that clock based on the current device that registers the regmap,
      and, in the DT case, will only look in that device OF node.
      
      This might be problematic if the clock to enable is stored in another node.
      Let's add a function that allows to attach a clock that has already been
      retrieved to a regmap in order to fix this.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      31895662
  28. 08 1月, 2018 2 次提交
  29. 27 12月, 2017 1 次提交
  30. 19 12月, 2017 1 次提交
  31. 06 12月, 2017 1 次提交
    • B
      regmap: allow to disable all locking mechanisms · c9b41fcf
      Bartosz Golaszewski 提交于
      We have a use case in the at24 EEPROM driver (recently converted to
      using regmap instead of raw i2c/smbus calls) where we read from/write
      to the regmap in a loop, while protecting the entire loop with
      a mutex.
      
      Currently this implicitly makes us use two mutexes - one in the driver
      and one in regmap. While browsing the code for similar use cases I
      noticed a significant number of places where locking *seems* redundant.
      
      Allow users to completely disable any locking mechanisms in regmap
      config.
      Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      c9b41fcf
  32. 01 11月, 2017 1 次提交
  33. 14 10月, 2017 1 次提交
    • A
      regmap: avoid -Wint-in-bool-context warning · 1b0c22e4
      Arnd Bergmann 提交于
      When we pass the result of a multiplication as the timeout or the delay,
      we can get a warning from gcc-7:
      
      drivers/mmc/host/bcm2835.c:596:149: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
      drivers/mfd/arizona-core.c:247:195: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
      drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c:49:27: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
      
      The warning is a bit questionable inside of a macro, but this is
      intentional on the side of the gcc developers.  It is also an indication
      of another problem: we evaluate the timeout and sleep arguments multiple
      times, which can have undesired side-effects when those are complex
      expressions.
      
      This changes the two regmap variants to use local variables for storing
      copies of the timeouts.  This adds some more type safety, and avoids both
      the double-evaluation and the gcc warning.
      
      Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81484
      Link: http://lkml.kernel.org/r/20170726133756.2161367-1-arnd@arndb.deSigned-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1b0c22e4
  34. 04 10月, 2017 1 次提交
  35. 11 7月, 2017 1 次提交