Skip to content

Commit d29ccdb

Browse files
paulburtonLee Jones
authored andcommitted
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 <[email protected]> Cc: Lee Jones <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: [email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 9c76358 commit d29ccdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mfd/syscon.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ static struct syscon *of_syscon_register(struct device_node *np)
7373
/* Parse the device's DT node for an endianness specification */
7474
if (of_property_read_bool(np, "big-endian"))
7575
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"))
7777
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;
7880

7981
/*
8082
* search for reg-io-width property in DT. If it is not provided,

0 commit comments

Comments
 (0)