]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: syscon: Support native-endian regmaps
authorPaul Burton <paul.burton@imgtec.com>
Fri, 14 Oct 2016 09:17:31 +0000 (10:17 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 25 Nov 2016 10:04:31 +0000 (10:04 +0000)
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>
drivers/mfd/syscon.c

index 2f2225e845efe960a9904fefc1d16fc5cde6b081..b93fe4c4957a06c947650ae67987cec11aca7d48 100644 (file)
@@ -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,