- 30 3月, 2013 1 次提交
-
-
由 Mark Brown 提交于
The idea of maintaining a bitmap of present registers is something that can usefully be used by other cache types that maintain blocks of cached registers so move the code out of the rbtree cache and into the generic regcache code. Refactor the interface slightly as we go to wrap the set bit and enlarge bitmap operations (since we never do one without the other) and make it more robust for reads of uncached registers by bounds checking before we look at the bitmap. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
-
- 27 3月, 2013 2 次提交
-
-
由 Mark Brown 提交于
Provide a helper to do the size based index into a block of registers and use it when reading a value. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
This allows the cache to sync values directly to the device when stored in native format and also allows asynchronous I/O. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 04 3月, 2013 2 次提交
-
-
由 Mark Brown 提交于
Currently the value parsing operations both return the parsed value and modify the passed buffer. This precludes their use in places like the cache code so split out the in place modification into a new parse_inplace() operation. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
It's more idiomatic to pass the map structure around and this means we can use other bits of information from the map. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 11 2月, 2013 1 次提交
-
-
由 Dimitris Papastamos 提交于
We are keeping track of the maximum register as well, this will make things easier for us in sharing this code with the code implementing the register ranges functionality. It also simplifies a bit the calculations when looking for the relevant block:offset from within the cache. Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 29 1月, 2013 2 次提交
-
-
由 Mark Brown 提交于
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: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Andrey Smirnov 提交于
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: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 14 1月, 2013 2 次提交
-
-
由 Andrey Smirnov 提交于
This commit is a preparatory commit to provide "no-bus" configuration option for regmap API. It adds necessary plumbing needed to have the ability to provide user define register write function. Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Andrey Smirnov 提交于
This commit is a preparatory commit to provide "no-bus" configuration option for regmap API. It adds necessary plumbing needed to have the ability to provide user define register read function. Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 02 1月, 2013 1 次提交
-
-
由 Mark Brown 提交于
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: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 11 12月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Avoid doing a linear scan of the entire register map for each read() of the debugfs register dump by recording the offsets where valid registers exist when we first read the registers file. This assumes the set of valid registers never changes, if this is not the case invalidation of the cache will be required. This could be further improved for large blocks of contiguous registers by calculating the register we will read from within the block - currently we do a linear scan of the block. An rbtree may also be worthwhile. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 06 12月, 2012 1 次提交
-
-
由 Mark Brown 提交于
No point in calculating them every time. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 21 11月, 2012 1 次提交
-
-
由 Davide Ciminaghi 提交于
Many of the regmap enabled drivers implementing one or more of the readable, writeable, volatile and precious methods use the same code pattern: return ((reg >= X && reg <= Y) || (reg >= W && reg <= Z) || ...) Switch to a data driven approach, using tables to describe readable/writeable/volatile and precious registers ranges instead. The table based check can still be overridden by passing the usual function pointers via struct regmap_config. Signed-off-by: NDavide Ciminaghi <ciminaghi@gnudd.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 17 10月, 2012 1 次提交
-
-
由 Davide Ciminaghi 提交于
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: NDavide Ciminaghi <ciminaghi@gnudd.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 15 10月, 2012 2 次提交
-
-
由 Mark Brown 提交于
If a register range is named then provide a debugfs file showing the contents of the range separately. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
For more useful diagnostics. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 18 6月, 2012 1 次提交
-
-
由 Krystian Garbaciak 提交于
Devices with register paging or indirectly accessed registers can configure register mapping to map those on virtual address range. During access to virtually mapped register range, indirect addressing is processed automatically, in following steps: 1. selector for page or indirect register is updated (when needed); 2. register in data window is accessed. Configuration should provide minimum and maximum register for virtual range, details of selector field for page selection, minimum and maximum register of data window for indirect access. Virtual range registers are managed by cache as well as direct access registers. In order to make indirect access more efficient, selector register should be declared as non-volatile, if possible. struct regmap_config is extended with the following: struct regmap_range_cfg *ranges; unsigned int n_ranges; [Also reordered debugfs init to later on since the cleanup code was conflicting with the new cleanup code for ranges anyway -- broonie] Signed-off-by: NKrystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 09 5月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Use devres to implement dev_get_regmap(). This should mean that in almost all cases devices wishing to take advantage of framework features based on regmap shouldn't need to explicitly pass the regmap into the framework. This simplifies device setup a bit. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 01 5月, 2012 1 次提交
-
-
由 Ashish Jangam 提交于
Some devices does not support bulk read and write operations, for them we have series of single write and read operations. Signed-off-by: NAnthony Olech <Anthony.Olech@diasemi.com> Signed-off-by: NAshish Jangam <ashish.jangam@kpitcummins.com> [Fixed coding style, don't check use_single_rw before assign --broonie ] Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 13 4月, 2012 6 次提交
-
-
由 Stephen Warren 提交于
regmap_config.reg_stride is introduced. All extant register addresses are a multiple of this value. Users of serial-oriented regmap busses will typically set this to 1. Users of the MMIO regmap bus will typically set this based on the value size of their registers, in bytes, so 4 for a 32-bit register. Throughout the regmap code, actual register addresses are used. Wherever the register address is used to index some array of values, the address is divided by the stride to determine the index, or vice-versa. Error- checking is added to all entry-points for register address data to ensure that register addresses actually satisfy the specified stride. The MMIO bus ensures that the specified stride is large enough for the register size. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
Commit 79c64d5 "regmap: allow regmap instances to be named" changed the prototype of regmap_debugfs_init, but didn't update the dummy inline used when !CONFIG_DEBUGFS. Fix this. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
Some devices have multiple separate register regions. Logically, one regmap would be created per region. One issue that prevents this is that each instance will attempt to create the same debugfs files. Avoid this by allowing regmaps to be named, and use the name to construct the debugfs directory name. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
Some bus types have very fast IO. For these, acquiring a mutex for every IO operation is a significant overhead. Allow busses to indicate their IO is fast, and enhance regmap to use a spinlock for those busses. [Currently limited to native endian registers -- broonie] Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
The only context needed by I2C and SPI bus definitions is the device itself; this can be converted to an i2c_client or spi_device in order to perform IO on the device. However, other bus types may need more context in order to perform IO. Enable this by having regmap_init accept a bus_context parameter, and pass this to all bus callbacks. The existing callbacks simply pass the struct device here. Future bus types may pass something else. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Marc Reilly 提交于
This change combines any padding bits into the register address bits when determining register format handlers to use the next byte-divisible register size. A reg_shift member is introduced to the regmap struct to enable fixup of the reg format. Format handlers now take an extra parameter specifying the number of bits to shift the value by. Signed-off-by: NMarc Reilly <marc@cpdesign.com.au> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 10 4月, 2012 3 次提交
-
-
由 Stephen Warren 提交于
regmap_config.reg_stride is introduced. All extant register addresses are a multiple of this value. Users of serial-oriented regmap busses will typically set this to 1. Users of the MMIO regmap bus will typically set this based on the value size of their registers, in bytes, so 4 for a 32-bit register. Throughout the regmap code, actual register addresses are used. Wherever the register address is used to index some array of values, the address is divided by the stride to determine the index, or vice-versa. Error- checking is added to all entry-points for register address data to ensure that register addresses actually satisfy the specified stride. The MMIO bus ensures that the specified stride is large enough for the register size. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
Commit 79c64d5 "regmap: allow regmap instances to be named" changed the prototype of regmap_debugfs_init, but didn't update the dummy inline used when !CONFIG_DEBUGFS. Fix this. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
Some devices have multiple separate register regions. Logically, one regmap would be created per region. One issue that prevents this is that each instance will attempt to create the same debugfs files. Avoid this by allowing regmaps to be named, and use the name to construct the debugfs directory name. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 06 4月, 2012 2 次提交
-
-
由 Stephen Warren 提交于
Some bus types have very fast IO. For these, acquiring a mutex for every IO operation is a significant overhead. Allow busses to indicate their IO is fast, and enhance regmap to use a spinlock for those busses. [Currently limited to native endian registers -- broonie] Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
The only context needed by I2C and SPI bus definitions is the device itself; this can be converted to an i2c_client or spi_device in order to perform IO on the device. However, other bus types may need more context in order to perform IO. Enable this by having regmap_init accept a bus_context parameter, and pass this to all bus callbacks. The existing callbacks simply pass the struct device here. Future bus types may pass something else. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 01 4月, 2012 1 次提交
-
-
由 Marc Reilly 提交于
This change combines any padding bits into the register address bits when determining register format handlers to use the next byte-divisible register size. A reg_shift member is introduced to the regmap struct to enable fixup of the reg format. Format handlers now take an extra parameter specifying the number of bits to shift the value by. Signed-off-by: NMarc Reilly <marc@cpdesign.com.au> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 24 2月, 2012 1 次提交
-
-
由 Mark Brown 提交于
In order to allow us to support partial sync operations add minimum and maximum register arguments to the sync operation and update the rbtree and lzo caches to use this new information. The LZO implementation is obviously not good, we could exit the iteration earlier, but there may be room for more wide reaching optimisation there. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 07 2月, 2012 1 次提交
-
-
由 Mark Brown 提交于
This was a cut'n'paste from some older code. Since we're about to add debugfs support don't do the obvious thing and use bool, use u32 instead (which debugfs has been using since time immemorial). Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 23 1月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Device manufacturers frequently provide register sequences, usually not fully documented, to be run at startup in order to provide better defaults for devices (for example, improving performance in the light of silicon evaluation). Support such updates by allowing drivers to register update sets with the core. These updates will be written to the device immediately and will also be rewritten when the cache is synced. The assumption is that the reason for resyncing the cache will always be that the device has been powered off. If this turns out to not be the case then a separate operation can be provided. Currently the implementation only allows a single set of updates to be specified for a device, this could be extended in future. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 20 1月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Some devices, especially those with high speed control interfaces, require padding between the register and the data. Support this in the regmap API by providing a pad_bits configuration parameter. Only devices with integer byte counts are supported. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 13 12月, 2011 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Move the initialization regcache related fields of the regmap struct to regcache_init. This allows us to keep regmap and regcache code better separated. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 21 11月, 2011 1 次提交
-
-
由 Mark Brown 提交于
There should be no situation where it offers any advantage over rbtree and there are no current users so remove the code for simplicity. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 17 11月, 2011 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Move the initialization regcache related fields of the regmap struct to regcache_init. This allows us to keep regmap and regcache code better separated. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 08 11月, 2011 1 次提交
-
-
由 Mark Brown 提交于
Allow drivers to optimise out the register cache sync if they didn't need to do one. If the hardware is desynced from the register cache (by power loss for example) then the driver should call regcache_mark_dirty() to let the core know about this. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-