diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-10-14 05:17:31 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2016-11-25 05:04:31 -0500 |
commit | d29ccdb3f0e5dccb170200c9f3d573eaa5af261b (patch) | |
tree | cddcf465f6ef3249c87e7e6785aec2f30e6ec880 | |
parent | 9c763584b7c8911106bb77af7e648bef09af9d80 (diff) |
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.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/syscon.c | 4 |
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) | |||
73 | /* Parse the device's DT node for an endianness specification */ | 73 | /* Parse the device's DT node for an endianness specification */ |
74 | if (of_property_read_bool(np, "big-endian")) | 74 | if (of_property_read_bool(np, "big-endian")) |
75 | syscon_config.val_format_endian = REGMAP_ENDIAN_BIG; | 75 | syscon_config.val_format_endian = REGMAP_ENDIAN_BIG; |
76 | else if (of_property_read_bool(np, "little-endian")) | 76 | else if (of_property_read_bool(np, "little-endian")) |
77 | syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE; | 77 | syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE; |
78 | else if (of_property_read_bool(np, "native-endian")) | ||
79 | syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE; | ||
78 | 80 | ||
79 | /* | 81 | /* |
80 | * search for reg-io-width property in DT. If it is not provided, | 82 | * search for reg-io-width property in DT. If it is not provided, |