regmap: Add support for padding between register and address
Some devices, especially those with high speed control interfaces, require padding between the register and the data. Support this in the regmap API by providing a pad_bits configuration parameter. Only devices with integer byte counts are supported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
dcd6c92267
commit
82159ba8e6
3 changed files with 24 additions and 11 deletions
|
|
@ -44,6 +44,7 @@ struct reg_default {
|
|||
* Configuration for the register map of a device.
|
||||
*
|
||||
* @reg_bits: Number of bits in a register address, mandatory.
|
||||
* @pad_bits: Number of bits of padding between register and value.
|
||||
* @val_bits: Number of bits in a register value, mandatory.
|
||||
*
|
||||
* @writeable_reg: Optional callback returning true if the register
|
||||
|
|
@ -74,6 +75,7 @@ struct reg_default {
|
|||
*/
|
||||
struct regmap_config {
|
||||
int reg_bits;
|
||||
int pad_bits;
|
||||
int val_bits;
|
||||
|
||||
bool (*writeable_reg)(struct device *dev, unsigned int reg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue