regmap: Allow longer flag masks for read and write
authorTony Lindgren <tony@atomide.com>
Thu, 15 Sep 2016 20:56:10 +0000 (13:56 -0700)
committerMark Brown <broonie@kernel.org>
Fri, 16 Sep 2016 11:06:24 +0000 (12:06 +0100)
commitf50e38c9966076465bc8d9dd0bc582c268a0031e
tree094910c3f36be602c126d4fe6fd5edb4e631c68e
parent29b4817d4018df78086157ea3a55c1d9424a7cfc
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>
drivers/base/regmap/internal.h
drivers/base/regmap/regmap.c
include/linux/regmap.h