regulator: mt6315: add regulator supplies
v2 cover regulator: mt6315: add regulator supplies
Hi,
This is v2 of the "Add MT6315 regulator supplies" series.
Changes since v1:
- Link to v1: https://lore.kernel.org/all/[email protected]/
- Move supplies to top level node, at the same level as the compatible
This series is part of a broader collection of regulator related cleanups for MediaTek Chromebooks. This one covers the MT6315 PMIC.
Patch 1 adds the names of the power supply inputs to the binding.
Patch 2 adds the supply names from the DT binding change in patch 1 to the regulator descriptions in the driver. This patch has a checkpatch.pl warnings, but I wonder if it's because the context size for checking complex macros is not large enough.
Device tree changes will be sent separately. The goal is to get the regulator tree as complete as possible. This includes adding supply names to other regulator DT bindings, and adding all the supply links to the existing DTs.
Please have a look.
Thanks
ChenYu
Chen-Yu Tsai (2):
regulator: dt-bindings: mt6315: Add regulator supplies
regulator: mt6315: Add regulator supplies
.../bindings/regulator/mt6315-regulator.yaml | 12 ++++++++++++ drivers/regulator/mt6315-regulator.c | 11 ++++++----- 2 files changed, 18 insertions(+), 5 deletions(-)
Signature · 1 line
2.53.0.1018.g2bb0e51243-goog
PATCH v2 1/2 regulator: dt-bindings: mt6315: Add regulator supplies
The MT6315 family of PMICs has 4 buck regulators. Each regulator has a separate supply.
Add these supplies to the device tree binding.
---
Changes since v1:
- Moved *-supply to top level, same level as compatible
--- .../bindings/regulator/mt6315-regulator.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml +12 -0
@@ -25,6 +25,15 @@ properties: reg: maxItems: 1 + pvdd1-supply: + description: Supply for regulator vbuck1 + pvdd2-supply: + description: Supply for regulator vbuck2 + pvdd3-supply: + description: Supply for regulator vbuck3 + pvdd4-supply: + description: Supply for regulator vbuck4 + regulators: type: object description: List of regulators and its properties
@@ -49,8 +58,11 @@ examples: pmic@6 { compatible = "mediatek,mt6315-regulator"; reg = <0x6 0>; + pvdd1-supply = <&pp4200_z2>; + pvdd3-supply = <&pp4200_z2>; regulators { + vbuck1 { regulator-min-microvolt = <300000>; regulator-max-microvolt = <1193750>;
Signature · 1 line
2.53.0.1018.g2bb0e51243-goog
Re: [PATCH v2 1/2] regulator: dt-bindings: mt6315: Add regulator supplies
pw-bot: not-applicable
PATCH v2 2/2 regulator: mt6315: Add regulator supplies
In reply to Chen-Yu TsaiThe MT6315 family of PMICs has 4 buck regulators. Each regulator has a separate supply.
Add these supplies to the driver.
--- drivers/regulator/mt6315-regulator.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/regulator/mt6315-regulator.c +6 -5
@@ -31,10 +31,11 @@ struct mt6315_chip {struct regmap *regmap; }; -#define MT_BUCK (_name, _bid, _vsel) \ +#define MT_BUCK (_name, _bid, _supply, _vsel) \ [_bid] = { \ .desc = { \ .name = _name, \ + .supply_name = _supply, \ .of_match = of_match_ptr(_name), \ .regulators_node = "regulators", \ .ops = &mt6315_volt_range_ops, \
@@ -190,10 +191,10 @@ static const struct regulator_ops mt6315_volt_range_ops = { };static const struct mt6315_regulator_info mt6315_regulators[MT6315_VBUCK_MAX ] = { -MT_BUCK ("vbuck1" ,MT6315_VBUCK1 ,MT6315_BUCK_TOP_ELR0 ), -MT_BUCK ("vbuck2" ,MT6315_VBUCK2 ,MT6315_BUCK_TOP_ELR2 ), -MT_BUCK ("vbuck3" ,MT6315_VBUCK3 ,MT6315_BUCK_TOP_ELR4 ), -MT_BUCK ("vbuck4" ,MT6315_VBUCK4 ,MT6315_BUCK_TOP_ELR6 ), +MT_BUCK ("vbuck1" ,MT6315_VBUCK1 ,"pvdd1" ,MT6315_BUCK_TOP_ELR0 ), +MT_BUCK ("vbuck2" ,MT6315_VBUCK2 ,"pvdd2" ,MT6315_BUCK_TOP_ELR2 ), +MT_BUCK ("vbuck3" ,MT6315_VBUCK3 ,"pvdd3" ,MT6315_BUCK_TOP_ELR4 ), +MT_BUCK ("vbuck4" ,MT6315_VBUCK4 ,"pvdd4" ,MT6315_BUCK_TOP_ELR6 ), };static const struct regmap_config mt6315_regmap_config = {
Signature · 1 line
2.53.0.1018.g2bb0e51243-goog
Mark Brown
maintainerQuoted 11 lines · Chen-Yu Tsai
regulator: mt6315: add regulator supplies
Hi,
This is v2 of the "Add MT6315 regulator supplies" series.
Changes since v1:
- Link to v1: https://lore.kernel.org/all/[email protected]/
- Move supplies to top level node, at the same level as the compatible[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-7.1
Thanks!
[1/2] regulator: dt-bindings: mt6315: Add regulator supplies
https://git.kernel.org/broonie/regulator/c/d15d0f1a27b2 [2/2] regulator: mt6315: Add regulator supplies https://git.kernel.org/broonie/regulator/c/292d64fb98a2
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