2015-07-20 15:53:56

by Richard Fitzgerald

[permalink] [raw]
Subject: [PATCH RESEND] mfd: arizona: Specify regmap endianness

Explicitly set the regmap endianness instead of relying on
the default being correct.

Signed-off-by: Richard Fitzgerald <[email protected]>
---
drivers/mfd/wm5102-tables.c | 4 ++++
drivers/mfd/wm5110-tables.c | 4 ++++
drivers/mfd/wm8997-tables.c | 2 ++
drivers/mfd/wm8998-tables.c | 2 ++
4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
index aeae6ec..3981123 100644
--- a/drivers/mfd/wm5102-tables.c
+++ b/drivers/mfd/wm5102-tables.c
@@ -1969,6 +1969,8 @@ const struct regmap_config wm5102_spi_regmap = {
.reg_bits = 32,
.pad_bits = 16,
.val_bits = 16,
+ .reg_format_endian = REGMAP_ENDIAN_BIG,
+ .val_format_endian = REGMAP_ENDIAN_BIG,

.max_register = WM5102_MAX_REGISTER,
.readable_reg = wm5102_readable_register,
@@ -1983,6 +1985,8 @@ EXPORT_SYMBOL_GPL(wm5102_spi_regmap);
const struct regmap_config wm5102_i2c_regmap = {
.reg_bits = 32,
.val_bits = 16,
+ .reg_format_endian = REGMAP_ENDIAN_BIG,
+ .val_format_endian = REGMAP_ENDIAN_BIG,

.max_register = WM5102_MAX_REGISTER,
.readable_reg = wm5102_readable_register,
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
index 12cad94..e92b1c8 100644
--- a/drivers/mfd/wm5110-tables.c
+++ b/drivers/mfd/wm5110-tables.c
@@ -3007,6 +3007,8 @@ const struct regmap_config wm5110_spi_regmap = {
.reg_bits = 32,
.pad_bits = 16,
.val_bits = 16,
+ .reg_format_endian = REGMAP_ENDIAN_BIG,
+ .val_format_endian = REGMAP_ENDIAN_BIG,

.max_register = WM5110_MAX_REGISTER,
.readable_reg = wm5110_readable_register,
@@ -3021,6 +3023,8 @@ EXPORT_SYMBOL_GPL(wm5110_spi_regmap);
const struct regmap_config wm5110_i2c_regmap = {
.reg_bits = 32,
.val_bits = 16,
+ .reg_format_endian = REGMAP_ENDIAN_BIG,
+ .val_format_endian = REGMAP_ENDIAN_BIG,

.max_register = WM5110_MAX_REGISTER,
.readable_reg = wm5110_readable_register,
diff --git a/drivers/mfd/wm8997-tables.c b/drivers/mfd/wm8997-tables.c
index c0c25d75..01bb57b 100644
--- a/drivers/mfd/wm8997-tables.c
+++ b/drivers/mfd/wm8997-tables.c
@@ -1521,6 +1521,8 @@ static bool wm8997_volatile_register(struct device *dev, unsigned int reg)
const struct regmap_config wm8997_i2c_regmap = {
.reg_bits = 32,
.val_bits = 16,
+ .reg_format_endian = REGMAP_ENDIAN_BIG,
+ .val_format_endian = REGMAP_ENDIAN_BIG,

.max_register = WM8997_MAX_REGISTER,
.readable_reg = wm8997_readable_register,
diff --git a/drivers/mfd/wm8998-tables.c b/drivers/mfd/wm8998-tables.c
index 60e8622..e6de3cd 100644
--- a/drivers/mfd/wm8998-tables.c
+++ b/drivers/mfd/wm8998-tables.c
@@ -1580,6 +1580,8 @@ static bool wm8998_volatile_register(struct device *dev, unsigned int reg)
const struct regmap_config wm8998_i2c_regmap = {
.reg_bits = 32,
.val_bits = 16,
+ .reg_format_endian = REGMAP_ENDIAN_BIG,
+ .val_format_endian = REGMAP_ENDIAN_BIG,

.max_register = WM8998_MAX_REGISTER,
.readable_reg = wm8998_readable_register,
--
1.7.2.5


2015-07-23 15:18:44

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH RESEND] mfd: arizona: Specify regmap endianness

On Mon, 20 Jul 2015, Richard Fitzgerald wrote:

> Explicitly set the regmap endianness instead of relying on
> the default being correct.
>
> Signed-off-by: Richard Fitzgerald <[email protected]>
> ---
> drivers/mfd/wm5102-tables.c | 4 ++++
> drivers/mfd/wm5110-tables.c | 4 ++++
> drivers/mfd/wm8997-tables.c | 2 ++
> drivers/mfd/wm8998-tables.c | 2 ++
> 4 files changed, 12 insertions(+), 0 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
> index aeae6ec..3981123 100644
> --- a/drivers/mfd/wm5102-tables.c
> +++ b/drivers/mfd/wm5102-tables.c
> @@ -1969,6 +1969,8 @@ const struct regmap_config wm5102_spi_regmap = {
> .reg_bits = 32,
> .pad_bits = 16,
> .val_bits = 16,
> + .reg_format_endian = REGMAP_ENDIAN_BIG,
> + .val_format_endian = REGMAP_ENDIAN_BIG,
>
> .max_register = WM5102_MAX_REGISTER,
> .readable_reg = wm5102_readable_register,
> @@ -1983,6 +1985,8 @@ EXPORT_SYMBOL_GPL(wm5102_spi_regmap);
> const struct regmap_config wm5102_i2c_regmap = {
> .reg_bits = 32,
> .val_bits = 16,
> + .reg_format_endian = REGMAP_ENDIAN_BIG,
> + .val_format_endian = REGMAP_ENDIAN_BIG,
>
> .max_register = WM5102_MAX_REGISTER,
> .readable_reg = wm5102_readable_register,
> diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
> index 12cad94..e92b1c8 100644
> --- a/drivers/mfd/wm5110-tables.c
> +++ b/drivers/mfd/wm5110-tables.c
> @@ -3007,6 +3007,8 @@ const struct regmap_config wm5110_spi_regmap = {
> .reg_bits = 32,
> .pad_bits = 16,
> .val_bits = 16,
> + .reg_format_endian = REGMAP_ENDIAN_BIG,
> + .val_format_endian = REGMAP_ENDIAN_BIG,
>
> .max_register = WM5110_MAX_REGISTER,
> .readable_reg = wm5110_readable_register,
> @@ -3021,6 +3023,8 @@ EXPORT_SYMBOL_GPL(wm5110_spi_regmap);
> const struct regmap_config wm5110_i2c_regmap = {
> .reg_bits = 32,
> .val_bits = 16,
> + .reg_format_endian = REGMAP_ENDIAN_BIG,
> + .val_format_endian = REGMAP_ENDIAN_BIG,
>
> .max_register = WM5110_MAX_REGISTER,
> .readable_reg = wm5110_readable_register,
> diff --git a/drivers/mfd/wm8997-tables.c b/drivers/mfd/wm8997-tables.c
> index c0c25d75..01bb57b 100644
> --- a/drivers/mfd/wm8997-tables.c
> +++ b/drivers/mfd/wm8997-tables.c
> @@ -1521,6 +1521,8 @@ static bool wm8997_volatile_register(struct device *dev, unsigned int reg)
> const struct regmap_config wm8997_i2c_regmap = {
> .reg_bits = 32,
> .val_bits = 16,
> + .reg_format_endian = REGMAP_ENDIAN_BIG,
> + .val_format_endian = REGMAP_ENDIAN_BIG,
>
> .max_register = WM8997_MAX_REGISTER,
> .readable_reg = wm8997_readable_register,
> diff --git a/drivers/mfd/wm8998-tables.c b/drivers/mfd/wm8998-tables.c
> index 60e8622..e6de3cd 100644
> --- a/drivers/mfd/wm8998-tables.c
> +++ b/drivers/mfd/wm8998-tables.c
> @@ -1580,6 +1580,8 @@ static bool wm8998_volatile_register(struct device *dev, unsigned int reg)
> const struct regmap_config wm8998_i2c_regmap = {
> .reg_bits = 32,
> .val_bits = 16,
> + .reg_format_endian = REGMAP_ENDIAN_BIG,
> + .val_format_endian = REGMAP_ENDIAN_BIG,
>
> .max_register = WM8998_MAX_REGISTER,
> .readable_reg = wm8998_readable_register,

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog