diff options
author | Tony Lindgren <tony@atomide.com> | 2016-09-15 23:56:10 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-09-16 14:06:24 +0300 |
commit | f50e38c9966076465bc8d9dd0bc582c268a0031e (patch) | |
tree | 094910c3f36be602c126d4fe6fd5edb4e631c68e /drivers/base/regmap/internal.h | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) | |
download | linux-f50e38c9966076465bc8d9dd0bc582c268a0031e.tar.xz |
regmap: Allow longer flag masks for read and write
We currently only support masking the top bit for read and write
flags. Let's make the mask unsigned long and mask the bytes based
on the configured register length to make things more generic.
This allows using regmap for more exotic combinations like SPI
devices that need little endian addressing.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r-- | drivers/base/regmap/internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index a0380338946a..6636f03ac2da 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -105,8 +105,8 @@ struct regmap { bool defer_caching; - u8 read_flag_mask; - u8 write_flag_mask; + unsigned long read_flag_mask; + unsigned long write_flag_mask; /* number of bits to (left) shift the reg value when formatting*/ int reg_shift; |