- 26 7月, 2014 2 次提交
-
-
由 Mark Brown 提交于
Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Tuomas Tynkkynen 提交于
Add a new function regmap_get_device to obtain the underlying struct device from a regmap. Signed-off-by: NTuomas Tynkkynen <ttynkkynen@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 5月, 2014 2 次提交
-
-
由 Geert Uytterhoeven 提交于
drivers/base/regmap/regmap.c: In function ‘_regmap_range_multi_paged_reg_write’: drivers/base/regmap/regmap.c:1665: warning: ‘this_page’ may be used uninitialized in this function Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Xiubo Li 提交于
Since we cannot make sure the 'len = pair_size * num_regs' will always be none zero from the users, and then if 'num_regs' equals to zero by mistake or other reasons, the kzalloc() will return ZERO_SIZE_PTR, which equals to ((void *)16). So this patch fix this with just doing the 'len' zero check before calling kzalloc(). Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 18 4月, 2014 1 次提交
-
-
由 Boris BREZILLON 提交于
Some busses do not support sending/receiving multiple registers in one go. Such kind of busses just unpack the registers that have been previously packed by the regmap core or pack registers that will be later unpacked by the core code. Add reg_write and reg_read callbacks in order to optimize access through this kind of busses. Signed-off-by: NBoris BREZILLON <boris.brezillon@free-electrons.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 14 4月, 2014 1 次提交
-
-
由 Xiubo Li 提交于
Allow busses to request little endianness formatting and parsing for 16- and 32-bit values. This will be useful to support regmap-mmio. For the following the scenarios using the regmap-mmio, for example: Index CPU Device Endianess flag for values ---------------------------------------------------------- 1 LE LE REGMAP_ENDIAN_DEFAULT/NATIVE 2 LE BE REGMAP_ENDIAN_BIG 3 BE BE REGMAP_ENDIAN_DEFAULT/NATIVE 4 BE LE REGMAP_ENDIAN_LITTLE For one device driver, which will support all the cases above, needs two boolean properties in DT node like: 'big-endian' for case 2 and 'little-endian' for case 4, and for cases 1 and 3 they all will be absent. Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 4月, 2014 1 次提交
-
-
由 Daeseok Youn 提交于
It need to add curly braces because the inner for "if" has two statements. coccicheck says: drivers/base/regmap/regmap.c:765:2-44: code aligned with following code on line 766 Signed-off-by: NDaeseok Youn <daeseok.youn@gmail.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 18 3月, 2014 2 次提交
-
-
由 Takashi Iwai 提交于
regmap deploys the spinlock for the protection when set up in fast_io mode. This may lead to sleep-in-atomic by memory allocation with GFP_KERNEL in regmap_bulk_write(). This patch fixes it by moving the allocation out of the lock. [Fix excessively large locked region -- broonie] Signed-off-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
With fast_io we use mutexes to lock the I/O operations so we would need to do GFP_ATOMIC allocations if we wanted to do allocations inside the lock as we do currently. Since it is unlikely that we will want to register a patch outside of init where concurrency shouldn't be an issue move the allocation of the patch data outside the lock. Reported-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 11 3月, 2014 1 次提交
-
-
This is the implementation of regmap_multi_reg_write() There is a new capability 'can_multi_write' that device drivers must set in order to use this multi reg write mode. This replaces the first definition, which just defined the API. Signed-off-by: NAnthony Olech <anthony.olech.opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 06 3月, 2014 1 次提交
-
-
由 Nenghua Cao 提交于
In some cases, we need regmap's format parse_val function to do be/le translation according to the bus configuration. For example, snd_soc_bytes_put() uses regmap to write/read values, and use cpu_to_be() directly to covert MASK into big endian. This is a defect, and should use regmap's format function to do it according to bus configuration. Signed-off-by: NNenghua Cao <nhcao@marvell.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 26 2月, 2014 3 次提交
-
-
由 Charles Keepax 提交于
Since we now have an internal version of regmap_multi_reg_write use this to apply the register patch. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Charles Keepax 提交于
Devices with more complex boot proceedures may occasionally apply the register patch manual. regmap_multi_reg_write is a logical way to do so, however the patch must be applied with cache bypass on, such that it doesn't override any user settings. This patch adds a regmap_multi_reg_write_bypassed function that applies a set of writes with the bypass enabled. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Charles Keepax 提交于
There should be no need for the writes supplied to this function to be edited by it so mark them as const. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 22 2月, 2014 2 次提交
-
-
由 Nenghua Cao 提交于
/drivers/base/regmap/regmap.c:717:6-33: WARNING: Comparison to bool. More information about semantic patching is available at http://coccinelle.lip6.fr/Signed-off-by: NNenghua Cao <nhcao@marvell.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Charles Keepax 提交于
Currently, we check the registers in the patch are aligned to the register stride everytime we sync the cache and the first time the patch is written out is unchecked. This patch checks the register patch when we first register it so the first writes are no longer unchecked and then doesn't check on subsequent syncs as the patch will be unchanged. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 20 2月, 2014 1 次提交
-
-
由 Xiubo Li 提交于
Since sometimes the 'config' parameter has no use, it should be NULL. And make the code simplifier. Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 16 2月, 2014 1 次提交
-
-
由 Michal Simek 提交于
Create special function regmap_attach_dev which can be called separately out of regmap_init. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 12 2月, 2014 1 次提交
-
-
由 Michal Simek 提交于
Check if regs are readable. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 12月, 2013 1 次提交
-
-
由 Stephen Boyd 提交于
regmap_bulk_write() should decay to performing individual writes if we're using a "no-bus" regmap. Unfortunately, it returns an error because there is no map->bus pointer. Fix it. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 12月, 2013 1 次提交
-
-
由 Stephen Boyd 提交于
regmap_bulk_read() should decay to performing individual reads if we're using a "no-bus" regmap. Unfortunately, it returns an error because there is no map->bus pointer. Fix it. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 11月, 2013 1 次提交
-
-
由 Cai Zhiyong 提交于
This patch give a warning when calling regmap_register_patch with parameter num_regs <= 0. When the num_regs parameter is zero and krealloc doesn't fail, then the code would return an uninitialized value. However, calling this function with num_regs == 0, would be a waste as it essentially does nothing. Signed-off-by: NCai Zhiyong <caizhiyong@huawei.com> Reviewed-by: NGeyslan G. Bem <geyslan@gmail.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 21 11月, 2013 1 次提交
-
-
由 Courtney Cavin 提交于
Signed-off-by: NCourtney Cavin <courtney.cavin@sonymobile.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 12 11月, 2013 1 次提交
-
-
由 Gerhard Sittig 提交于
fix a trivial copy'n'paste error in the regmap kerneldoc, s/write/read/ for the regmap_read(), regmap_raw_read() and regmap_bulk_read() routines Signed-off-by: NGerhard Sittig <gsi@denx.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 15 10月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Extend the interface for async I/O by allowing the value buffer to be omitted and sending the value as part of the register buffer, minimising the number of separate hardware operations required. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 14 10月, 2013 1 次提交
-
-
由 Anthony Olech 提交于
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: NAnthony Olech <anthony.olech.opensource@diasemi.com> Signed-off-by: NDavid Dajun Chen <david.chen@diasemi.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 11 10月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Try to speed up patch application a little using async I/O. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 10 10月, 2013 1 次提交
-
-
由 Anthony Olech 提交于
When regmap_bulk_write() is called with the map->use_single_rw flag set an immediate mutex deadlock happens because regmap_raw_write() is called after obtaining the mutex and regmap_raw_write() itself then tries to obtain the mutex as well. It is obvious that no one other than myself tried it with a real device. I did, but only for the purposes of an experiment and demonstration. But even if this situation will never ever happen with a real device, it is a bug and therefore should be fixed. Signed-off-by: NAnthony Olech <anthony.olech.opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 09 10月, 2013 3 次提交
-
-
由 Mark Brown 提交于
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: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
Rather than passing a flag around through the entire call stack store it in the regmap struct and read it when required. This minimises the visibility of the feature through the API, minimising the code updates needed to use it more widely. Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
Since it is quite common for single register raw or async writes to be generated by rbtree cache syncs or firmware downloads and essentially all hardware will be faster with only a single transfer optimise this case by copying single values into the internal scratch buffer before sending. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 08 10月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Rather than allocating and deallocating the structures used to manage async transfers each time we do one keep the structures around as long as the regmap is around. This should provide a small performance improvement. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 9月, 2013 2 次提交
-
-
由 Kuninori Morimoto 提交于
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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Kuninori Morimoto 提交于
Current regmap_field is supporting read/write functions. This patch adds new update_bits function for it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 8月, 2013 1 次提交
-
-
由 Mark Brown 提交于
It may be useful to register multiple patches with regmap, for example one that depends on the device revision and one that depends on the system configuration. Add support for doing this, appending any new patches to the existing patches. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 09 8月, 2013 1 次提交
-
-
由 Ionut Nicu 提交于
The regmap_writeable() check should not be done in regcache_write() because this prevents read-only registers to be cached. After a read on a read-only register its value will not be stored in the cache and the next time someone will try to read it the value will be read from the bus instead of the cache. Instead the regmap_writeable() check should be done in _regmap_write() to prevent callers from writing to read-only registers. Signed-off-by: NIonut Nicu <ioan.nicu.ext@nsn.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 07 8月, 2013 1 次提交
-
-
由 Philipp Zabel 提交于
I see no reason why a virtual range shouldn't be allowed to cover its own data window if the page selection register is in the same place on every page. For chips which use paged access for all of their registers, but only when connected via I2C, and which can access the whole register space directly when connected via SPI, this allows to avoid acrobatics with the register ranges by simply mapping the I2C ranges over the data window beginning at 0x0, and then using linear access for the SPI variant. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 16 7月, 2013 1 次提交
-
-
由 Fabio Estevam 提交于
Fix the following sparse warnings: drivers/base/regmap/regmap.c:305:13: warning: context imbalance in 'regmap_lock_spinlock' - wrong count at exit drivers/base/regmap/regmap.c:314:13: warning: context imbalance in 'regmap_unlock_spinlock' - unexpected unlock Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 04 7月, 2013 1 次提交
-
-
由 Daniel Mack 提交于
Commit f8bd822c ("regmap: cache: Factor out block sync") made regcache_rbtree_sync() call regmap_async_complete(), which in turn does not check for map->bus before dereferencing it. This causes a NULL pointer dereference on bus-less maps. Signed-off-by: NDaniel Mack <zonque@gmail.com> Cc: stable@vger.kernel.org [v3.10 only] Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 12 6月, 2013 1 次提交
-
-
由 Srinivas Kandagatla 提交于
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: NSrinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-