2021-06-06 06:54:27

by Axel Lin

[permalink] [raw]
Subject: [PATCH 1/3] regulator: mt6358: Use unsigned int for volt_tables

The regulator_desc expects "const unsigned int *volt_table", thus use
unsigned int instead of u32.

Signed-off-by: Axel Lin <[email protected]>
---
drivers/regulator/mt6358-regulator.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c
index 13cb6ac9a892..7c68d27d52bb 100644
--- a/drivers/regulator/mt6358-regulator.c
+++ b/drivers/regulator/mt6358-regulator.c
@@ -153,50 +153,50 @@ static const struct linear_range buck_volt_range4[] = {
REGULATOR_LINEAR_RANGE(1000000, 0, 0x7f, 12500),
};

-static const u32 vdram2_voltages[] = {
+static const unsigned int vdram2_voltages[] = {
600000, 1800000,
};

-static const u32 vsim_voltages[] = {
+static const unsigned int vsim_voltages[] = {
1700000, 1800000, 2700000, 3000000, 3100000,
};

-static const u32 vibr_voltages[] = {
+static const unsigned int vibr_voltages[] = {
1200000, 1300000, 1500000, 1800000,
2000000, 2800000, 3000000, 3300000,
};

-static const u32 vusb_voltages[] = {
+static const unsigned int vusb_voltages[] = {
3000000, 3100000,
};

-static const u32 vcamd_voltages[] = {
+static const unsigned int vcamd_voltages[] = {
900000, 1000000, 1100000, 1200000,
1300000, 1500000, 1800000,
};

-static const u32 vefuse_voltages[] = {
+static const unsigned int vefuse_voltages[] = {
1700000, 1800000, 1900000,
};

-static const u32 vmch_vemc_voltages[] = {
+static const unsigned int vmch_vemc_voltages[] = {
2900000, 3000000, 3300000,
};

-static const u32 vcama_voltages[] = {
+static const unsigned int vcama_voltages[] = {
1800000, 2500000, 2700000,
2800000, 2900000, 3000000,
};

-static const u32 vcn33_bt_wifi_voltages[] = {
+static const unsigned int vcn33_bt_wifi_voltages[] = {
3300000, 3400000, 3500000,
};

-static const u32 vmc_voltages[] = {
+static const unsigned int vmc_voltages[] = {
1800000, 2900000, 3000000, 3300000,
};

-static const u32 vldo28_voltages[] = {
+static const unsigned int vldo28_voltages[] = {
2800000, 3000000,
};

--
2.25.1


2021-06-06 06:56:18

by Axel Lin

[permalink] [raw]
Subject: [PATCH 2/3] regulator: mt6359: Use unsigned int for volt_tables

The regulator_desc expects "const unsigned int *volt_table", thus use
unsigned int instead of u32.

Signed-off-by: Axel Lin <[email protected]>
---
drivers/regulator/mt6359-regulator.c | 36 ++++++++++++++--------------
1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/regulator/mt6359-regulator.c b/drivers/regulator/mt6359-regulator.c
index 4f517c9fd6c4..8003c363cdfd 100644
--- a/drivers/regulator/mt6359-regulator.c
+++ b/drivers/regulator/mt6359-regulator.c
@@ -203,77 +203,77 @@ static const struct linear_range mt_volt_range8[] = {
REGULATOR_LINEAR_RANGE(506250, 0, 0x7f, 6250),
};

-static const u32 vsim1_voltages[] = {
+static const unsigned int vsim1_voltages[] = {
0, 0, 0, 1700000, 1800000, 0, 0, 0, 2700000, 0, 0, 3000000, 3100000,
};

-static const u32 vibr_voltages[] = {
+static const unsigned int vibr_voltages[] = {
1200000, 1300000, 1500000, 0, 1800000, 2000000, 0, 0, 2700000, 2800000,
0, 3000000, 0, 3300000,
};

-static const u32 vrf12_voltages[] = {
+static const unsigned int vrf12_voltages[] = {
0, 0, 1100000, 1200000, 1300000,
};

-static const u32 volt18_voltages[] = {
+static const unsigned int volt18_voltages[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1700000, 1800000, 1900000,
};

-static const u32 vcn13_voltages[] = {
+static const unsigned int vcn13_voltages[] = {
900000, 1000000, 0, 1200000, 1300000,
};

-static const u32 vcn33_voltages[] = {
+static const unsigned int vcn33_voltages[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 2800000, 0, 0, 0, 3300000, 3400000, 3500000,
};

-static const u32 vefuse_voltages[] = {
+static const unsigned int vefuse_voltages[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1700000, 1800000, 1900000, 2000000,
};

-static const u32 vxo22_voltages[] = {
+static const unsigned int vxo22_voltages[] = {
1800000, 0, 0, 0, 2200000,
};

-static const u32 vrfck_voltages[] = {
+static const unsigned int vrfck_voltages[] = {
0, 0, 1500000, 0, 0, 0, 0, 1600000, 0, 0, 0, 0, 1700000,
};

-static const u32 vrfck_voltages_1[] = {
+static const unsigned int vrfck_voltages_1[] = {
1240000, 1600000,
};

-static const u32 vio28_voltages[] = {
+static const unsigned int vio28_voltages[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 2800000, 2900000, 3000000, 3100000, 3300000,
};

-static const u32 vemc_voltages[] = {
+static const unsigned int vemc_voltages[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2900000, 3000000, 0, 3300000,
};

-static const u32 vemc_voltages_1[] = {
+static const unsigned int vemc_voltages_1[] = {
0, 0, 0, 0, 0, 0, 0, 0, 2500000, 2800000, 2900000, 3000000, 3100000,
3300000,
};

-static const u32 va12_voltages[] = {
+static const unsigned int va12_voltages[] = {
0, 0, 0, 0, 0, 0, 1200000, 1300000,
};

-static const u32 va09_voltages[] = {
+static const unsigned int va09_voltages[] = {
0, 0, 800000, 900000, 0, 0, 1200000,
};

-static const u32 vrf18_voltages[] = {
+static const unsigned int vrf18_voltages[] = {
0, 0, 0, 0, 0, 1700000, 1800000, 1810000,
};

-static const u32 vbbck_voltages[] = {
+static const unsigned int vbbck_voltages[] = {
0, 0, 0, 0, 1100000, 0, 0, 0, 1150000, 0, 0, 0, 1200000,
};

-static const u32 vsim2_voltages[] = {
+static const unsigned int vsim2_voltages[] = {
0, 0, 0, 1700000, 1800000, 0, 0, 0, 2700000, 0, 0, 3000000, 3100000,
};

--
2.25.1

2021-06-07 19:03:11

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/3] regulator: mt6358: Use unsigned int for volt_tables

On Sun, 6 Jun 2021 14:50:50 +0800, Axel Lin wrote:
> The regulator_desc expects "const unsigned int *volt_table", thus use
> unsigned int instead of u32.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/3] regulator: mt6358: Use unsigned int for volt_tables
commit: 431ea63b647fb35a0ff7f40f19c2bbd22abeb564
[2/3] regulator: mt6359: Use unsigned int for volt_tables
commit: 5a5e31150c9ecdb76d3f87ed852f5c650d70c7d2
[3/3] regulator: mt6359: Get rid of linear_range tables
commit: 73d4ae57f82ec1e5fc92b9acd25bb1db2f8cf8e3

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark