Revert "mfd: syscon: Remove repetition of the regmap_get_val_endian()"

This reverts commit 72a95859728a7866522e6633818bebc1c2519b17.

It broke reboots on big-endian MIPS and MIPS64 malta QEMU instances,
which use the syscon driver. Little-endian is not effected, which means
likely it's important to handle regmap_get_val_endian() in this function
after all.

Fixes: 72a95859728a ("mfd: syscon: Remove repetition of the regmap_get_val_endian()")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Lee Jones <lee@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Jason A. Donenfeld and committed by Linus Torvalds ca4582c2 52826d3b

Changed files
+8
drivers
mfd
+8
drivers/mfd/syscon.c
··· 66 66 goto err_map; 67 67 } 68 68 69 + /* Parse the device's DT node for an endianness specification */ 70 + if (of_property_read_bool(np, "big-endian")) 71 + syscon_config.val_format_endian = REGMAP_ENDIAN_BIG; 72 + else if (of_property_read_bool(np, "little-endian")) 73 + syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE; 74 + else if (of_property_read_bool(np, "native-endian")) 75 + syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE; 76 + 69 77 /* 70 78 * search for reg-io-width property in DT. If it is not provided, 71 79 * default to 4 bytes. regmap_init_mmio will return an error if values