29 Oct, 2013

5 commits


14 Oct, 2013

1 commit

  • New API regmap_multi_reg_write() is defined that allows a set of reg,val
    pairs to be written to a I2C client device as one block transfer from the
    point of view of a single I2C master system.

    A simple demonstration implementation is included that just splits the
    block write request into a sequence of single register writes.

    The implementation will be modified later to support those I2C clients
    that implement the alternative non-standard MULTIWRITE block write mode
    so to achieve a single I2C transfer that will be atomic even in multiple
    I2C master systems.

    Signed-off-by: Anthony Olech
    Signed-off-by: David Dajun Chen
    Signed-off-by: Mark Brown

    Anthony Olech
     

09 Oct, 2013

1 commit

  • Make it easier for drivers to include single register writes in
    asynchronous sequences by providing async versions of the write
    and update bits operations. The update bits operations are only
    likely to be effective when used with devices that have caches
    but this is common enough to be useful.

    Signed-off-by: Mark Brown

    Mark Brown
     

21 Sep, 2013

1 commit


17 Sep, 2013

2 commits

  • Current Linux kernel is supporting regmap_field method
    and it is very useful feature.
    It needs one regmap_filed for one register access.

    OTOH, there is multi port device which
    has many same registers in the market.
    The difference for each register access is
    only its address offset.

    Current API needs many regmap_field for such device,
    but it is not good.
    This patch adds new regmap_fileds API which can care
    about multi port/offset access via regmap.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Kuninori Morimoto
     
  • Current regmap_field is supporting read/write functions.
    This patch adds new update_bits function for it.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Kuninori Morimoto
     

04 Sep, 2013

1 commit

  • Pull regmap updates from Mark Brown:
    "A quiet release for regmap, some cleanups, fixes and:

    - Improved node coalescing for rbtree, reducing memory usage and
    improving performance during syncs.
    - Support for registering multiple register patches.
    - A quirk for handling interrupts that need to be clear when masked
    in regmap-irq"

    * tag 'regmap-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
    regmap: rbtree: Make cache_present bitmap per node
    regmap: rbtree: Reduce number of nodes, take 2
    regmap: rbtree: Simplify adjacent node look-up
    regmap: debugfs: Fix continued read from registers file
    regcache-rbtree: Fix reg_stride != 1
    regmap: Allow multiple patches to be registered
    regmap: regcache: allow read-only regs to be cached
    regmap: fix regcache_reg_present() for empty cache
    regmap: core: allow a virtual range to cover its own data window
    regmap: irq: document mask/wake_invert flags
    regmap: irq: make flags bool and put them in a bitfield
    regmap: irq: Allow to acknowledge masked interrupts during initialization
    regmap: Provide __acquires/__releases annotations

    Linus Torvalds
     

01 Sep, 2013

1 commit


15 Aug, 2013

1 commit

  • The use of WARN_ON() needs the definitions from bug.h, without it
    you can get:

    include/linux/regmap.h: In function 'regmap_write':
    include/linux/regmap.h:525:2: error: implicit declaration of function 'WARN_ONCE' [-Werror=implicit-function-declaration]

    Signed-off-by: Kevin Hilman
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Kevin Hilman
     

07 Aug, 2013

1 commit

  • regmap.h requires linux/err.h if CONFIG_REGMAP is not defined. Without it I get
    error.
    CC drivers/media/platform/exynos4-is/fimc-reg.o
    In file included from drivers/media/platform/exynos4-is/fimc-reg.c:14:0:
    include/linux/regmap.h: In function ‘regmap_write’:
    include/linux/regmap.h:525:10: error: ‘EINVAL’ undeclared (first use in this function)
    include/linux/regmap.h:525:10: note: each undeclared identifier is reported only once for each function it appears in

    Signed-off-by: Mateusz Krawczuk
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mark Brown
    Cc: stable@kernel.org

    Mateusz Krawczuk
     

24 Jul, 2013

3 commits


30 Jun, 2013

1 commit


12 Jun, 2013

1 commit

  • It is common to access regmap registers at bit level, using
    regmap_update_bits or regmap_read functions, however the end user has to
    take care of a mask or shifting. This becomes overhead when such use
    cases are high. Having a common function to do this is much convenient
    and less error prone.

    The idea of regmap_field is simple, regmap_field gives a logical
    structure to bits of the regmap register, and the driver can use this
    logical entity without the knowledge of the bit positions and masks all
    over the code. This way code looks much neat and it need not handle the
    masks, shifts every time it access the those entities.

    With this new regmap_field_read/write apis the end user can setup a
    regmap field using regmap_field_init and use the return regmap_field to
    read write the register field without worrying about the masks or
    shifts.

    Also this apis will be useful for drivers which are based on regmaps,
    like some clocks or pinctrls which can work on the regmap_fields
    directly without having to worry about bit positions.

    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Mark Brown

    Srinivas Kandagatla
     

12 May, 2013

2 commits


27 Mar, 2013

1 commit


15 Feb, 2013

5 commits


29 Jan, 2013

2 commits

  • Some use cases like firmware download can transfer a lot of data in quick
    succession. With high speed buses these use cases can benefit from having
    multiple transfers scheduled at once since this allows the bus to minimise
    the delay between transfers.

    Support this by adding regmap_raw_write_async(), allowing raw transfers to
    be scheduled, and regmap_async_complete() to wait for them to finish.

    Signed-off-by: Mark Brown

    Mark Brown
     
  • This commit adds provision for "no-bus" usage of the regmap API. In
    this configuration user can provide API with two callbacks 'reg_read'
    and 'reg_write' which are to be called when reads and writes to one of
    device's registers is performed. This is useful for devices that
    expose registers but whose register access sequence does not fit the 'bus'
    abstraction.

    Signed-off-by: Andrey Smirnov
    Signed-off-by: Mark Brown

    Andrey Smirnov
     

05 Jan, 2013

1 commit


02 Jan, 2013

1 commit

  • While for I2C and SPI devices the overhead of using rbtree for devices with
    only one block of registers is negligible the same isn't always going to
    be true for MMIO devices where the I/O costs are very much lower. Cater
    for these devices by adding a simple flat array type for them where the
    lookups are simple array accesses, taking us right back to the original
    ASoC cache implementation.

    Thanks to Magnus Damm for the discussion which prompted this.

    Signed-off-by: Mark Brown

    Mark Brown
     

11 Dec, 2012

3 commits


21 Nov, 2012

2 commits


17 Oct, 2012

1 commit

  • It is sometimes convenient for a regmap user to override the standard
    regmap lock/unlock functions with custom functions.
    For instance this can be useful in case an already existing spinlock
    or mutex has to be used for locking a set of registers instead of the
    internal regmap spinlock/mutex.
    Note that the fast_io field of struct regmap_bus is ignored in case
    custom locking functions are used.

    Signed-off-by: Davide Ciminaghi
    Signed-off-by: Mark Brown

    Davide Ciminaghi
     

15 Oct, 2012

3 commits