Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3de5ad6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regmap updates from Mark Brown:
 "For v4.11 activity on the regmap API has literally doubled, there are
  two patches this release:

   - fixes from Charles Keepax to make the kerneldoc generate correctly

   - a cleanup from Geliang Tang using rb_entry() rather than open
     coding it with container_of()"

* tag 'regmap-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Fixup the kernel-doc comments on functions/structures
  regmap: use rb_entry()
parents 27a67e0f 90e51e6d
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -81,7 +81,7 @@ static struct regcache_rbtree_node *regcache_rbtree_lookup(struct regmap *map,


	node = rbtree_ctx->root.rb_node;
	node = rbtree_ctx->root.rb_node;
	while (node) {
	while (node) {
		rbnode = container_of(node, struct regcache_rbtree_node, node);
		rbnode = rb_entry(node, struct regcache_rbtree_node, node);
		regcache_rbtree_get_base_top_reg(map, rbnode, &base_reg,
		regcache_rbtree_get_base_top_reg(map, rbnode, &base_reg,
						 &top_reg);
						 &top_reg);
		if (reg >= base_reg && reg <= top_reg) {
		if (reg >= base_reg && reg <= top_reg) {
@@ -108,8 +108,7 @@ static int regcache_rbtree_insert(struct regmap *map, struct rb_root *root,
	parent = NULL;
	parent = NULL;
	new = &root->rb_node;
	new = &root->rb_node;
	while (*new) {
	while (*new) {
		rbnode_tmp = container_of(*new, struct regcache_rbtree_node,
		rbnode_tmp = rb_entry(*new, struct regcache_rbtree_node, node);
					  node);
		/* base and top registers of the current rbnode */
		/* base and top registers of the current rbnode */
		regcache_rbtree_get_base_top_reg(map, rbnode_tmp, &base_reg_tmp,
		regcache_rbtree_get_base_top_reg(map, rbnode_tmp, &base_reg_tmp,
						 &top_reg_tmp);
						 &top_reg_tmp);
@@ -152,7 +151,7 @@ static int rbtree_show(struct seq_file *s, void *ignored)


	for (node = rb_first(&rbtree_ctx->root); node != NULL;
	for (node = rb_first(&rbtree_ctx->root); node != NULL;
	     node = rb_next(node)) {
	     node = rb_next(node)) {
		n = container_of(node, struct regcache_rbtree_node, node);
		n = rb_entry(node, struct regcache_rbtree_node, node);
		mem_size += sizeof(*n);
		mem_size += sizeof(*n);
		mem_size += (n->blklen * map->cache_word_size);
		mem_size += (n->blklen * map->cache_word_size);
		mem_size += BITS_TO_LONGS(n->blklen) * sizeof(long);
		mem_size += BITS_TO_LONGS(n->blklen) * sizeof(long);
+10 −10
Original line number Original line Diff line number Diff line
@@ -224,7 +224,7 @@ void regcache_exit(struct regmap *map)
}
}


/**
/**
 * regcache_read: Fetch the value of a given register from the cache.
 * regcache_read - Fetch the value of a given register from the cache.
 *
 *
 * @map: map to configure.
 * @map: map to configure.
 * @reg: The register index.
 * @reg: The register index.
@@ -255,7 +255,7 @@ int regcache_read(struct regmap *map,
}
}


/**
/**
 * regcache_write: Set the value of a given register in the cache.
 * regcache_write - Set the value of a given register in the cache.
 *
 *
 * @map: map to configure.
 * @map: map to configure.
 * @reg: The register index.
 * @reg: The register index.
@@ -328,7 +328,7 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
}
}


/**
/**
 * regcache_sync: Sync the register cache with the hardware.
 * regcache_sync - Sync the register cache with the hardware.
 *
 *
 * @map: map to configure.
 * @map: map to configure.
 *
 *
@@ -396,7 +396,7 @@ int regcache_sync(struct regmap *map)
EXPORT_SYMBOL_GPL(regcache_sync);
EXPORT_SYMBOL_GPL(regcache_sync);


/**
/**
 * regcache_sync_region: Sync part  of the register cache with the hardware.
 * regcache_sync_region - Sync part  of the register cache with the hardware.
 *
 *
 * @map: map to sync.
 * @map: map to sync.
 * @min: first register to sync
 * @min: first register to sync
@@ -452,7 +452,7 @@ int regcache_sync_region(struct regmap *map, unsigned int min,
EXPORT_SYMBOL_GPL(regcache_sync_region);
EXPORT_SYMBOL_GPL(regcache_sync_region);


/**
/**
 * regcache_drop_region: Discard part of the register cache
 * regcache_drop_region - Discard part of the register cache
 *
 *
 * @map: map to operate on
 * @map: map to operate on
 * @min: first register to discard
 * @min: first register to discard
@@ -483,10 +483,10 @@ int regcache_drop_region(struct regmap *map, unsigned int min,
EXPORT_SYMBOL_GPL(regcache_drop_region);
EXPORT_SYMBOL_GPL(regcache_drop_region);


/**
/**
 * regcache_cache_only: Put a register map into cache only mode
 * regcache_cache_only - Put a register map into cache only mode
 *
 *
 * @map: map to configure
 * @map: map to configure
 * @cache_only: flag if changes should be written to the hardware
 * @enable: flag if changes should be written to the hardware
 *
 *
 * When a register map is marked as cache only writes to the register
 * When a register map is marked as cache only writes to the register
 * map API will only update the register cache, they will not cause
 * 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)
EXPORT_SYMBOL_GPL(regcache_cache_only);
EXPORT_SYMBOL_GPL(regcache_cache_only);


/**
/**
 * regcache_mark_dirty: Indicate that HW registers were reset to default values
 * regcache_mark_dirty - Indicate that HW registers were reset to default values
 *
 *
 * @map: map to mark
 * @map: map to mark
 *
 *
@@ -527,10 +527,10 @@ void regcache_mark_dirty(struct regmap *map)
EXPORT_SYMBOL_GPL(regcache_mark_dirty);
EXPORT_SYMBOL_GPL(regcache_mark_dirty);


/**
/**
 * regcache_cache_bypass: Put a register map into cache bypass mode
 * regcache_cache_bypass - Put a register map into cache bypass mode
 *
 *
 * @map: map to configure
 * @map: map to configure
 * @cache_bypass: flag if changes should not be written to the cache
 * @enable: flag if changes should not be written to the cache
 *
 *
 * When a register map is marked with the cache bypass option, writes
 * When a register map is marked with the cache bypass option, writes
 * to the register map API will only update the hardware and not the
 * to the register map API will only update the hardware and not the
+33 −29
Original line number Original line Diff line number Diff line
@@ -398,13 +398,14 @@ static const struct irq_domain_ops regmap_domain_ops = {
};
};


/**
/**
 * regmap_add_irq_chip(): Use standard regmap IRQ controller handling
 * regmap_add_irq_chip() - Use standard regmap IRQ controller handling
 *
 *
 * map:       The regmap for the device.
 * @map: The regmap for the device.
 * irq:       The IRQ the device uses to signal interrupts
 * @irq: The IRQ the device uses to signal interrupts.
 * irq_flags: The IRQF_ flags to use for the primary interrupt.
 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
 * chip:      Configuration for the interrupt controller.
 * @irq_base: Allocate at specific IRQ number if irq_base > 0.
 * data:      Runtime data structure for the controller, allocated on success
 * @chip: Configuration for the interrupt controller.
 * @data: Runtime data structure for the controller, allocated on success.
 *
 *
 * Returns 0 on success or an errno on failure.
 * Returns 0 on success or an errno on failure.
 *
 *
@@ -659,12 +660,12 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
EXPORT_SYMBOL_GPL(regmap_add_irq_chip);
EXPORT_SYMBOL_GPL(regmap_add_irq_chip);


/**
/**
 * regmap_del_irq_chip(): Stop interrupt handling for a regmap IRQ chip
 * regmap_del_irq_chip() - Stop interrupt handling for a regmap IRQ chip
 *
 *
 * @irq: Primary IRQ for the device
 * @irq: Primary IRQ for the device
 * @d:   regmap_irq_chip_data allocated by regmap_add_irq_chip()
 * @d: &regmap_irq_chip_data allocated by regmap_add_irq_chip()
 *
 *
 * This function also dispose all mapped irq on chip.
 * This function also disposes of all mapped IRQs on the chip.
 */
 */
void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
{
{
@@ -723,18 +724,19 @@ static int devm_regmap_irq_chip_match(struct device *dev, void *res, void *data)
}
}


/**
/**
 * devm_regmap_add_irq_chip(): Resource manager regmap_add_irq_chip()
 * devm_regmap_add_irq_chip() - Resource manager regmap_add_irq_chip()
 *
 *
 * @dev: The device pointer on which irq_chip belongs to.
 * @dev: The device pointer on which irq_chip belongs to.
 * @map: The regmap for the device.
 * @map: The regmap for the device.
 * @irq: The IRQ the device uses to signal interrupts
 * @irq: The IRQ the device uses to signal interrupts
 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
 * @irq_base: Allocate at specific IRQ number if irq_base > 0.
 * @chip: Configuration for the interrupt controller.
 * @chip: Configuration for the interrupt controller.
 * @data: Runtime data structure for the controller, allocated on success
 * @data: Runtime data structure for the controller, allocated on success
 *
 *
 * Returns 0 on success or an errno on failure.
 * Returns 0 on success or an errno on failure.
 *
 *
 * The regmap_irq_chip data automatically be released when the device is
 * The &regmap_irq_chip_data will be automatically released when the device is
 * unbound.
 * unbound.
 */
 */
int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
int 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,
EXPORT_SYMBOL_GPL(devm_regmap_add_irq_chip);
EXPORT_SYMBOL_GPL(devm_regmap_add_irq_chip);


/**
/**
 * devm_regmap_del_irq_chip(): Resource managed regmap_del_irq_chip()
 * devm_regmap_del_irq_chip() - Resource managed regmap_del_irq_chip()
 *
 *
 * @dev: Device for which which resource was allocated.
 * @dev: Device for which which resource was allocated.
 * @irq: Primary IRQ for the device
 * @irq: Primary IRQ for the device.
 * @d:   regmap_irq_chip_data allocated by regmap_add_irq_chip()
 * @data: &regmap_irq_chip_data allocated by regmap_add_irq_chip().
 *
 * A resource managed version of regmap_del_irq_chip().
 */
 */
void devm_regmap_del_irq_chip(struct device *dev, int irq,
void devm_regmap_del_irq_chip(struct device *dev, int irq,
			      struct regmap_irq_chip_data *data)
			      struct regmap_irq_chip_data *data)
@@ -786,11 +790,11 @@ void devm_regmap_del_irq_chip(struct device *dev, int irq,
EXPORT_SYMBOL_GPL(devm_regmap_del_irq_chip);
EXPORT_SYMBOL_GPL(devm_regmap_del_irq_chip);


/**
/**
 * regmap_irq_chip_get_base(): Retrieve interrupt base for a regmap IRQ chip
 * regmap_irq_chip_get_base() - Retrieve interrupt base for a regmap IRQ chip
 *
 *
 * Useful for drivers to request their own IRQs.
 * @data: regmap irq controller to operate on.
 *
 *
 * @data: regmap_irq controller to operate on.
 * Useful for drivers to request their own IRQs.
 */
 */
int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data)
int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data)
{
{
@@ -800,12 +804,12 @@ int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data)
EXPORT_SYMBOL_GPL(regmap_irq_chip_get_base);
EXPORT_SYMBOL_GPL(regmap_irq_chip_get_base);


/**
/**
 * regmap_irq_get_virq(): Map an interrupt on a chip to a virtual IRQ
 * regmap_irq_get_virq() - Map an interrupt on a chip to a virtual IRQ
 *
 *
 * Useful for drivers to request their own IRQs.
 * @data: regmap irq controller to operate on.
 * @irq: index of the interrupt requested in the chip IRQs.
 *
 *
 * @data: regmap_irq controller to operate on.
 * Useful for drivers to request their own IRQs.
 * @irq: index of the interrupt requested in the chip IRQs
 */
 */
int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq)
int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq)
{
{
@@ -818,14 +822,14 @@ int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq)
EXPORT_SYMBOL_GPL(regmap_irq_get_virq);
EXPORT_SYMBOL_GPL(regmap_irq_get_virq);


/**
/**
 * regmap_irq_get_domain(): Retrieve the irq_domain for the chip
 * regmap_irq_get_domain() - Retrieve the irq_domain for the chip
 *
 * @data: regmap_irq controller to operate on.
 *
 *
 * Useful for drivers to request their own IRQs and for integration
 * Useful for drivers to request their own IRQs and for integration
 * with subsystems.  For ease of integration NULL is accepted as a
 * with subsystems.  For ease of integration NULL is accepted as a
 * domain, allowing devices to just call this even if no domain is
 * domain, allowing devices to just call this even if no domain is
 * allocated.
 * allocated.
 *
 * @data: regmap_irq controller to operate on.
 */
 */
struct irq_domain *regmap_irq_get_domain(struct regmap_irq_chip_data *data)
struct irq_domain *regmap_irq_get_domain(struct regmap_irq_chip_data *data)
{
{
+71 −58
Original line number Original line Diff line number Diff line
@@ -459,7 +459,7 @@ static bool _regmap_range_add(struct regmap *map,


	while (*new) {
	while (*new) {
		struct regmap_range_node *this =
		struct regmap_range_node *this =
			container_of(*new, struct regmap_range_node, node);
			rb_entry(*new, struct regmap_range_node, node);


		parent = *new;
		parent = *new;
		if (data->range_max < this->range_min)
		if (data->range_max < this->range_min)
@@ -483,7 +483,7 @@ static struct regmap_range_node *_regmap_range_lookup(struct regmap *map,


	while (node) {
	while (node) {
		struct regmap_range_node *this =
		struct regmap_range_node *this =
			container_of(node, struct regmap_range_node, node);
			rb_entry(node, struct regmap_range_node, node);


		if (reg < this->range_min)
		if (reg < this->range_min)
			node = node->rb_left;
			node = node->rb_left;
@@ -1091,8 +1091,7 @@ static void regmap_field_init(struct regmap_field *rm_field,
}
}


/**
/**
 * devm_regmap_field_alloc(): Allocate and initialise a register field
 * devm_regmap_field_alloc() - Allocate and initialise a register field.
 * in a register map.
 *
 *
 * @dev: Device that will be interacted with
 * @dev: Device that will be interacted with
 * @regmap: regmap bank in which this register field is located.
 * @regmap: regmap bank in which this register field is located.
@@ -1118,13 +1117,15 @@ struct regmap_field *devm_regmap_field_alloc(struct device *dev,
EXPORT_SYMBOL_GPL(devm_regmap_field_alloc);
EXPORT_SYMBOL_GPL(devm_regmap_field_alloc);


/**
/**
 * devm_regmap_field_free(): Free register field allocated using
 * devm_regmap_field_free() - Free a register field allocated using
 * devm_regmap_field_alloc. Usally drivers need not call this function,
 *                            devm_regmap_field_alloc.
 * as the memory allocated via devm will be freed as per device-driver
 * life-cyle.
 *
 *
 * @dev: Device that will be interacted with
 * @dev: Device that will be interacted with
 * @field: regmap field which should be freed.
 * @field: regmap field which should be freed.
 *
 * Free register field allocated using devm_regmap_field_alloc(). Usually
 * drivers need not call this function, as the memory allocated via devm
 * will be freed as per device-driver life-cyle.
 */
 */
void devm_regmap_field_free(struct device *dev,
void devm_regmap_field_free(struct device *dev,
	struct regmap_field *field)
	struct regmap_field *field)
@@ -1134,8 +1135,7 @@ void devm_regmap_field_free(struct device *dev,
EXPORT_SYMBOL_GPL(devm_regmap_field_free);
EXPORT_SYMBOL_GPL(devm_regmap_field_free);


/**
/**
 * regmap_field_alloc(): Allocate and initialise a register field
 * regmap_field_alloc() - Allocate and initialise a register field.
 * in a register map.
 *
 *
 * @regmap: regmap bank in which this register field is located.
 * @regmap: regmap bank in which this register field is located.
 * @reg_field: Register field with in the bank.
 * @reg_field: Register field with in the bank.
@@ -1159,7 +1159,8 @@ struct regmap_field *regmap_field_alloc(struct regmap *regmap,
EXPORT_SYMBOL_GPL(regmap_field_alloc);
EXPORT_SYMBOL_GPL(regmap_field_alloc);


/**
/**
 * regmap_field_free(): Free register field allocated using regmap_field_alloc
 * regmap_field_free() - Free register field allocated using
 *                       regmap_field_alloc.
 *
 *
 * @field: regmap field which should be freed.
 * @field: regmap field which should be freed.
 */
 */
@@ -1170,7 +1171,7 @@ void regmap_field_free(struct regmap_field *field)
EXPORT_SYMBOL_GPL(regmap_field_free);
EXPORT_SYMBOL_GPL(regmap_field_free);


/**
/**
 * regmap_reinit_cache(): Reinitialise the current register cache
 * regmap_reinit_cache() - Reinitialise the current register cache
 *
 *
 * @map: Register map to operate on.
 * @map: Register map to operate on.
 * @config: New configuration.  Only the cache data will be used.
 * @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)
EXPORT_SYMBOL_GPL(regmap_reinit_cache);
EXPORT_SYMBOL_GPL(regmap_reinit_cache);


/**
/**
 * regmap_exit(): Free a previously allocated register map
 * regmap_exit() - Free a previously allocated register map
 *
 * @map: Register map to operate on.
 */
 */
void regmap_exit(struct regmap *map)
void regmap_exit(struct regmap *map)
{
{
@@ -1245,7 +1248,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data)
}
}


/**
/**
 * dev_get_regmap(): Obtain the regmap (if any) for a device
 * dev_get_regmap() - Obtain the regmap (if any) for a device
 *
 *
 * @dev: Device to retrieve the map for
 * @dev: Device to retrieve the map for
 * @name: Optional name for the register map, usually NULL.
 * @name: Optional name for the register map, usually NULL.
@@ -1268,7 +1271,7 @@ struct regmap *dev_get_regmap(struct device *dev, const char *name)
EXPORT_SYMBOL_GPL(dev_get_regmap);
EXPORT_SYMBOL_GPL(dev_get_regmap);


/**
/**
 * regmap_get_device(): Obtain the device from a regmap
 * regmap_get_device() - Obtain the device from a regmap
 *
 *
 * @map: Register map to operate on.
 * @map: Register map to operate on.
 *
 *
@@ -1654,7 +1657,7 @@ int _regmap_write(struct regmap *map, unsigned int reg,
}
}


/**
/**
 * regmap_write(): Write a value to a single register
 * regmap_write() - Write a value to a single register
 *
 *
 * @map: Register map to write to
 * @map: Register map to write to
 * @reg: Register to write to
 * @reg: Register to write to
@@ -1681,7 +1684,7 @@ int regmap_write(struct regmap *map, unsigned int reg, unsigned int val)
EXPORT_SYMBOL_GPL(regmap_write);
EXPORT_SYMBOL_GPL(regmap_write);


/**
/**
 * regmap_write_async(): Write a value to a single register asynchronously
 * regmap_write_async() - Write a value to a single register asynchronously
 *
 *
 * @map: Register map to write to
 * @map: Register map to write to
 * @reg: Register to write to
 * @reg: Register to write to
@@ -1712,7 +1715,7 @@ int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val)
EXPORT_SYMBOL_GPL(regmap_write_async);
EXPORT_SYMBOL_GPL(regmap_write_async);


/**
/**
 * regmap_raw_write(): Write raw values to one or more registers
 * regmap_raw_write() - Write raw values to one or more registers
 *
 *
 * @map: Register map to write to
 * @map: Register map to write to
 * @reg: Initial register to write to
 * @reg: Initial register to write to
@@ -1750,9 +1753,8 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
EXPORT_SYMBOL_GPL(regmap_raw_write);
EXPORT_SYMBOL_GPL(regmap_raw_write);


/**
/**
 * regmap_field_update_bits_base():
 * regmap_field_update_bits_base() - Perform a read/modify/write cycle a
 *	Perform a read/modify/write cycle on the register field
 *                                   register field.
 *	with change, async, force option
 *
 *
 * @field: Register field to write to
 * @field: Register field to write to
 * @mask: Bitmask to change
 * @mask: Bitmask to change
@@ -1761,6 +1763,9 @@ EXPORT_SYMBOL_GPL(regmap_raw_write);
 * @async: Boolean indicating asynchronously
 * @async: Boolean indicating asynchronously
 * @force: Boolean indicating use force update
 * @force: Boolean indicating use force update
 *
 *
 * Perform a read/modify/write cycle on the register field with change,
 * async, force option.
 *
 * A value of zero will be returned on success, a negative errno will
 * A value of zero will be returned on success, a negative errno will
 * be returned in error cases.
 * be returned in error cases.
 */
 */
@@ -1777,9 +1782,8 @@ int regmap_field_update_bits_base(struct regmap_field *field,
EXPORT_SYMBOL_GPL(regmap_field_update_bits_base);
EXPORT_SYMBOL_GPL(regmap_field_update_bits_base);


/**
/**
 * regmap_fields_update_bits_base():
 * regmap_fields_update_bits_base() - Perform a read/modify/write cycle a
 *	Perform a read/modify/write cycle on the register field
 *                                    register field with port ID
 *	with change, async, force option
 *
 *
 * @field: Register field to write to
 * @field: Register field to write to
 * @id: port ID
 * @id: port ID
@@ -1808,8 +1812,8 @@ int regmap_fields_update_bits_base(struct regmap_field *field, unsigned int id,
}
}
EXPORT_SYMBOL_GPL(regmap_fields_update_bits_base);
EXPORT_SYMBOL_GPL(regmap_fields_update_bits_base);


/*
/**
 * regmap_bulk_write(): Write multiple registers to the device
 * regmap_bulk_write() - Write multiple registers to the device
 *
 *
 * @map: Register map to write to
 * @map: Register map to write to
 * @reg: First register to be write from
 * @reg: First register to be write from
@@ -2174,18 +2178,18 @@ static int _regmap_multi_reg_write(struct regmap *map,
	return _regmap_raw_multi_reg_write(map, regs, num_regs);
	return _regmap_raw_multi_reg_write(map, regs, num_regs);
}
}


/*
/**
 * regmap_multi_reg_write(): Write multiple registers to the device
 * regmap_multi_reg_write() - Write multiple registers to the device
 *
 * where the set of register,value pairs are supplied in any order,
 * possibly not all in a single range.
 *
 *
 * @map: Register map to write to
 * @map: Register map to write to
 * @regs: Array of structures containing register,value to be written
 * @regs: Array of structures containing register,value to be written
 * @num_regs: Number of registers to write
 * @num_regs: Number of registers to write
 *
 *
 * Write multiple registers to the device where the set of register, value
 * pairs are supplied in any order, possibly not all in a single range.
 *
 * The 'normal' block write mode will send ultimately send data on the
 * The 'normal' block write mode will send ultimately send data on the
 * target bus as R,V1,V2,V3,..,Vn where successively higer registers are
 * target bus as R,V1,V2,V3,..,Vn where successively higher registers are
 * addressed. However, this alternative block multi write mode will send
 * addressed. However, this alternative block multi write mode will send
 * the data as R1,V1,R2,V2,..,Rn,Vn on the target bus. The target device
 * the data as R1,V1,R2,V2,..,Rn,Vn on the target bus. The target device
 * must of course support the mode.
 * must of course support the mode.
@@ -2208,16 +2212,17 @@ int regmap_multi_reg_write(struct regmap *map, const struct reg_sequence *regs,
}
}
EXPORT_SYMBOL_GPL(regmap_multi_reg_write);
EXPORT_SYMBOL_GPL(regmap_multi_reg_write);


/*
/**
 * regmap_multi_reg_write_bypassed(): Write multiple registers to the
 * regmap_multi_reg_write_bypassed() - Write multiple registers to the
 *                                     device but not the cache
 *                                     device but not the cache
 *
 *
 * where the set of register are supplied in any order
 *
 * @map: Register map to write to
 * @map: Register map to write to
 * @regs: Array of structures containing register,value to be written
 * @regs: Array of structures containing register,value to be written
 * @num_regs: Number of registers to write
 * @num_regs: Number of registers to write
 *
 *
 * Write multiple registers to the device but not the cache where the set
 * of register are supplied in any order.
 *
 * This function is intended to be used for writing a large block of data
 * This function is intended to be used for writing a large block of data
 * atomically to the device in single transfer for those I2C client devices
 * atomically to the device in single transfer for those I2C client devices
 * that implement this alternative block write mode.
 * that implement this alternative block write mode.
@@ -2248,7 +2253,7 @@ int regmap_multi_reg_write_bypassed(struct regmap *map,
EXPORT_SYMBOL_GPL(regmap_multi_reg_write_bypassed);
EXPORT_SYMBOL_GPL(regmap_multi_reg_write_bypassed);


/**
/**
 * regmap_raw_write_async(): Write raw values to one or more registers
 * regmap_raw_write_async() - Write raw values to one or more registers
 *                            asynchronously
 *                            asynchronously
 *
 *
 * @map: Register map to write to
 * @map: Register map to write to
@@ -2385,7 +2390,7 @@ static int _regmap_read(struct regmap *map, unsigned int reg,
}
}


/**
/**
 * regmap_read(): Read a value from a single register
 * regmap_read() - Read a value from a single register
 *
 *
 * @map: Register map to read from
 * @map: Register map to read from
 * @reg: Register to be read from
 * @reg: Register to be read from
@@ -2412,7 +2417,7 @@ int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val)
EXPORT_SYMBOL_GPL(regmap_read);
EXPORT_SYMBOL_GPL(regmap_read);


/**
/**
 * regmap_raw_read(): Read raw data from the device
 * regmap_raw_read() - Read raw data from the device
 *
 *
 * @map: Register map to read from
 * @map: Register map to read from
 * @reg: First register to be read from
 * @reg: First register to be read from
@@ -2477,7 +2482,7 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
EXPORT_SYMBOL_GPL(regmap_raw_read);
EXPORT_SYMBOL_GPL(regmap_raw_read);


/**
/**
 * regmap_field_read(): Read a value to a single register field
 * regmap_field_read() - Read a value to a single register field
 *
 *
 * @field: Register field to read from
 * @field: Register field to read from
 * @val: Pointer to store read value
 * @val: Pointer to store read value
@@ -2502,7 +2507,7 @@ int regmap_field_read(struct regmap_field *field, unsigned int *val)
EXPORT_SYMBOL_GPL(regmap_field_read);
EXPORT_SYMBOL_GPL(regmap_field_read);


/**
/**
 * regmap_fields_read(): Read a value to a single register field with port ID
 * regmap_fields_read() - Read a value to a single register field with port ID
 *
 *
 * @field: Register field to read from
 * @field: Register field to read from
 * @id: port ID
 * @id: port ID
@@ -2535,7 +2540,7 @@ int regmap_fields_read(struct regmap_field *field, unsigned int id,
EXPORT_SYMBOL_GPL(regmap_fields_read);
EXPORT_SYMBOL_GPL(regmap_fields_read);


/**
/**
 * regmap_bulk_read(): Read multiple registers from the device
 * regmap_bulk_read() - Read multiple registers from the device
 *
 *
 * @map: Register map to read from
 * @map: Register map to read from
 * @reg: First register to be read from
 * @reg: First register to be read from
@@ -2692,9 +2697,7 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
}
}


/**
/**
 * regmap_update_bits_base:
 * regmap_update_bits_base() - Perform a read/modify/write cycle on a register
 *	Perform a read/modify/write cycle on the
 *	register map with change, async, force option
 *
 *
 * @map: Register map to update
 * @map: Register map to update
 * @reg: Register to update
 * @reg: Register to update
@@ -2704,10 +2707,14 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
 * @async: Boolean indicating asynchronously
 * @async: Boolean indicating asynchronously
 * @force: Boolean indicating use force update
 * @force: Boolean indicating use force update
 *
 *
 * if async was true,
 * Perform a read/modify/write cycle on a register map with change, async, force
 * With most buses the read must be done synchronously so this is most
 * options.
 * useful for devices with a cache which do not need to interact with
 *
 * the hardware to determine the current register value.
 * If async is true:
 *
 * With most buses the read must be done synchronously so this is most useful
 * for devices with a cache which do not need to interact with the hardware to
 * determine the current register value.
 *
 *
 * Returns zero for success, a negative number on error.
 * Returns zero for success, a negative number on error.
 */
 */
@@ -2765,7 +2772,7 @@ static int regmap_async_is_done(struct regmap *map)
}
}


/**
/**
 * regmap_async_complete: Ensure all asynchronous I/O has completed.
 * regmap_async_complete - Ensure all asynchronous I/O has completed.
 *
 *
 * @map: Map to operate on.
 * @map: Map to operate on.
 *
 *
@@ -2797,7 +2804,7 @@ int regmap_async_complete(struct regmap *map)
EXPORT_SYMBOL_GPL(regmap_async_complete);
EXPORT_SYMBOL_GPL(regmap_async_complete);


/**
/**
 * regmap_register_patch: Register and apply register updates to be applied
 * regmap_register_patch - Register and apply register updates to be applied
 *                         on device initialistion
 *                         on device initialistion
 *
 *
 * @map: Register map to apply updates to.
 * @map: Register map to apply updates to.
@@ -2855,8 +2862,10 @@ int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
}
}
EXPORT_SYMBOL_GPL(regmap_register_patch);
EXPORT_SYMBOL_GPL(regmap_register_patch);


/*
/**
 * regmap_get_val_bytes(): Report the size of a register value
 * regmap_get_val_bytes() - Report the size of a register value
 *
 * @map: Register map to operate on.
 *
 *
 * Report the size of a register value, mainly intended to for use by
 * Report the size of a register value, mainly intended to for use by
 * generic infrastructure built on top of regmap.
 * generic infrastructure built on top of regmap.
@@ -2871,7 +2880,9 @@ int regmap_get_val_bytes(struct regmap *map)
EXPORT_SYMBOL_GPL(regmap_get_val_bytes);
EXPORT_SYMBOL_GPL(regmap_get_val_bytes);


/**
/**
 * regmap_get_max_register(): Report the max register value
 * regmap_get_max_register() - Report the max register value
 *
 * @map: Register map to operate on.
 *
 *
 * Report the max register value, mainly intended to for use by
 * Report the max register value, mainly intended to for use by
 * generic infrastructure built on top of regmap.
 * generic infrastructure built on top of regmap.
@@ -2883,7 +2894,9 @@ int regmap_get_max_register(struct regmap *map)
EXPORT_SYMBOL_GPL(regmap_get_max_register);
EXPORT_SYMBOL_GPL(regmap_get_max_register);


/**
/**
 * regmap_get_reg_stride(): Report the register address stride
 * regmap_get_reg_stride() - Report the register address stride
 *
 * @map: Register map to operate on.
 *
 *
 * Report the register address stride, mainly intended to for use by
 * Report the register address stride, mainly intended to for use by
 * generic infrastructure built on top of regmap.
 * generic infrastructure built on top of regmap.
+67 −48

File changed.

Preview size limit exceeded, changes collapsed.