summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-10-14 10:17:31 +0100
committerLee Jones <lee.jones@linaro.org>2016-11-29 08:21:25 +0000
commit8e52b61cc8ead97ebe9de63a7ab1e70039a48129 (patch)
tree545d1675e71263c08f21684f8def2db9340d9d9d /drivers/mfd
parentb2e2c85091710159b305735d557f4ef4695f5dff (diff)
downloadlinux-8e52b61cc8ead97ebe9de63a7ab1e70039a48129.tar.bz2
mfd: syscon: Support native-endian regmaps
The regmap devicetree binding documentation states that a native-endian property should be supported as well as big-endian & little-endian, however syscon in its duplication of the parsing of these properties omits support for native-endian. Fix this by setting REGMAP_ENDIAN_NATIVE when a native-endian property is found. Cc: linux-mips@linux-mips.org Cc: Arnd Bergmann <arnd@arndb.de> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Tested-by: Maciej W. Rozycki <macro@imgtec.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/syscon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 2f2225e845ef..b93fe4c4957a 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -73,8 +73,10 @@ static struct syscon *of_syscon_register(struct device_node *np)
/* Parse the device's DT node for an endianness specification */
if (of_property_read_bool(np, "big-endian"))
syscon_config.val_format_endian = REGMAP_ENDIAN_BIG;
- else if (of_property_read_bool(np, "little-endian"))
+ else if (of_property_read_bool(np, "little-endian"))
syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
+ else if (of_property_read_bool(np, "native-endian"))
+ syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE;
/*
* search for reg-io-width property in DT. If it is not provided,