{
mask = (mask << field->shift) & field->mask;
- ---- return regmap_update_bits(field->regmap, field->reg,
- ---- mask, val << field->shift);
----}
----EXPORT_SYMBOL_GPL(regmap_field_update_bits);
----
----/**
---- * regmap_fields_write(): Write a value to a single register field with port ID
---- *
---- * @field: Register field to write to
---- * @id: port ID
---- * @val: Value to be written
---- *
---- * A value of zero will be returned on success, a negative errno will
---- * be returned in error cases.
---- */
----int regmap_fields_write(struct regmap_field *field, unsigned int id,
---- unsigned int val)
----{
---- if (id >= field->id_size)
---- return -EINVAL;
----
---- return regmap_update_bits(field->regmap,
---- field->reg + (field->id_offset * id),
---- field->mask, val << field->shift);
----}
----EXPORT_SYMBOL_GPL(regmap_fields_write);
----
----int regmap_fields_force_write(struct regmap_field *field, unsigned int id,
---- unsigned int val)
----{
---- if (id >= field->id_size)
---- return -EINVAL;
----
---- return regmap_write_bits(field->regmap,
---- field->reg + (field->id_offset * id),
---- field->mask, val << field->shift);
+ ++++ return regmap_update_bits_base(field->regmap, field->reg,
+ ++++ mask, val << field->shift,
+ ++++ change, async, force);
}
- EXPORT_SYMBOL_GPL(regmap_field_update_bits);
----EXPORT_SYMBOL_GPL(regmap_fields_force_write);
+ ++++EXPORT_SYMBOL_GPL(regmap_field_update_bits_base);
/**
- * regmap_fields_write(): Write a value to a single register field with port ID
- *
- * @field: Register field to write to
- * @id: port ID
- * @val: Value to be written
- *
- * A value of zero will be returned on success, a negative errno will
- * be returned in error cases.
- */
- int regmap_fields_write(struct regmap_field *field, unsigned int id,
- unsigned int val)
- {
- if (id >= field->id_size)
- return -EINVAL;
-
- return regmap_update_bits(field->regmap,
- field->reg + (field->id_offset * id),
- field->mask, val << field->shift);
- }
- EXPORT_SYMBOL_GPL(regmap_fields_write);
-
- int regmap_fields_force_write(struct regmap_field *field, unsigned int id,
- unsigned int val)
- {
- if (id >= field->id_size)
- return -EINVAL;
-
- return regmap_write_bits(field->regmap,
- field->reg + (field->id_offset * id),
- field->mask, val << field->shift);
- }
- EXPORT_SYMBOL_GPL(regmap_fields_force_write);
-
- /**
- ---- * regmap_fields_update_bits(): Perform a read/modify/write cycle
- ---- * on the register field
+ ++++ * regmap_fields_update_bits_base():
+ ++++ * Perform a read/modify/write cycle on the register field
+ ++++ * with change, async, force option
*
* @field: Register field to write to
* @id: port ID
return ret;
}
- ----EXPORT_SYMBOL_GPL(regmap_update_bits_async);
-
- /**
- * regmap_update_bits_check: Perform a read/modify/write cycle on the
- * register map and report if updated
- *
- * @map: Register map to update
- * @reg: Register to update
- * @mask: Bitmask to change
- * @val: New value for bitmask
- * @change: Boolean indicating if a write was done
- *
- * Returns zero for success, a negative number on error.
- */
- int regmap_update_bits_check(struct regmap *map, unsigned int reg,
- unsigned int mask, unsigned int val,
- bool *change)
- {
- int ret;
-
- map->lock(map->lock_arg);
- ret = _regmap_update_bits(map, reg, mask, val, change, false);
- map->unlock(map->lock_arg);
- return ret;
- }
- EXPORT_SYMBOL_GPL(regmap_update_bits_check);
+ ++++EXPORT_SYMBOL_GPL(regmap_update_bits_base);
/**
---- * regmap_update_bits_check: Perform a read/modify/write cycle on the
---- * register map and report if updated
---- *
---- * @map: Register map to update
---- * @reg: Register to update
---- * @mask: Bitmask to change
---- * @val: New value for bitmask
---- * @change: Boolean indicating if a write was done
---- *
---- * Returns zero for success, a negative number on error.
---- */
----int regmap_update_bits_check(struct regmap *map, unsigned int reg,
---- unsigned int mask, unsigned int val,
---- bool *change)
----{
---- int ret;
----
---- map->lock(map->lock_arg);
---- ret = _regmap_update_bits(map, reg, mask, val, change, false);
---- map->unlock(map->lock_arg);
---- return ret;
----}
----EXPORT_SYMBOL_GPL(regmap_update_bits_check);
----
----/**
- ---- * regmap_update_bits_check_async: Perform a read/modify/write cycle on the
- ---- * register map asynchronously and report if
- ---- * updated
+ ++++ * regmap_write_bits: Perform a read/modify/write cycle on the register map
*
* @map: Register map to update
* @reg: Register to update