|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4 |
|
| #
fd80df35 |
| 17-Feb-2025 |
Charles Keepax <[email protected]> |
regcache: Add support for sorting defaults arrays
The defaults array in regcache must be sorted into ascending register address order, because binary search is used to locate values in the array. Ad
regcache: Add support for sorting defaults arrays
The defaults array in regcache must be sorted into ascending register address order, because binary search is used to locate values in the array. Add a helper to sort the register defaults array which can be useful for systems that dynamically create a defaults array based on external information.
Signed-off-by: Charles Keepax <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7 |
|
| #
5bc493bf |
| 07-Jan-2025 |
Charles Keepax <[email protected]> |
regmap: sdw-mbq: Add support for SDCA deferred controls
The SDCA specification allows for controls to be deferred. In the case of a deferred control the device will return COMMAND_IGNORED to the 8-b
regmap: sdw-mbq: Add support for SDCA deferred controls
The SDCA specification allows for controls to be deferred. In the case of a deferred control the device will return COMMAND_IGNORED to the 8-bit operation that would cause the value to commit. Which is the final 8-bits on a write, or the first 8-bits on a read. In the case of receiving a defer, the regmap will poll the SDCA function busy bit, after which the transaction will be retried, returning an error if the function busy does not clear within a chip specific timeout. Since this is common SDCA functionality which is the 99% use-case for MBQs it makes sense to incorporate this functionality into the register map. If no MBQ configuration is specified, the behaviour will default to the existing behaviour.
Signed-off-by: Charles Keepax <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| #
fdd9ef3d |
| 07-Jan-2025 |
Charles Keepax <[email protected]> |
regmap: sdw-mbq: Add support for further MBQ register sizes
SoundWire MBQ register maps typically contain a variety of register sizes, which doesn't map ideally to the regmap abstraction which expec
regmap: sdw-mbq: Add support for further MBQ register sizes
SoundWire MBQ register maps typically contain a variety of register sizes, which doesn't map ideally to the regmap abstraction which expects register maps to have a consistent size. Currently the MBQ register map only allows 16-bit registers to be defined, however this leads to complex CODEC driver implementations with an 8-bit register map and a 16-bit MBQ, every control will then have a custom get and put handler that allows them to access different register maps. Further more 32-bit MBQ quantities are not currently supported.
Add support for additional MBQ sizes and to avoid the complexity of multiple register maps treat the val_size as a maximum size for the register map. Within the regmap use an ancillary callback to determine how many bytes to actually read/write to the hardware for a specific register. In the case that no callback is defined the behaviour defaults back to the existing behaviour of a fixed size register map.
Signed-off-by: Charles Keepax <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3 |
|
| #
eb708cd6 |
| 11-Dec-2024 |
Richard Fitzgerald <[email protected]> |
regmap: regmap_multi_reg_read(): make register list const
Mark the list of registers passed into regmap_multi_reg_read() as a pointer to const. This allows the caller to define the register list as
regmap: regmap_multi_reg_read(): make register list const
Mark the list of registers passed into regmap_multi_reg_read() as a pointer to const. This allows the caller to define the register list as const data.
This requires making the same change to _regmap_bulk_read(), which is called by regmap_multi_reg_read().
Signed-off-by: Richard Fitzgerald <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7 |
|
| #
d1f4390d |
| 08-Nov-2024 |
Bartosz Golaszewski <[email protected]> |
regmap: provide regmap_assign_bits()
Add another bits helper to regmap API: this one sets given bits if value is true and clears them if it's false.
Suggested-by: Andy Shevchenko <andy.shevchenko@g
regmap: provide regmap_assign_bits()
Add another bits helper to regmap API: this one sets given bits if value is true and clears them if it's false.
Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc6, v6.12-rc5, v6.12-rc4 |
|
| #
89124747 |
| 14-Oct-2024 |
Anna-Maria Behnsen <[email protected]> |
iopoll/regmap/phy/snd: Fix comment referencing outdated timer documentation
Function descriptions in iopoll.h, regmap.h, phy.h and sound/soc/sof/ops.h copied all the same outdated documentation abou
iopoll/regmap/phy/snd: Fix comment referencing outdated timer documentation
Function descriptions in iopoll.h, regmap.h, phy.h and sound/soc/sof/ops.h copied all the same outdated documentation about sleep/delay function limitations. In those comments, the generic (and still outdated) timer documentation file is referenced.
As proper function descriptions for used delay and sleep functions are in place, simply update the descriptions to reference to them. While at it fix missing colon after "Returns" in function description and move return value description to the end of the function description.
Signed-off-by: Anna-Maria Behnsen <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> # for phy.h Reviewed-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/all/20241014-devel-anna-maria-b4-timers-flseep-v3-12-dc8b907cb62f@linutronix.de
show more ...
|
|
Revision tags: v6.12-rc3, v6.12-rc2, v6.12-rc1 |
|
| #
caf78b04 |
| 24-Sep-2024 |
Mark Brown <[email protected]> |
regcache: Improve documentation of available cache types
There is some user confusion about which cache types to choose when which is not helped by the lack of any central documentation providing an
regcache: Improve documentation of available cache types
There is some user confusion about which cache types to choose when which is not helped by the lack of any central documentation providing an overview of what's available. Provide a short overview in the API header to try to help reduce this.
Signed-off-by: Mark Brown <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3 |
|
| #
dde286ee |
| 08-Aug-2024 |
Matti Vaittinen <[email protected]> |
regmap: Allow setting IRQ domain name suffix
When multiple IRQ domains are created from the same device-tree node they will get the same name based on the device-tree path. This will cause a naming
regmap: Allow setting IRQ domain name suffix
When multiple IRQ domains are created from the same device-tree node they will get the same name based on the device-tree path. This will cause a naming collision in debugFS when IRQ domain specific entries are created.
The regmap-IRQ creates per instance IRQ domains. This will lead to a domain name conflict when a device which provides more than one interrupt line uses the regmap-IRQ.
Add support for specifying an IRQ domain name suffix when creating a regmap-IRQ controller.
Signed-off-by: Matti Vaittinen <[email protected]> Link: https://patch.msgid.link/776bc4996969e5081bcf61b9bdb5517e537147a3.1723120028.git.mazziesaccount@gmail.com Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc2, v6.11-rc1, v6.10 |
|
| #
3c1ff93b |
| 10-Jul-2024 |
Guenter Roeck <[email protected]> |
regmap: Implement regmap_multi_reg_read()
regmap_multi_reg_read() is similar to regmap_bilk_read() but reads from an array of non-sequential registers.
Signed-off-by: Guenter Roeck <linux@roeck-us.
regmap: Implement regmap_multi_reg_read()
regmap_multi_reg_read() is similar to regmap_bilk_read() but reads from an array of non-sequential registers.
Signed-off-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc7 |
|
| #
f21711bb |
| 06-Jul-2024 |
Thomas Weißschuh <[email protected]> |
regmap-irq: handle const struct regmap_irq_sub_irq_map
The struct instances supplied by the drivers are never modified. Handle them as const in the regmap core allowing the drivers to put them into
regmap-irq: handle const struct regmap_irq_sub_irq_map
The struct instances supplied by the drivers are never modified. Handle them as const in the regmap core allowing the drivers to put them into .rodata.
Also add a new entry to const_structs.checkpatch to make sure future instances of this struct already enter the tree as const.
Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9 |
|
| #
9b1fe051 |
| 06-May-2024 |
Christophe JAILLET <[email protected]> |
regmap: Reorder fields in 'struct regmap_config' to save some memory
On x86_64 and allmodconfig, this shrinks the size of 'struct regmap_config' from 328 to 312 bytes.
This is usually a win, becaus
regmap: Reorder fields in 'struct regmap_config' to save some memory
On x86_64 and allmodconfig, this shrinks the size of 'struct regmap_config' from 328 to 312 bytes.
This is usually a win, because this structure is used as a static global variable.
When moving the kerneldoc fields, I've tried to keep the layout as consistent as possible, which is not really easy!
Before: /* size: 328, cachelines: 6, members: 55 */ /* sum members: 296, holes: 6, sum holes: 25 */ /* padding: 7 */ /* last cacheline: 8 bytes */
After: /* size: 312, cachelines: 5, members: 55 */ /* sum members: 296, holes: 5, sum holes: 16 */ /* last cacheline: 56 bytes */
For the records, this is also widely used: $git grep static.*regmap_config | wc -l 1327
Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/5e039cd8fe415dd7ab3169948c08a5311db9fb9a.1715024007.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4 |
|
| #
70ee853e |
| 08-Apr-2024 |
Richard Fitzgerald <[email protected]> |
regmap: Add regmap_read_bypassed()
Add a regmap_read_bypassed() to allow reads from the hardware registers while the regmap is in cache-only mode.
A typical use for this is to keep the cache in cac
regmap: Add regmap_read_bypassed()
Add a regmap_read_bypassed() to allow reads from the hardware registers while the regmap is in cache-only mode.
A typical use for this is to keep the cache in cache-only mode until the hardware has reached a valid state, but one or more status registers must be polled to determine when this state is reached.
For example, firmware download on the cs35l56 can take several seconds if there are multiple amps sharing limited bus bandwidth. This is too long to block in probe() so it is done as a background task. The device must be soft-reset to reboot the firmware and during this time the registers are not accessible, so the cache should be in cache-only. But the driver must poll a register to detect when reboot has completed.
Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2 |
|
| #
0ec74ad3 |
| 26-Jan-2024 |
Jan Dakinevich <[email protected]> |
regmap: rework ->max_register handling
When regmap consists of single register, 'regmap' subsystem is unable to understand whether ->max_register is set or not, because in both cases it is equal to
regmap: rework ->max_register handling
When regmap consists of single register, 'regmap' subsystem is unable to understand whether ->max_register is set or not, because in both cases it is equal to zero. It leads to that the logic based on value of ->max_register doesn't work. For example using of REGCACHE_FLAT fails.
This patch introduces an extra parameter to regmap config, indicating that zero value in ->max_register is authentic.
Signed-off-by: Jan Dakinevich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3 |
|
| #
78908f45 |
| 17-Jul-2023 |
Mark Brown <[email protected]> |
regmap: Let users check if a register is cached
The HDA driver has a use case for checking if a register is cached which it bodges in awkwardly and unclearly. Provide an API which allows it to direc
regmap: Let users check if a register is cached
The HDA driver has a use case for checking if a register is cached which it bodges in awkwardly and unclearly. Provide an API which allows it to directly do what it's trying to do.
Reviewed-by: Takashi Iwai <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2 |
|
| #
72cc0f52 |
| 11-May-2023 |
Aidan MacDonald <[email protected]> |
regmap-irq: Remove support for not_fixed_stride
No remaining users, use a custom .get_irq_reg() callback instead.
Signed-off-by: Aidan MacDonald <[email protected] Link: https://lore.ker
regmap-irq: Remove support for not_fixed_stride
No remaining users, use a custom .get_irq_reg() callback instead.
Signed-off-by: Aidan MacDonald <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
show more ...
|
| #
f05cbadc |
| 11-May-2023 |
Aidan MacDonald <[email protected]> |
regmap-irq: Remove type registers
No remaining users, these have been replaced by config registers.
Signed-off-by: Aidan MacDonald <[email protected] Link: https://lore.kernel.org/r/2023
regmap-irq: Remove type registers
No remaining users, these have been replaced by config registers.
Signed-off-by: Aidan MacDonald <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
show more ...
|
| #
f33a751d |
| 09-May-2023 |
Aidan MacDonald <[email protected]> |
regmap-irq: Remove virtual registers
No remaining users, and it's been replaced by config registers.
Signed-off-by: Aidan MacDonald <[email protected] Link: https://lore.kernel.org/r/202
regmap-irq: Remove virtual registers
No remaining users, and it's been replaced by config registers.
Signed-off-by: Aidan MacDonald <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
show more ...
|
| #
212bc1ce |
| 09-May-2023 |
Aidan MacDonald <[email protected]> |
regmap-irq: Fix typo in documentation for .get_irq_reg()
It refers to a non-existent "num_type_settings" value, which is an old name I'd used during development of config registers and later dropped
regmap-irq: Fix typo in documentation for .get_irq_reg()
It refers to a non-existent "num_type_settings" value, which is an old name I'd used during development of config registers and later dropped because it wasn't very clear.
The correct bound for the range is num_config_regs, which can be verified by checking the implementation.
Signed-off-by: Aidan MacDonald <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
show more ...
|
|
Revision tags: v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6 |
|
| #
69da5aa9 |
| 07-Apr-2023 |
William Breathitt Gray <[email protected]> |
regmap-irq: Drop map from handle_mask_sync() parameters
Remove the map parameter from the struct regmap_irq_chip callback handle_mask_sync() because it can be passed via the irq_drv_data parameter i
regmap-irq: Drop map from handle_mask_sync() parameters
Remove the map parameter from the struct regmap_irq_chip callback handle_mask_sync() because it can be passed via the irq_drv_data parameter instead. The gpio-104-dio-48e driver is the only consumer of this callback and is thus updated accordingly.
Reviewed-by: Linus Walleij <[email protected] Signed-off-by: William Breathitt Gray <[email protected] Reviewed-by: Andy Shevchenko <[email protected] Link: https://lore.kernel.org/r/1f44fb0fbcd3dccea3371215b00f1b9a956c1a12.1679323449.git.william.gray@linaro.org Signed-off-by: Mark Brown <[email protected]
show more ...
|
| #
4a670ac3 |
| 07-Apr-2023 |
Maxime Chevallier <[email protected]> |
regmap: allow upshifting register addresses before performing operations
Similar to the existing reg_downshift mechanism, that is used to translate register addresses on busses that have a smaller a
regmap: allow upshifting register addresses before performing operations
Similar to the existing reg_downshift mechanism, that is used to translate register addresses on busses that have a smaller address stride, it's also possible to want to upshift register addresses.
Such a case was encountered when network PHYs and PCS that usually sit on a MDIO bus (16-bits register with a stride of 1) are integrated directly as memory-mapped devices. Here, the same register layout defined in 802.3 is used, but the register now have a larger stride.
Introduce a mechanism to also allow upshifting register addresses. Re-purpose reg_downshift into a more generic, signed reg_shift, whose sign indicates the direction of the shift. To avoid confusion, also introduce macros to explicitly indicate if we want to downshift or upshift.
For bisectability, change any use of reg_downshift to use reg_shift.
Signed-off-by: Maxime Chevallier <[email protected]> Tested-by: Colin Foster <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| #
7697c64b |
| 05-Apr-2023 |
William Breathitt Gray <[email protected]> |
regmap: Pass irq_drv_data as a parameter for set_type_config()
Allow the struct regmap_irq_chip set_type_config() callback to access irq_drv_data by passing it as a parameter.
Signed-off-by: Willia
regmap: Pass irq_drv_data as a parameter for set_type_config()
Allow the struct regmap_irq_chip set_type_config() callback to access irq_drv_data by passing it as a parameter.
Signed-off-by: William Breathitt Gray <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/20e15cd3afae80922b7e0577c7741df86b3390c5.1680708357.git.william.gray@linaro.org Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc5 |
|
| #
f033c26d |
| 30-Mar-2023 |
Mark Brown <[email protected]> |
regmap: Add maple tree based register cache
The current state of the art for sparse register maps is the rbtree cache. This works well for most applications but isn't always ideal for sparser regis
regmap: Add maple tree based register cache
The current state of the art for sparse register maps is the rbtree cache. This works well for most applications but isn't always ideal for sparser register maps since the rbtree can get deep, requiring a lot of walking. Fortunately the kernel has a data structure intended to address this very problem, the maple tree. Provide an initial implementation of a register cache based on the maple tree to start taking advantage of it.
The entries stored in the maple tree are arrays of register values, with the maple tree keys holding the register addresses. We store data in host native format rather than device native format as we do for rbtree, this will be a benefit for devices where we don't marshal data within regmap and simplifies the code but will result in additional CPU overhead when syncing the cache on devices where we do marshal data in regmap.
This should work well for a lot of devices, though there's some additional areas that could be looked at such as caching the last accessed entry like we do for rbtree and trying to minimise the maple tree level locking. We should also use bulk writes rather than single register writes when resyncing the cache where possible, even if we don't store in device native format.
Very small register maps may continue to to better with rbtree longer term.
Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc4 |
|
| #
1e2bae6a |
| 24-Mar-2023 |
Mark Brown <[email protected]> |
regmap: Removed compressed cache support
The compressed register cache support has assumptions that make it hard to cover in testing, mainly that it requires raw registers defaults be provided. Rath
regmap: Removed compressed cache support
The compressed register cache support has assumptions that make it hard to cover in testing, mainly that it requires raw registers defaults be provided. Rather than either address these assumptions or leave it untested by the forthcoming KUnit tests let's remove it, the use case is quite thin and there are no current users.
Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
|
Revision tags: v6.3-rc3, v6.3-rc2, v6.3-rc1 |
|
| #
9b400171 |
| 20-Feb-2023 |
Andy Shevchenko <[email protected]> |
regmap-irq: Place kernel doc of struct regmap_irq_chip in order
It seems that a couple of members got lost theirorder, put them back. Besides that, split field descriptions into groups in the same w
regmap-irq: Place kernel doc of struct regmap_irq_chip in order
It seems that a couple of members got lost theirorder, put them back. Besides that, split field descriptions into groups in the same way as it's done in the structure definition.
Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
show more ...
|
| #
4d60cac9 |
| 27-Feb-2023 |
William Breathitt Gray <[email protected]> |
regmap-irq: Add no_status support
Some devices lack status registers, yet expect to handle interrupts. Introduce a no_status flag to indicate such a configuration, where rather than read a status re
regmap-irq: Add no_status support
Some devices lack status registers, yet expect to handle interrupts. Introduce a no_status flag to indicate such a configuration, where rather than read a status register to verify, all interrupts received are assumed to be active.
Cc: Mark Brown <[email protected]> Signed-off-by: William Breathitt Gray <[email protected]> Link: https://lore.kernel.org/r/bd501b4b5ff88da24d467f75e8c71b4e0e6f21e2.1677515341.git.william.gray@linaro.org Signed-off-by: Mark Brown <[email protected]>
show more ...
|