- 26 2月, 2018 1 次提交
-
-
由 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>
-
- 08 1月, 2018 2 次提交
-
-
由 Andrew F. Davis 提交于
All zero read and write masks in the regmap config are used to signal no special mask is needed and the bus defaults are used. In some devices all zero read/write masks are the special mask and bus defaults should not be used. To signal this a new variable is added. For example SPI often sets bit 7 in address to signal to the device a read is requested. On TI AFE44xx parts with SPI interfaces no bit needs to be set as registers are either read or write only and the operation can be determined from the address only. For this case both masks must be zero to not effect the address. Signed-off-by: NAndrew F. Davis <afd@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Vinod Koul 提交于
SoundWire bus provides sdw_read() and sdw_write() APIs for Slave devices to program the registers. Provide support in regmap for SoundWire bus. Signed-off-by: NHardik T Shah <hardik.t.shah@intel.com> Signed-off-by: NSanyog Kale <sanyog.r.kale@intel.com> Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com> Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 27 12月, 2017 1 次提交
-
-
由 Baolin Wang 提交于
Since the hwlock id 0 is valid for hardware spinlock core, but now id 0 is treated as one invalid value for regmap. Thus we should add one extra flag for regmap config to indicate if a hardware spinlock should be used, then id 0 can be valid for regmap to request. Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 19 12月, 2017 1 次提交
-
-
由 Srinivas Kandagatla 提交于
This patch adds support to read/write SLIMbus value elements. Currently it only supports byte read/write. Adding this support in regmap would give codec drivers more flexibility when there are more than 2 control interfaces like SLIMbus, i2c. Without this patch each codec driver has to directly call SLIMbus value element apis, and this could would get messy once we want to add i2c interface to it. Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviwed-by: NMark Brown <broonie@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 06 12月, 2017 1 次提交
-
-
由 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>
-
- 01 11月, 2017 1 次提交
-
-
由 Baolin Wang 提交于
On some platforms, when reading or writing some special registers through regmap, we should acquire one hardware spinlock to synchronize between the multiple subsystems. Thus this patch adds the hardware spinlock support for regmap. Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 10月, 2017 1 次提交
-
-
由 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>
-
- 04 10月, 2017 1 次提交
-
-
由 Chen-Yu Tsai 提交于
This patch adds a macro regmap_field_read_poll_timeout that works similar to the readx_poll_timeout defined in linux/iopoll.h, except that this can also return the error value returned by a failed regmap_field_read. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 11 7月, 2017 1 次提交
-
-
由 Ramesh Shanmugasundaram 提交于
Renamed variable "timeout" to "__timeout" & "pollret" to "__ret" to avoid namespace collision. Tidy up macro arguments with parentheses. Signed-off-by: NRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 6月, 2017 1 次提交
-
-
由 Michael Grzeschik 提交于
Some irq controllers have writeonly/multipurpose register layouts. In those cases we read invalid data back. Here we add the option mask_writeonly as masking option. Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 6月, 2017 1 次提交
-
-
由 Alex A. Mihaylov 提交于
Add basic support regmap (register map access) API for 1-Wire bus Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 1月, 2017 1 次提交
-
-
由 Charles Keepax 提交于
Most of the kernel-doc comments in regmap don't actually generate correctly. This patch fixes up a few common issues, corrects some typos and adds some missing argument descriptions. The most common issues being using a : after the function name which causes the short description to not render correctly and not separating the long and short descriptions of the function. There are quite a few instances of arguments not being described or given the wrong name as well. This patch doesn't fixup functions/structures that are currently missing descriptions. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 10月, 2016 1 次提交
-
-
由 Charles Keepax 提交于
As almost all of the callers of the regmap_read_poll_timeout macro will include a local ret variable we will always get a Sparse warning about the duplication of the ret variable: warning: symbol 'ret' shadows an earlier one Simply rename the ret variable in the marco to pollret to make this significantly less likely to happen. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 10月, 2016 1 次提交
-
-
由 Masahiro Yamada 提交于
The readx_poll_timeout() macro calls usleep_range(), which is declared in <linux/delay.h>. Make include/linux/regmap.h include <linux/delay.h>, like include/linux/iopoll.h does. Otherwise, users of the macro will see "implicit declaration of function 'usleep_range'" error. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 9月, 2016 1 次提交
-
-
由 Tony Lindgren 提交于
We currently only support masking the top bit for read and write flags. Let's make the mask unsigned long and mask the bytes based on the configured register length to make things more generic. This allows using regmap for more exotic combinations like SPI devices that need little endian addressing. Signed-off-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 7月, 2016 1 次提交
-
-
由 Philipp Zabel 提交于
This patch adds a macro regmap_read_poll_timeout that works similar to the readx_poll_timeout defined in linux/iopoll.h, except that this can also return the error value returned by a failed regmap_read. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 03 6月, 2016 1 次提交
-
-
由 Laxman Dewangan 提交于
Regmap irq implements the generic interrupt service routine which is common for most of devices. Some devices, like MAX77620, MAX20024 needs the special handling before and after servicing the interrupt as generic. For the example, MAX77620 programming guidelines for interrupt servicing says: 1. When interrupt occurs from PMIC, mask the PMIC interrupt by setting GLBLM. 2. Read IRQTOP and service the interrupt accordingly. 3. Once all interrupts has been checked and serviced, the interrupt service routine un-masks the hardware interrupt line by clearing GLBLM. The step (2) is implemented in regmap irq as generic routine. For step (1) and (3), add callbacks from regmap irq to client driver to handle chip specific configurations. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 3月, 2016 2 次提交
-
-
由 Laxman Dewangan 提交于
Add device managed APIs for regmap_add_irq_chip() and regmap_del_irq_chip() so that it can be managed by device framework for freeing it. This helps on following: 1. Maintaining the sequence of resource allocation and deallocation regmap_add_irq_chip(&d); devm_requested_threaded_irq(virq) On free path: regmap_del_irq_chip(d); and then removing the irq registration. On this case, regmap irq is deleted before the irq is free. This force to use normal irq registration. By using devm apis, the sequence can be maintain properly: devm_regmap_add_irq_chip(&d); devm_requested_threaded_irq(virq); and resource deallocation will be done in reverse order by device framework. 2. No need to delete the regmap_irq_chip in error path or remove callback and hence there is less code on this path. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
commit 23b92e4cf5fd ("regmap: remove regmap_write_bits()") removed regmap_write_bits(), but MFD driver was using it. So, commit e30fccd6771d ("regmap: Keep regmap_write_bits()") turns out it, but it is using original style. This patch uses regmap_update_bits_base() for regmap_write_bits() Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 26 2月, 2016 2 次提交
-
-
由 Kuninori Morimoto 提交于
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 20 2月, 2016 11 次提交
-
-
由 Kuninori Morimoto 提交于
This patch merges regmap_fields_update_bits() into macro by using regmap_field_update_bits_base(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
This patch merges regmap_fields_write() into macro by using regmap_fields_update_bits_base(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
This patch adds new regmap_fields_update_bits_base() which is using regmap_update_bits_base(). Current regmap_fields_xxx() can be merged into it by macro. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
This patch merges regmap_field_update_bits() into macro by using regmap_field_update_bits_base(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
This patch merges regmap_field_write() into macro by using regmap_field_update_bits_base(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
This patch adds new regmap_field_update_bits_base() which is using regmap_update_bits_base(). Current regmap_field_xxx() can be merged into it by macro. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current regmap has many similar update functions like below, but the difference is very few. regmap_update_bits() regmap_update_bits_async() regmap_update_bits_check() regmap_update_bits_check_async() Furthermore, we can add *force* write option too in the future. This patch merges regmap_update_bits_check_async() into macro by using regmap_update_bits_base(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current regmap has many similar update functions like below, but the difference is very few. regmap_update_bits() regmap_update_bits_async() regmap_update_bits_check() regmap_update_bits_check_async() Furthermore, we can add *force* write option too in the future. This patch merges regmap_update_bits_check() into macro by using regmap_update_bits_base(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current regmap has many similar update functions like below, but the difference is very few. regmap_update_bits() regmap_update_bits_async() regmap_update_bits_check() regmap_update_bits_check_async() Furthermore, we can add *force* write option too in the future. This patch merges regmap_update_bits_async() into macro by using regmap_update_bits_base(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current regmap has many similar update functions like below, but the difference is very few. regmap_update_bits() regmap_update_bits_async() regmap_update_bits_check() regmap_update_bits_check_async() Furthermore, we can add *force* write option too in the future. This patch merges regmap_update_bits() into macro by using regmap_update_bits_base(). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current regmap has many similar update functions like below, but the difference is very few. regmap_update_bits() regmap_update_bits_async() regmap_update_bits_check() regmap_update_bits_check_async() Furthermore, we can add *force* write option too in the future. This patch adds new regmap_update_bits_base() which is feature merged function. Above functions can be merged into it by macro. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 2月, 2016 1 次提交
-
-
由 Laxman Dewangan 提交于
Add device managed APIs for regmap_add_irq_chip() and regmap_del_irq_chip() so that it can be managed by device framework for freeing it. This helps on following: 1. Maintaining the sequence of resource allocation and deallocation regmap_add_irq_chip(&d); devm_requested_threaded_irq(virq) On free path: regmap_del_irq_chip(d); and then removing the irq registration. On this case, regmap irq is deleted before the irq is free. This force to use normal irq registration. By using devm apis, the sequence can be maintain properly: devm_regmap_add_irq_chip(&d); devm_requested_threaded_irq(virq); and resource deallocation will be done in reverse order by device framework. 2. No need to delete the regmap_irq_chip in error path or remove callback and hence there is less code on this path. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 23 1月, 2016 1 次提交
-
-
由 Stefan Agner 提交于
The exact meaning of max_register is not entierly clear. Follow the common wording and use "address" instead of "index". Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 1月, 2016 1 次提交
-
-
由 Laxman Dewangan 提交于
Some of devices supports the trigger level for interrupt like rising/falling edge specially for GPIOs. The interrupt support of such devices may have uses the generic regmap irq framework for implementation. Add support to configure the trigger type device interrupt register via regmap-irq framework. The regmap-irq framework configures the trigger register only if the details of trigger type registers are provided. [Fixed use of terery operator for legibility -- broonie] Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 12月, 2015 1 次提交
-
-
由 Daniel Wagner 提交于
In 8019ff6c ("regmap: Use reg_sequence for multi_reg_write / register_patch") struct reg_default was renamed to struct reg_secquence, which missed one place to fix up. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NDaniel Wagner <daniel.wagner@bmw-carit.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 10月, 2015 2 次提交
-
-
由 Jon Ringle 提交于
This commit allows installing a custom reg_update_bits function for cases where the hardware provides a mechanism to set or clear register bits without a read/modify/write cycle. Such is the case with the Microchip ENCX24J600. If a custom reg_update_bits function is provided, it will only be used against volatile registers. Signed-off-by: NJon Ringle <jringle@gridpoint.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 David S. Miller 提交于
This reverts commit 7741c373.
-
- 05 10月, 2015 1 次提交
-
-
由 Jon Ringle 提交于
This commit allows installing a custom reg_update_bits function for cases where the hardware provides a mechanism to set or clear register bits without a read/modify/write cycle. Such is the case with the Microchip ENCX24J600. Signed-off-by: NJon Ringle <jringle@gridpoint.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-