aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2017-01-12 06:17:39 -0500
committerMark Brown <broonie@kernel.org>2017-01-12 12:22:48 -0500
commit2cf8e2dfdf88363476f23bc600745250b94dbbed (patch)
treec739f2ac94ffc757e4b52753eef09e65c841a39c
parentdaaadbf07433b15c452b2ff411a293b2ccd98e03 (diff)
regmap: Fixup the kernel-doc comments on functions/structures
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: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/base/regmap/regcache.c20
-rw-r--r--drivers/base/regmap/regmap-irq.c62
-rw-r--r--drivers/base/regmap/regmap.c125
-rw-r--r--include/linux/regmap.h115
4 files changed, 179 insertions, 143 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 4e582561e1e7..b0a0dcf32fb7 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -224,7 +224,7 @@ void regcache_exit(struct regmap *map)
224} 224}
225 225
226/** 226/**
227 * regcache_read: Fetch the value of a given register from the cache. 227 * regcache_read - Fetch the value of a given register from the cache.
228 * 228 *
229 * @map: map to configure. 229 * @map: map to configure.
230 * @reg: The register index. 230 * @reg: The register index.
@@ -255,7 +255,7 @@ int regcache_read(struct regmap *map,
255} 255}
256 256
257/** 257/**
258 * regcache_write: Set the value of a given register in the cache. 258 * regcache_write - Set the value of a given register in the cache.
259 * 259 *
260 * @map: map to configure. 260 * @map: map to configure.
261 * @reg: The register index. 261 * @reg: The register index.
@@ -328,7 +328,7 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
328} 328}
329 329
330/** 330/**
331 * regcache_sync: Sync the register cache with the hardware. 331 * regcache_sync - Sync the register cache with the hardware.
332 * 332 *
333 * @map: map to configure. 333 * @map: map to configure.
334 * 334 *
@@ -396,7 +396,7 @@ out:
396EXPORT_SYMBOL_GPL(regcache_sync); 396EXPORT_SYMBOL_GPL(regcache_sync);
397 397
398/** 398/**
399 * regcache_sync_region: Sync part of the register cache with the hardware. 399 * regcache_sync_region - Sync part of the register cache with the hardware.
400 * 400 *
401 * @map: map to sync. 401 * @map: map to sync.
402 * @min: first register to sync 402 * @min: first register to sync
@@ -452,7 +452,7 @@ out:
452EXPORT_SYMBOL_GPL(regcache_sync_region); 452EXPORT_SYMBOL_GPL(regcache_sync_region);
453 453
454/** 454/**
455 * regcache_drop_region: Discard part of the register cache 455 * regcache_drop_region - Discard part of the register cache
456 * 456 *
457 * @map: map to operate on 457 * @map: map to operate on
458 * @min: first register to discard 458 * @min: first register to discard
@@ -483,10 +483,10 @@ int regcache_drop_region(struct regmap *map, unsigned int min,
483EXPORT_SYMBOL_GPL(regcache_drop_region); 483EXPORT_SYMBOL_GPL(regcache_drop_region);
484 484
485/** 485/**
486 * regcache_cache_only: Put a register map into cache only mode 486 * regcache_cache_only - Put a register map into cache only mode
487 * 487 *
488 * @map: map to configure 488 * @map: map to configure
489 * @cache_only: flag if changes should be written to the hardware 489 * @enable: flag if changes should be written to the hardware
490 * 490 *
491 * When a register map is marked as cache only writes to the register 491 * When a register map is marked as cache only writes to the register
492 * map API will only update the register cache, they will not cause 492 * map API will only update the register cache, they will not cause
@@ -505,7 +505,7 @@ void regcache_cache_only(struct regmap *map, bool enable)
505EXPORT_SYMBOL_GPL(regcache_cache_only); 505EXPORT_SYMBOL_GPL(regcache_cache_only);
506 506
507/** 507/**
508 * regcache_mark_dirty: Indicate that HW registers were reset to default values 508 * regcache_mark_dirty - Indicate that HW registers were reset to default values
509 * 509 *
510 * @map: map to mark 510 * @map: map to mark
511 * 511 *
@@ -527,10 +527,10 @@ void regcache_mark_dirty(struct regmap *map)
527EXPORT_SYMBOL_GPL(regcache_mark_dirty); 527EXPORT_SYMBOL_GPL(regcache_mark_dirty);
528 528
529/** 529/**
530 * regcache_cache_bypass: Put a register map into cache bypass mode 530 * regcache_cache_bypass - Put a register map into cache bypass mode
531 * 531 *
532 * @map: map to configure 532 * @map: map to configure
533 * @cache_bypass: flag if changes should not be written to the cache 533 * @enable: flag if changes should not be written to the cache
534 * 534 *
535 * When a register map is marked with the cache bypass option, writes 535 * When a register map is marked with the cache bypass option, writes
536 * to the register map API will only update the hardware and not the 536 * to the register map API will only update the hardware and not the
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index ec262476d043..cd54189f2b1d 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -398,13 +398,14 @@ static const struct irq_domain_ops regmap_domain_ops = {
398}; 398};
399 399
400/** 400/**
401 * regmap_add_irq_chip(): Use standard regmap IRQ controller handling 401 * regmap_add_irq_chip() - Use standard regmap IRQ controller handling
402 * 402 *
403 * map: The regmap for the device. 403 * @map: The regmap for the device.
404 * irq: The IRQ the device uses to signal interrupts 404 * @irq: The IRQ the device uses to signal interrupts.
405 * irq_flags: The IRQF_ flags to use for the primary interrupt. 405 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
406 * chip: Configuration for the interrupt controller. 406 * @irq_base: Allocate at specific IRQ number if irq_base > 0.
407 * data: Runtime data structure for the controller, allocated on success 407 * @chip: Configuration for the interrupt controller.
408 * @data: Runtime data structure for the controller, allocated on success.
408 * 409 *
409 * Returns 0 on success or an errno on failure. 410 * Returns 0 on success or an errno on failure.
410 * 411 *
@@ -659,12 +660,12 @@ err_alloc:
659EXPORT_SYMBOL_GPL(regmap_add_irq_chip); 660EXPORT_SYMBOL_GPL(regmap_add_irq_chip);
660 661
661/** 662/**
662 * regmap_del_irq_chip(): Stop interrupt handling for a regmap IRQ chip 663 * regmap_del_irq_chip() - Stop interrupt handling for a regmap IRQ chip
663 * 664 *
664 * @irq: Primary IRQ for the device 665 * @irq: Primary IRQ for the device
665 * @d: regmap_irq_chip_data allocated by regmap_add_irq_chip() 666 * @d: &regmap_irq_chip_data allocated by regmap_add_irq_chip()
666 * 667 *
667 * This function also dispose all mapped irq on chip. 668 * This function also disposes of all mapped IRQs on the chip.
668 */ 669 */
669void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d) 670void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
670{ 671{
@@ -723,18 +724,19 @@ static int devm_regmap_irq_chip_match(struct device *dev, void *res, void *data)
723} 724}
724 725
725/** 726/**
726 * devm_regmap_add_irq_chip(): Resource manager regmap_add_irq_chip() 727 * devm_regmap_add_irq_chip() - Resource manager regmap_add_irq_chip()
727 * 728 *
728 * @dev: The device pointer on which irq_chip belongs to. 729 * @dev: The device pointer on which irq_chip belongs to.
729 * @map: The regmap for the device. 730 * @map: The regmap for the device.
730 * @irq: The IRQ the device uses to signal interrupts 731 * @irq: The IRQ the device uses to signal interrupts
731 * @irq_flags: The IRQF_ flags to use for the primary interrupt. 732 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
732 * @chip: Configuration for the interrupt controller. 733 * @irq_base: Allocate at specific IRQ number if irq_base > 0.
733 * @data: Runtime data structure for the controller, allocated on success 734 * @chip: Configuration for the interrupt controller.
735 * @data: Runtime data structure for the controller, allocated on success
734 * 736 *
735 * Returns 0 on success or an errno on failure. 737 * Returns 0 on success or an errno on failure.
736 * 738 *
737 * The regmap_irq_chip data automatically be released when the device is 739 * The &regmap_irq_chip_data will be automatically released when the device is
738 * unbound. 740 * unbound.
739 */ 741 */
740int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq, 742int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
@@ -765,11 +767,13 @@ int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
765EXPORT_SYMBOL_GPL(devm_regmap_add_irq_chip); 767EXPORT_SYMBOL_GPL(devm_regmap_add_irq_chip);
766 768
767/** 769/**
768 * devm_regmap_del_irq_chip(): Resource managed regmap_del_irq_chip() 770 * devm_regmap_del_irq_chip() - Resource managed regmap_del_irq_chip()
769 * 771 *
770 * @dev: Device for which which resource was allocated. 772 * @dev: Device for which which resource was allocated.
771 * @irq: Primary IRQ for the device 773 * @irq: Primary IRQ for the device.
772 * @d: regmap_irq_chip_data allocated by regmap_add_irq_chip() 774 * @data: &regmap_irq_chip_data allocated by regmap_add_irq_chip().
775 *
776 * A resource managed version of regmap_del_irq_chip().
773 */ 777 */
774void devm_regmap_del_irq_chip(struct device *dev, int irq, 778void devm_regmap_del_irq_chip(struct device *dev, int irq,
775 struct regmap_irq_chip_data *data) 779 struct regmap_irq_chip_data *data)
@@ -786,11 +790,11 @@ void devm_regmap_del_irq_chip(struct device *dev, int irq,
786EXPORT_SYMBOL_GPL(devm_regmap_del_irq_chip); 790EXPORT_SYMBOL_GPL(devm_regmap_del_irq_chip);
787 791
788/** 792/**
789 * regmap_irq_chip_get_base(): Retrieve interrupt base for a regmap IRQ chip 793 * regmap_irq_chip_get_base() - Retrieve interrupt base for a regmap IRQ chip
790 * 794 *
791 * Useful for drivers to request their own IRQs. 795 * @data: regmap irq controller to operate on.
792 * 796 *
793 * @data: regmap_irq controller to operate on. 797 * Useful for drivers to request their own IRQs.
794 */ 798 */
795int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data) 799int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data)
796{ 800{
@@ -800,12 +804,12 @@ int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data)
800EXPORT_SYMBOL_GPL(regmap_irq_chip_get_base); 804EXPORT_SYMBOL_GPL(regmap_irq_chip_get_base);
801 805
802/** 806/**
803 * regmap_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ 807 * regmap_irq_get_virq() - Map an interrupt on a chip to a virtual IRQ
804 * 808 *
805 * Useful for drivers to request their own IRQs. 809 * @data: regmap irq controller to operate on.
810 * @irq: index of the interrupt requested in the chip IRQs.
806 * 811 *
807 * @data: regmap_irq controller to operate on. 812 * Useful for drivers to request their own IRQs.
808 * @irq: index of the interrupt requested in the chip IRQs
809 */ 813 */
810int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq) 814int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq)
811{ 815{
@@ -818,14 +822,14 @@ int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq)
818EXPORT_SYMBOL_GPL(regmap_irq_get_virq); 822EXPORT_SYMBOL_GPL(regmap_irq_get_virq);
819 823
820/** 824/**
821 * regmap_irq_get_domain(): Retrieve the irq_domain for the chip 825 * regmap_irq_get_domain() - Retrieve the irq_domain for the chip
826 *
827 * @data: regmap_irq controller to operate on.
822 * 828 *
823 * Useful for drivers to request their own IRQs and for integration 829 * Useful for drivers to request their own IRQs and for integration
824 * with subsystems. For ease of integration NULL is accepted as a 830 * with subsystems. For ease of integration NULL is accepted as a
825 * domain, allowing devices to just call this even if no domain is 831 * domain, allowing devices to just call this even if no domain is
826 * allocated. 832 * allocated.
827 *
828 * @data: regmap_irq controller to operate on.
829 */ 833 */
830struct irq_domain *regmap_irq_get_domain(struct regmap_irq_chip_data *data) 834struct irq_domain *regmap_irq_get_domain(struct regmap_irq_chip_data *data)
831{ 835{
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index ae63bb0875ea..0e770ba8d361 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1091,8 +1091,7 @@ static void regmap_field_init(struct regmap_field *rm_field,
1091} 1091}
1092 1092
1093/** 1093/**
1094 * devm_regmap_field_alloc(): Allocate and initialise a register field 1094 * devm_regmap_field_alloc() - Allocate and initialise a register field.
1095 * in a register map.
1096 * 1095 *
1097 * @dev: Device that will be interacted with 1096 * @dev: Device that will be interacted with
1098 * @regmap: regmap bank in which this register field is located. 1097 * @regmap: regmap bank in which this register field is located.
@@ -1118,13 +1117,15 @@ struct regmap_field *devm_regmap_field_alloc(struct device *dev,
1118EXPORT_SYMBOL_GPL(devm_regmap_field_alloc); 1117EXPORT_SYMBOL_GPL(devm_regmap_field_alloc);
1119 1118
1120/** 1119/**
1121 * devm_regmap_field_free(): Free register field allocated using 1120 * devm_regmap_field_free() - Free a register field allocated using
1122 * devm_regmap_field_alloc. Usally drivers need not call this function, 1121 * devm_regmap_field_alloc.
1123 * as the memory allocated via devm will be freed as per device-driver
1124 * life-cyle.
1125 * 1122 *
1126 * @dev: Device that will be interacted with 1123 * @dev: Device that will be interacted with
1127 * @field: regmap field which should be freed. 1124 * @field: regmap field which should be freed.
1125 *
1126 * Free register field allocated using devm_regmap_field_alloc(). Usually
1127 * drivers need not call this function, as the memory allocated via devm
1128 * will be freed as per device-driver life-cyle.
1128 */ 1129 */
1129void devm_regmap_field_free(struct device *dev, 1130void devm_regmap_field_free(struct device *dev,
1130 struct regmap_field *field) 1131 struct regmap_field *field)
@@ -1134,8 +1135,7 @@ void devm_regmap_field_free(struct device *dev,
1134EXPORT_SYMBOL_GPL(devm_regmap_field_free); 1135EXPORT_SYMBOL_GPL(devm_regmap_field_free);
1135 1136
1136/** 1137/**
1137 * regmap_field_alloc(): Allocate and initialise a register field 1138 * regmap_field_alloc() - Allocate and initialise a register field.
1138 * in a register map.
1139 * 1139 *
1140 * @regmap: regmap bank in which this register field is located. 1140 * @regmap: regmap bank in which this register field is located.
1141 * @reg_field: Register field with in the bank. 1141 * @reg_field: Register field with in the bank.
@@ -1159,7 +1159,8 @@ struct regmap_field *regmap_field_alloc(struct regmap *regmap,
1159EXPORT_SYMBOL_GPL(regmap_field_alloc); 1159EXPORT_SYMBOL_GPL(regmap_field_alloc);
1160 1160
1161/** 1161/**
1162 * regmap_field_free(): Free register field allocated using regmap_field_alloc 1162 * regmap_field_free() - Free register field allocated using
1163 * regmap_field_alloc.
1163 * 1164 *
1164 * @field: regmap field which should be freed. 1165 * @field: regmap field which should be freed.
1165 */ 1166 */
@@ -1170,7 +1171,7 @@ void regmap_field_free(struct regmap_field *field)
1170EXPORT_SYMBOL_GPL(regmap_field_free); 1171EXPORT_SYMBOL_GPL(regmap_field_free);
1171 1172
1172/** 1173/**
1173 * regmap_reinit_cache(): Reinitialise the current register cache 1174 * regmap_reinit_cache() - Reinitialise the current register cache
1174 * 1175 *
1175 * @map: Register map to operate on. 1176 * @map: Register map to operate on.
1176 * @config: New configuration. Only the cache data will be used. 1177 * @config: New configuration. Only the cache data will be used.
@@ -1205,7 +1206,9 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
1205EXPORT_SYMBOL_GPL(regmap_reinit_cache); 1206EXPORT_SYMBOL_GPL(regmap_reinit_cache);
1206 1207
1207/** 1208/**
1208 * regmap_exit(): Free a previously allocated register map 1209 * regmap_exit() - Free a previously allocated register map
1210 *
1211 * @map: Register map to operate on.
1209 */ 1212 */
1210void regmap_exit(struct regmap *map) 1213void regmap_exit(struct regmap *map)
1211{ 1214{
@@ -1245,7 +1248,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data)
1245} 1248}
1246 1249
1247/** 1250/**
1248 * dev_get_regmap(): Obtain the regmap (if any) for a device 1251 * dev_get_regmap() - Obtain the regmap (if any) for a device
1249 * 1252 *
1250 * @dev: Device to retrieve the map for 1253 * @dev: Device to retrieve the map for
1251 * @name: Optional name for the register map, usually NULL. 1254 * @name: Optional name for the register map, usually NULL.
@@ -1268,7 +1271,7 @@ struct regmap *dev_get_regmap(struct device *dev, const char *name)
1268EXPORT_SYMBOL_GPL(dev_get_regmap); 1271EXPORT_SYMBOL_GPL(dev_get_regmap);
1269 1272
1270/** 1273/**
1271 * regmap_get_device(): Obtain the device from a regmap 1274 * regmap_get_device() - Obtain the device from a regmap
1272 * 1275 *
1273 * @map: Register map to operate on. 1276 * @map: Register map to operate on.
1274 * 1277 *
@@ -1654,7 +1657,7 @@ int _regmap_write(struct regmap *map, unsigned int reg,
1654} 1657}
1655 1658
1656/** 1659/**
1657 * regmap_write(): Write a value to a single register 1660 * regmap_write() - Write a value to a single register
1658 * 1661 *
1659 * @map: Register map to write to 1662 * @map: Register map to write to
1660 * @reg: Register to write to 1663 * @reg: Register to write to
@@ -1681,7 +1684,7 @@ int regmap_write(struct regmap *map, unsigned int reg, unsigned int val)
1681EXPORT_SYMBOL_GPL(regmap_write); 1684EXPORT_SYMBOL_GPL(regmap_write);
1682 1685
1683/** 1686/**
1684 * regmap_write_async(): Write a value to a single register asynchronously 1687 * regmap_write_async() - Write a value to a single register asynchronously
1685 * 1688 *
1686 * @map: Register map to write to 1689 * @map: Register map to write to
1687 * @reg: Register to write to 1690 * @reg: Register to write to
@@ -1712,7 +1715,7 @@ int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val)
1712EXPORT_SYMBOL_GPL(regmap_write_async); 1715EXPORT_SYMBOL_GPL(regmap_write_async);
1713 1716
1714/** 1717/**
1715 * regmap_raw_write(): Write raw values to one or more registers 1718 * regmap_raw_write() - Write raw values to one or more registers
1716 * 1719 *
1717 * @map: Register map to write to 1720 * @map: Register map to write to
1718 * @reg: Initial register to write to 1721 * @reg: Initial register to write to
@@ -1750,9 +1753,8 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
1750EXPORT_SYMBOL_GPL(regmap_raw_write); 1753EXPORT_SYMBOL_GPL(regmap_raw_write);
1751 1754
1752/** 1755/**
1753 * regmap_field_update_bits_base(): 1756 * regmap_field_update_bits_base() - Perform a read/modify/write cycle a
1754 * Perform a read/modify/write cycle on the register field 1757 * register field.
1755 * with change, async, force option
1756 * 1758 *
1757 * @field: Register field to write to 1759 * @field: Register field to write to
1758 * @mask: Bitmask to change 1760 * @mask: Bitmask to change
@@ -1761,6 +1763,9 @@ EXPORT_SYMBOL_GPL(regmap_raw_write);
1761 * @async: Boolean indicating asynchronously 1763 * @async: Boolean indicating asynchronously
1762 * @force: Boolean indicating use force update 1764 * @force: Boolean indicating use force update
1763 * 1765 *
1766 * Perform a read/modify/write cycle on the register field with change,
1767 * async, force option.
1768 *
1764 * A value of zero will be returned on success, a negative errno will 1769 * A value of zero will be returned on success, a negative errno will
1765 * be returned in error cases. 1770 * be returned in error cases.
1766 */ 1771 */
@@ -1777,9 +1782,8 @@ int regmap_field_update_bits_base(struct regmap_field *field,
1777EXPORT_SYMBOL_GPL(regmap_field_update_bits_base); 1782EXPORT_SYMBOL_GPL(regmap_field_update_bits_base);
1778 1783
1779/** 1784/**
1780 * regmap_fields_update_bits_base(): 1785 * regmap_fields_update_bits_base() - Perform a read/modify/write cycle a
1781 * Perform a read/modify/write cycle on the register field 1786 * register field with port ID
1782 * with change, async, force option
1783 * 1787 *
1784 * @field: Register field to write to 1788 * @field: Register field to write to
1785 * @id: port ID 1789 * @id: port ID
@@ -1808,8 +1812,8 @@ int regmap_fields_update_bits_base(struct regmap_field *field, unsigned int id,
1808} 1812}
1809EXPORT_SYMBOL_GPL(regmap_fields_update_bits_base); 1813EXPORT_SYMBOL_GPL(regmap_fields_update_bits_base);
1810 1814
1811/* 1815/**
1812 * regmap_bulk_write(): Write multiple registers to the device 1816 * regmap_bulk_write() - Write multiple registers to the device
1813 * 1817 *
1814 * @map: Register map to write to 1818 * @map: Register map to write to
1815 * @reg: First register to be write from 1819 * @reg: First register to be write from
@@ -2174,18 +2178,18 @@ static int _regmap_multi_reg_write(struct regmap *map,
2174 return _regmap_raw_multi_reg_write(map, regs, num_regs); 2178 return _regmap_raw_multi_reg_write(map, regs, num_regs);
2175} 2179}
2176 2180
2177/* 2181/**
2178 * regmap_multi_reg_write(): Write multiple registers to the device 2182 * regmap_multi_reg_write() - Write multiple registers to the device
2179 *
2180 * where the set of register,value pairs are supplied in any order,
2181 * possibly not all in a single range.
2182 * 2183 *
2183 * @map: Register map to write to 2184 * @map: Register map to write to
2184 * @regs: Array of structures containing register,value to be written 2185 * @regs: Array of structures containing register,value to be written
2185 * @num_regs: Number of registers to write 2186 * @num_regs: Number of registers to write
2186 * 2187 *
2188 * Write multiple registers to the device where the set of register, value
2189 * pairs are supplied in any order, possibly not all in a single range.
2190 *
2187 * The 'normal' block write mode will send ultimately send data on the 2191 * The 'normal' block write mode will send ultimately send data on the
2188 * target bus as R,V1,V2,V3,..,Vn where successively higer registers are 2192 * target bus as R,V1,V2,V3,..,Vn where successively higher registers are
2189 * addressed. However, this alternative block multi write mode will send 2193 * addressed. However, this alternative block multi write mode will send
2190 * the data as R1,V1,R2,V2,..,Rn,Vn on the target bus. The target device 2194 * the data as R1,V1,R2,V2,..,Rn,Vn on the target bus. The target device
2191 * must of course support the mode. 2195 * must of course support the mode.
@@ -2208,16 +2212,17 @@ int regmap_multi_reg_write(struct regmap *map, const struct reg_sequence *regs,
2208} 2212}
2209EXPORT_SYMBOL_GPL(regmap_multi_reg_write); 2213EXPORT_SYMBOL_GPL(regmap_multi_reg_write);
2210 2214
2211/* 2215/**
2212 * regmap_multi_reg_write_bypassed(): Write multiple registers to the 2216 * regmap_multi_reg_write_bypassed() - Write multiple registers to the
2213 * device but not the cache 2217 * device but not the cache
2214 *
2215 * where the set of register are supplied in any order
2216 * 2218 *
2217 * @map: Register map to write to 2219 * @map: Register map to write to
2218 * @regs: Array of structures containing register,value to be written 2220 * @regs: Array of structures containing register,value to be written
2219 * @num_regs: Number of registers to write 2221 * @num_regs: Number of registers to write
2220 * 2222 *
2223 * Write multiple registers to the device but not the cache where the set
2224 * of register are supplied in any order.
2225 *
2221 * This function is intended to be used for writing a large block of data 2226 * This function is intended to be used for writing a large block of data
2222 * atomically to the device in single transfer for those I2C client devices 2227 * atomically to the device in single transfer for those I2C client devices
2223 * that implement this alternative block write mode. 2228 * that implement this alternative block write mode.
@@ -2248,8 +2253,8 @@ int regmap_multi_reg_write_bypassed(struct regmap *map,
2248EXPORT_SYMBOL_GPL(regmap_multi_reg_write_bypassed); 2253EXPORT_SYMBOL_GPL(regmap_multi_reg_write_bypassed);
2249 2254
2250/** 2255/**
2251 * regmap_raw_write_async(): Write raw values to one or more registers 2256 * regmap_raw_write_async() - Write raw values to one or more registers
2252 * asynchronously 2257 * asynchronously
2253 * 2258 *
2254 * @map: Register map to write to 2259 * @map: Register map to write to
2255 * @reg: Initial register to write to 2260 * @reg: Initial register to write to
@@ -2385,7 +2390,7 @@ static int _regmap_read(struct regmap *map, unsigned int reg,
2385} 2390}
2386 2391
2387/** 2392/**
2388 * regmap_read(): Read a value from a single register 2393 * regmap_read() - Read a value from a single register
2389 * 2394 *
2390 * @map: Register map to read from 2395 * @map: Register map to read from
2391 * @reg: Register to be read from 2396 * @reg: Register to be read from
@@ -2412,7 +2417,7 @@ int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val)
2412EXPORT_SYMBOL_GPL(regmap_read); 2417EXPORT_SYMBOL_GPL(regmap_read);
2413 2418
2414/** 2419/**
2415 * regmap_raw_read(): Read raw data from the device 2420 * regmap_raw_read() - Read raw data from the device
2416 * 2421 *
2417 * @map: Register map to read from 2422 * @map: Register map to read from
2418 * @reg: First register to be read from 2423 * @reg: First register to be read from
@@ -2477,7 +2482,7 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
2477EXPORT_SYMBOL_GPL(regmap_raw_read); 2482EXPORT_SYMBOL_GPL(regmap_raw_read);
2478 2483
2479/** 2484/**
2480 * regmap_field_read(): Read a value to a single register field 2485 * regmap_field_read() - Read a value to a single register field
2481 * 2486 *
2482 * @field: Register field to read from 2487 * @field: Register field to read from
2483 * @val: Pointer to store read value 2488 * @val: Pointer to store read value
@@ -2502,7 +2507,7 @@ int regmap_field_read(struct regmap_field *field, unsigned int *val)
2502EXPORT_SYMBOL_GPL(regmap_field_read); 2507EXPORT_SYMBOL_GPL(regmap_field_read);
2503 2508
2504/** 2509/**
2505 * regmap_fields_read(): Read a value to a single register field with port ID 2510 * regmap_fields_read() - Read a value to a single register field with port ID
2506 * 2511 *
2507 * @field: Register field to read from 2512 * @field: Register field to read from
2508 * @id: port ID 2513 * @id: port ID
@@ -2535,7 +2540,7 @@ int regmap_fields_read(struct regmap_field *field, unsigned int id,
2535EXPORT_SYMBOL_GPL(regmap_fields_read); 2540EXPORT_SYMBOL_GPL(regmap_fields_read);
2536 2541
2537/** 2542/**
2538 * regmap_bulk_read(): Read multiple registers from the device 2543 * regmap_bulk_read() - Read multiple registers from the device
2539 * 2544 *
2540 * @map: Register map to read from 2545 * @map: Register map to read from
2541 * @reg: First register to be read from 2546 * @reg: First register to be read from
@@ -2692,9 +2697,7 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
2692} 2697}
2693 2698
2694/** 2699/**
2695 * regmap_update_bits_base: 2700 * regmap_update_bits_base() - Perform a read/modify/write cycle on a register
2696 * Perform a read/modify/write cycle on the
2697 * register map with change, async, force option
2698 * 2701 *
2699 * @map: Register map to update 2702 * @map: Register map to update
2700 * @reg: Register to update 2703 * @reg: Register to update
@@ -2704,10 +2707,14 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
2704 * @async: Boolean indicating asynchronously 2707 * @async: Boolean indicating asynchronously
2705 * @force: Boolean indicating use force update 2708 * @force: Boolean indicating use force update
2706 * 2709 *
2707 * if async was true, 2710 * Perform a read/modify/write cycle on a register map with change, async, force
2708 * With most buses the read must be done synchronously so this is most 2711 * options.
2709 * useful for devices with a cache which do not need to interact with 2712 *
2710 * the hardware to determine the current register value. 2713 * If async is true:
2714 *
2715 * With most buses the read must be done synchronously so this is most useful
2716 * for devices with a cache which do not need to interact with the hardware to
2717 * determine the current register value.
2711 * 2718 *
2712 * Returns zero for success, a negative number on error. 2719 * Returns zero for success, a negative number on error.
2713 */ 2720 */
@@ -2765,7 +2772,7 @@ static int regmap_async_is_done(struct regmap *map)
2765} 2772}
2766 2773
2767/** 2774/**
2768 * regmap_async_complete: Ensure all asynchronous I/O has completed. 2775 * regmap_async_complete - Ensure all asynchronous I/O has completed.
2769 * 2776 *
2770 * @map: Map to operate on. 2777 * @map: Map to operate on.
2771 * 2778 *
@@ -2797,8 +2804,8 @@ int regmap_async_complete(struct regmap *map)
2797EXPORT_SYMBOL_GPL(regmap_async_complete); 2804EXPORT_SYMBOL_GPL(regmap_async_complete);
2798 2805
2799/** 2806/**
2800 * regmap_register_patch: Register and apply register updates to be applied 2807 * regmap_register_patch - Register and apply register updates to be applied
2801 * on device initialistion 2808 * on device initialistion
2802 * 2809 *
2803 * @map: Register map to apply updates to. 2810 * @map: Register map to apply updates to.
2804 * @regs: Values to update. 2811 * @regs: Values to update.
@@ -2855,8 +2862,10 @@ int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
2855} 2862}
2856EXPORT_SYMBOL_GPL(regmap_register_patch); 2863EXPORT_SYMBOL_GPL(regmap_register_patch);
2857 2864
2858/* 2865/**
2859 * regmap_get_val_bytes(): Report the size of a register value 2866 * regmap_get_val_bytes() - Report the size of a register value
2867 *
2868 * @map: Register map to operate on.
2860 * 2869 *
2861 * Report the size of a register value, mainly intended to for use by 2870 * Report the size of a register value, mainly intended to for use by
2862 * generic infrastructure built on top of regmap. 2871 * generic infrastructure built on top of regmap.
@@ -2871,7 +2880,9 @@ int regmap_get_val_bytes(struct regmap *map)
2871EXPORT_SYMBOL_GPL(regmap_get_val_bytes); 2880EXPORT_SYMBOL_GPL(regmap_get_val_bytes);
2872 2881
2873/** 2882/**
2874 * regmap_get_max_register(): Report the max register value 2883 * regmap_get_max_register() - Report the max register value
2884 *
2885 * @map: Register map to operate on.
2875 * 2886 *
2876 * Report the max register value, mainly intended to for use by 2887 * Report the max register value, mainly intended to for use by
2877 * generic infrastructure built on top of regmap. 2888 * generic infrastructure built on top of regmap.
@@ -2883,7 +2894,9 @@ int regmap_get_max_register(struct regmap *map)
2883EXPORT_SYMBOL_GPL(regmap_get_max_register); 2894EXPORT_SYMBOL_GPL(regmap_get_max_register);
2884 2895
2885/** 2896/**
2886 * regmap_get_reg_stride(): Report the register address stride 2897 * regmap_get_reg_stride() - Report the register address stride
2898 *
2899 * @map: Register map to operate on.
2887 * 2900 *
2888 * Report the register address stride, mainly intended to for use by 2901 * Report the register address stride, mainly intended to for use by
2889 * generic infrastructure built on top of regmap. 2902 * generic infrastructure built on top of regmap.
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 9adc7b21903d..38a85d50fefd 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -39,12 +39,13 @@ enum regcache_type {
39}; 39};
40 40
41/** 41/**
42 * Default value for a register. We use an array of structs rather 42 * struct reg_default - Default value for a register.
43 * than a simple array as many modern devices have very sparse
44 * register maps.
45 * 43 *
46 * @reg: Register address. 44 * @reg: Register address.
47 * @def: Register default value. 45 * @def: Register default value.
46 *
47 * We use an array of structs rather than a simple array as many modern devices
48 * have very sparse register maps.
48 */ 49 */
49struct reg_default { 50struct reg_default {
50 unsigned int reg; 51 unsigned int reg;
@@ -52,12 +53,14 @@ struct reg_default {
52}; 53};
53 54
54/** 55/**
55 * Register/value pairs for sequences of writes with an optional delay in 56 * struct reg_sequence - An individual write from a sequence of writes.
56 * microseconds to be applied after each write.
57 * 57 *
58 * @reg: Register address. 58 * @reg: Register address.
59 * @def: Register value. 59 * @def: Register value.
60 * @delay_us: Delay to be applied after the register write in microseconds 60 * @delay_us: Delay to be applied after the register write in microseconds
61 *
62 * Register/value pairs for sequences of writes with an optional delay in
63 * microseconds to be applied after each write.
61 */ 64 */
62struct reg_sequence { 65struct reg_sequence {
63 unsigned int reg; 66 unsigned int reg;
@@ -97,6 +100,7 @@ struct reg_sequence {
97 100
98/** 101/**
99 * regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs 102 * regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs
103 *
100 * @map: Regmap to read from 104 * @map: Regmap to read from
101 * @addr: Address to poll 105 * @addr: Address to poll
102 * @val: Unsigned integer variable to read the value into 106 * @val: Unsigned integer variable to read the value into
@@ -145,8 +149,8 @@ enum regmap_endian {
145}; 149};
146 150
147/** 151/**
148 * A register range, used for access related checks 152 * struct regmap_range - A register range, used for access related checks
149 * (readable/writeable/volatile/precious checks) 153 * (readable/writeable/volatile/precious checks)
150 * 154 *
151 * @range_min: address of first register 155 * @range_min: address of first register
152 * @range_max: address of last register 156 * @range_max: address of last register
@@ -158,16 +162,18 @@ struct regmap_range {
158 162
159#define regmap_reg_range(low, high) { .range_min = low, .range_max = high, } 163#define regmap_reg_range(low, high) { .range_min = low, .range_max = high, }
160 164
161/* 165/**
162 * A table of ranges including some yes ranges and some no ranges. 166 * struct regmap_access_table - A table of register ranges for access checks
163 * If a register belongs to a no_range, the corresponding check function
164 * will return false. If a register belongs to a yes range, the corresponding
165 * check function will return true. "no_ranges" are searched first.
166 * 167 *
167 * @yes_ranges : pointer to an array of regmap ranges used as "yes ranges" 168 * @yes_ranges : pointer to an array of regmap ranges used as "yes ranges"
168 * @n_yes_ranges: size of the above array 169 * @n_yes_ranges: size of the above array
169 * @no_ranges: pointer to an array of regmap ranges used as "no ranges" 170 * @no_ranges: pointer to an array of regmap ranges used as "no ranges"
170 * @n_no_ranges: size of the above array 171 * @n_no_ranges: size of the above array
172 *
173 * A table of ranges including some yes ranges and some no ranges.
174 * If a register belongs to a no_range, the corresponding check function
175 * will return false. If a register belongs to a yes range, the corresponding
176 * check function will return true. "no_ranges" are searched first.
171 */ 177 */
172struct regmap_access_table { 178struct regmap_access_table {
173 const struct regmap_range *yes_ranges; 179 const struct regmap_range *yes_ranges;
@@ -180,7 +186,7 @@ typedef void (*regmap_lock)(void *);
180typedef void (*regmap_unlock)(void *); 186typedef void (*regmap_unlock)(void *);
181 187
182/** 188/**
183 * Configuration for the register map of a device. 189 * struct regmap_config - Configuration for the register map of a device.
184 * 190 *
185 * @name: Optional name of the regmap. Useful when a device has multiple 191 * @name: Optional name of the regmap. Useful when a device has multiple
186 * register regions. 192 * register regions.
@@ -313,22 +319,24 @@ struct regmap_config {
313}; 319};
314 320
315/** 321/**
316 * Configuration for indirectly accessed or paged registers. 322 * struct regmap_range_cfg - Configuration for indirectly accessed or paged
317 * Registers, mapped to this virtual range, are accessed in two steps: 323 * registers.
318 * 1. page selector register update;
319 * 2. access through data window registers.
320 * 324 *
321 * @name: Descriptive name for diagnostics 325 * @name: Descriptive name for diagnostics
322 * 326 *
323 * @range_min: Address of the lowest register address in virtual range. 327 * @range_min: Address of the lowest register address in virtual range.
324 * @range_max: Address of the highest register in virtual range. 328 * @range_max: Address of the highest register in virtual range.
325 * 329 *
326 * @page_sel_reg: Register with selector field. 330 * @selector_reg: Register with selector field.
327 * @page_sel_mask: Bit shift for selector value. 331 * @selector_mask: Bit shift for selector value.
328 * @page_sel_shift: Bit mask for selector value. 332 * @selector_shift: Bit mask for selector value.
329 * 333 *
330 * @window_start: Address of first (lowest) register in data window. 334 * @window_start: Address of first (lowest) register in data window.
331 * @window_len: Number of registers in data window. 335 * @window_len: Number of registers in data window.
336 *
337 * Registers, mapped to this virtual range, are accessed in two steps:
338 * 1. page selector register update;
339 * 2. access through data window registers.
332 */ 340 */
333struct regmap_range_cfg { 341struct regmap_range_cfg {
334 const char *name; 342 const char *name;
@@ -371,7 +379,8 @@ typedef struct regmap_async *(*regmap_hw_async_alloc)(void);
371typedef void (*regmap_hw_free_context)(void *context); 379typedef void (*regmap_hw_free_context)(void *context);
372 380
373/** 381/**
374 * Description of a hardware bus for the register map infrastructure. 382 * struct regmap_bus - Description of a hardware bus for the register map
383 * infrastructure.
375 * 384 *
376 * @fast_io: Register IO is fast. Use a spinlock instead of a mutex 385 * @fast_io: Register IO is fast. Use a spinlock instead of a mutex
377 * to perform locking. This field is ignored if custom lock/unlock 386 * to perform locking. This field is ignored if custom lock/unlock
@@ -384,6 +393,10 @@ typedef void (*regmap_hw_free_context)(void *context);
384 * must serialise with respect to non-async I/O. 393 * must serialise with respect to non-async I/O.
385 * @reg_write: Write a single register value to the given register address. This 394 * @reg_write: Write a single register value to the given register address. This
386 * write operation has to complete when returning from the function. 395 * write operation has to complete when returning from the function.
396 * @reg_update_bits: Update bits operation to be used against volatile
397 * registers, intended for devices supporting some mechanism
398 * for setting clearing bits without having to
399 * read/modify/write.
387 * @read: Read operation. Data is returned in the buffer used to transmit 400 * @read: Read operation. Data is returned in the buffer used to transmit
388 * data. 401 * data.
389 * @reg_read: Read a single register value from a given register address. 402 * @reg_read: Read a single register value from a given register address.
@@ -513,7 +526,7 @@ struct regmap *__devm_regmap_init_ac97(struct snd_ac97 *ac97,
513#endif 526#endif
514 527
515/** 528/**
516 * regmap_init(): Initialise register map 529 * regmap_init() - Initialise register map
517 * 530 *
518 * @dev: Device that will be interacted with 531 * @dev: Device that will be interacted with
519 * @bus: Bus-specific callbacks to use with device 532 * @bus: Bus-specific callbacks to use with device
@@ -531,7 +544,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
531 const struct regmap_config *config); 544 const struct regmap_config *config);
532 545
533/** 546/**
534 * regmap_init_i2c(): Initialise register map 547 * regmap_init_i2c() - Initialise register map
535 * 548 *
536 * @i2c: Device that will be interacted with 549 * @i2c: Device that will be interacted with
537 * @config: Configuration for register map 550 * @config: Configuration for register map
@@ -544,9 +557,9 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
544 i2c, config) 557 i2c, config)
545 558
546/** 559/**
547 * regmap_init_spi(): Initialise register map 560 * regmap_init_spi() - Initialise register map
548 * 561 *
549 * @spi: Device that will be interacted with 562 * @dev: Device that will be interacted with
550 * @config: Configuration for register map 563 * @config: Configuration for register map
551 * 564 *
552 * The return value will be an ERR_PTR() on error or a valid pointer to 565 * The return value will be an ERR_PTR() on error or a valid pointer to
@@ -557,8 +570,9 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
557 dev, config) 570 dev, config)
558 571
559/** 572/**
560 * regmap_init_spmi_base(): Create regmap for the Base register space 573 * regmap_init_spmi_base() - Create regmap for the Base register space
561 * @sdev: SPMI device that will be interacted with 574 *
575 * @dev: SPMI device that will be interacted with
562 * @config: Configuration for register map 576 * @config: Configuration for register map
563 * 577 *
564 * The return value will be an ERR_PTR() on error or a valid pointer to 578 * The return value will be an ERR_PTR() on error or a valid pointer to
@@ -569,8 +583,9 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
569 dev, config) 583 dev, config)
570 584
571/** 585/**
572 * regmap_init_spmi_ext(): Create regmap for Ext register space 586 * regmap_init_spmi_ext() - Create regmap for Ext register space
573 * @sdev: Device that will be interacted with 587 *
588 * @dev: Device that will be interacted with
574 * @config: Configuration for register map 589 * @config: Configuration for register map
575 * 590 *
576 * The return value will be an ERR_PTR() on error or a valid pointer to 591 * The return value will be an ERR_PTR() on error or a valid pointer to
@@ -581,7 +596,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
581 dev, config) 596 dev, config)
582 597
583/** 598/**
584 * regmap_init_mmio_clk(): Initialise register map with register clock 599 * regmap_init_mmio_clk() - Initialise register map with register clock
585 * 600 *
586 * @dev: Device that will be interacted with 601 * @dev: Device that will be interacted with
587 * @clk_id: register clock consumer ID 602 * @clk_id: register clock consumer ID
@@ -596,7 +611,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
596 dev, clk_id, regs, config) 611 dev, clk_id, regs, config)
597 612
598/** 613/**
599 * regmap_init_mmio(): Initialise register map 614 * regmap_init_mmio() - Initialise register map
600 * 615 *
601 * @dev: Device that will be interacted with 616 * @dev: Device that will be interacted with
602 * @regs: Pointer to memory-mapped IO region 617 * @regs: Pointer to memory-mapped IO region
@@ -609,7 +624,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
609 regmap_init_mmio_clk(dev, NULL, regs, config) 624 regmap_init_mmio_clk(dev, NULL, regs, config)
610 625
611/** 626/**
612 * regmap_init_ac97(): Initialise AC'97 register map 627 * regmap_init_ac97() - Initialise AC'97 register map
613 * 628 *
614 * @ac97: Device that will be interacted with 629 * @ac97: Device that will be interacted with
615 * @config: Configuration for register map 630 * @config: Configuration for register map
@@ -623,7 +638,7 @@ int regmap_attach_dev(struct device *dev, struct regmap *map,
623bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg); 638bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
624 639
625/** 640/**
626 * devm_regmap_init(): Initialise managed register map 641 * devm_regmap_init() - Initialise managed register map
627 * 642 *
628 * @dev: Device that will be interacted with 643 * @dev: Device that will be interacted with
629 * @bus: Bus-specific callbacks to use with device 644 * @bus: Bus-specific callbacks to use with device
@@ -640,7 +655,7 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
640 dev, bus, bus_context, config) 655 dev, bus, bus_context, config)
641 656
642/** 657/**
643 * devm_regmap_init_i2c(): Initialise managed register map 658 * devm_regmap_init_i2c() - Initialise managed register map
644 * 659 *
645 * @i2c: Device that will be interacted with 660 * @i2c: Device that will be interacted with
646 * @config: Configuration for register map 661 * @config: Configuration for register map
@@ -654,9 +669,9 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
654 i2c, config) 669 i2c, config)
655 670
656/** 671/**
657 * devm_regmap_init_spi(): Initialise register map 672 * devm_regmap_init_spi() - Initialise register map
658 * 673 *
659 * @spi: Device that will be interacted with 674 * @dev: Device that will be interacted with
660 * @config: Configuration for register map 675 * @config: Configuration for register map
661 * 676 *
662 * The return value will be an ERR_PTR() on error or a valid pointer 677 * The return value will be an ERR_PTR() on error or a valid pointer
@@ -668,8 +683,9 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
668 dev, config) 683 dev, config)
669 684
670/** 685/**
671 * devm_regmap_init_spmi_base(): Create managed regmap for Base register space 686 * devm_regmap_init_spmi_base() - Create managed regmap for Base register space
672 * @sdev: SPMI device that will be interacted with 687 *
688 * @dev: SPMI device that will be interacted with
673 * @config: Configuration for register map 689 * @config: Configuration for register map
674 * 690 *
675 * The return value will be an ERR_PTR() on error or a valid pointer 691 * The return value will be an ERR_PTR() on error or a valid pointer
@@ -681,8 +697,9 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
681 dev, config) 697 dev, config)
682 698
683/** 699/**
684 * devm_regmap_init_spmi_ext(): Create managed regmap for Ext register space 700 * devm_regmap_init_spmi_ext() - Create managed regmap for Ext register space
685 * @sdev: SPMI device that will be interacted with 701 *
702 * @dev: SPMI device that will be interacted with
686 * @config: Configuration for register map 703 * @config: Configuration for register map
687 * 704 *
688 * The return value will be an ERR_PTR() on error or a valid pointer 705 * The return value will be an ERR_PTR() on error or a valid pointer
@@ -694,7 +711,7 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
694 dev, config) 711 dev, config)
695 712
696/** 713/**
697 * devm_regmap_init_mmio_clk(): Initialise managed register map with clock 714 * devm_regmap_init_mmio_clk() - Initialise managed register map with clock
698 * 715 *
699 * @dev: Device that will be interacted with 716 * @dev: Device that will be interacted with
700 * @clk_id: register clock consumer ID 717 * @clk_id: register clock consumer ID
@@ -710,7 +727,7 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
710 dev, clk_id, regs, config) 727 dev, clk_id, regs, config)
711 728
712/** 729/**
713 * devm_regmap_init_mmio(): Initialise managed register map 730 * devm_regmap_init_mmio() - Initialise managed register map
714 * 731 *
715 * @dev: Device that will be interacted with 732 * @dev: Device that will be interacted with
716 * @regs: Pointer to memory-mapped IO region 733 * @regs: Pointer to memory-mapped IO region
@@ -724,7 +741,7 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
724 devm_regmap_init_mmio_clk(dev, NULL, regs, config) 741 devm_regmap_init_mmio_clk(dev, NULL, regs, config)
725 742
726/** 743/**
727 * devm_regmap_init_ac97(): Initialise AC'97 register map 744 * devm_regmap_init_ac97() - Initialise AC'97 register map
728 * 745 *
729 * @ac97: Device that will be interacted with 746 * @ac97: Device that will be interacted with
730 * @config: Configuration for register map 747 * @config: Configuration for register map
@@ -799,7 +816,7 @@ bool regmap_reg_in_ranges(unsigned int reg,
799 unsigned int nranges); 816 unsigned int nranges);
800 817
801/** 818/**
802 * Description of an register field 819 * struct reg_field - Description of an register field
803 * 820 *
804 * @reg: Offset of the register within the regmap bank 821 * @reg: Offset of the register within the regmap bank
805 * @lsb: lsb of the register field. 822 * @lsb: lsb of the register field.
@@ -840,7 +857,7 @@ int regmap_fields_update_bits_base(struct regmap_field *field, unsigned int id,
840 bool *change, bool async, bool force); 857 bool *change, bool async, bool force);
841 858
842/** 859/**
843 * Description of an IRQ for the generic regmap irq_chip. 860 * struct regmap_irq - Description of an IRQ for the generic regmap irq_chip.
844 * 861 *
845 * @reg_offset: Offset of the status/mask register within the bank 862 * @reg_offset: Offset of the status/mask register within the bank
846 * @mask: Mask used to flag/control the register. 863 * @mask: Mask used to flag/control the register.
@@ -860,9 +877,7 @@ struct regmap_irq {
860 [_irq] = { .reg_offset = (_off), .mask = (_mask) } 877 [_irq] = { .reg_offset = (_off), .mask = (_mask) }
861 878
862/** 879/**
863 * Description of a generic regmap irq_chip. This is not intended to 880 * struct regmap_irq_chip - Description of a generic regmap irq_chip.
864 * handle every possible interrupt controller, but it should handle a
865 * substantial proportion of those that are found in the wild.
866 * 881 *
867 * @name: Descriptive name for IRQ controller. 882 * @name: Descriptive name for IRQ controller.
868 * 883 *
@@ -896,6 +911,10 @@ struct regmap_irq {
896 * after handling the interrupts in regmap_irq_handler(). 911 * after handling the interrupts in regmap_irq_handler().
897 * @irq_drv_data: Driver specific IRQ data which is passed as parameter when 912 * @irq_drv_data: Driver specific IRQ data which is passed as parameter when
898 * driver specific pre/post interrupt handler is called. 913 * driver specific pre/post interrupt handler is called.
914 *
915 * This is not intended to handle every possible interrupt controller, but
916 * it should handle a substantial proportion of those that are found in the
917 * wild.
899 */ 918 */
900struct regmap_irq_chip { 919struct regmap_irq_chip {
901 const char *name; 920 const char *name;