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>
This commit is contained in:

committed by
Mark Brown

parent
29b4817d40
commit
f50e38c996
@@ -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;
|
||||
|
Reference in New Issue
Block a user