regulator: mt6311: Add support for MT6311 regulator
PATCH v4 1/1 regulator: mt6311: Add support for MT6311 regulator
This patch set adds support for the MediaTek PMIC mt6311 regulator driver,
which adds mt6311 related buck/ldo voltage data to the driver, and
creates the regulator_desc table.
Changes in v4:
- Removed the unnscessary check before return on mt6311_i2c_probe().
- Change the label on mt6311-regulator.txt.
Changes in v3:
- Removed the struct mt6311 since the members of mt6311 were not be necessary.
Changes in v2:
- Re-ordered the sequence of makefile and Kconfig.
- Specifying the regulator DT bindings by providing of_match and regulators_node in the regulator_desc and delete the DT handling code.
Henry Chen (2):
dt-bindings: regulator: mt6311: Add document for mt6311 regulator
regulator: mt6311: Add support for mt6311 regulator
.../bindings/regulator/mt6311-regulator.txt | 35 ++++ drivers/regulator/Kconfig | 9 ++ drivers/regulator/Makefile | 1 + drivers/regulator/mt6311-regulator.c | 180 +++++++++++++++++++++ drivers/regulator/mt6311-regulator.h | 65 ++++++++ include/linux/regulator/mt6311.h | 29 ++++ 6 files changed, 319 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mt6311-regulator.txt create mode 100644 drivers/regulator/mt6311-regulator.c create mode 100644 drivers/regulator/mt6311-regulator.h create mode 100644 include/linux/regulator/mt6311.h
Signature · 1 line
1.8.1.1.dirty
PATCH v4 1/2 dt-bindings: regulator: mt6311: Add document for mt6311 regulator
This patch adds a list of supported regulator names to the devicetree binding documentation for Mediatek MT6311 PMIC.
--- .../bindings/regulator/mt6311-regulator.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mt6311-regulator.txt
Documentation/devicetree/bindings/regulator/mt6311-regulator.txt new file +35 -0
@@ -0,0 +1,35 @@ +Mediatek MT6311 Regulator Driver + +Required properties: +- compatible: "mediatek,mt6311-regulator" +- reg: I2C slave address, usually 0x6b. +- regulators: List of regulators provided by this controller. It is named + to VDVFS and VBIASN. + The definition for each of these nodes is defined using the standard binding + for regulators at Documentation/devicetree/bindings/regulator/regulator.txt. + +The valid names for regulators are: +BUCK: + VDVFS +LDO: + VBIASN + +Example: + mt6311: pmic at 6b { + compatible = "mediatek,mt6311-regulator"; + reg = <0x6b>; + + regulators { + mt6311_vcpu_reg: VDVFS { + regulator-name = "VDVFS"; + regulator-min-microvolt = < 600000>; + regulator-max-microvolt = <1400000>; + regulator-ramp-delay = <10000>; + }; + mt6311_ldo_reg: VBIASN { + regulator-name = "VBIASN"; + regulator-min-microvolt = <200000>; + regulator-max-microvolt = <800000>; + }; + }; + };
Signature · 1 line
1.8.1.1.dirty
PATCH v4 2/2 regulator: mt6311: Add support for mt6311 regulator
In reply to Henry ChenAdd regulator support for mt6311.
It has 2 regulaotrs - Buck and LDO, provide the related buck/ldo voltage data to the driver, and creates the regulator_desc table. Supported operations for Buck are enabled/disabled and voltage change, only enabled/disabled for LDO.
--- drivers/regulator/Kconfig | 9 ++ drivers/regulator/Makefile | 1 + drivers/regulator/mt6311-regulator.c | 180 +++++++++++++++++++++++++++++++++++ drivers/regulator/mt6311-regulator.h | 65 +++++++++++++ include/linux/regulator/mt6311.h | 29 ++++++ 5 files changed, 284 insertions(+) create mode 100644 drivers/regulator/mt6311-regulator.c create mode 100644 drivers/regulator/mt6311-regulator.h create mode 100644 include/linux/regulator/mt6311.h
drivers/regulator/Kconfig +9 -0
@@ -451,6 +451,15 @@ config REGULATOR_MC13892 Say y here to support the regulators found on the Freescale MC13892 PMIC. +config REGULATOR_MT6311 + tristate "MediaTek MT6311 PMIC" + depends on I2C + help + Say y here to select this option to enable the power regulator of + MediaTek MT6311 PMIC. + This driver supports the control of different power rails of device + through regulator interface. + config REGULATOR_MT6397 tristate "MediaTek MT6397 PMIC" depends on MFD_MT6397
drivers/regulator/Makefile +1 -0
@@ -60,6 +60,7 @@ obj-$(CONFIG_REGULATOR_MAX77843) += max77843.o obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o +obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o obj-$(CONFIG_REGULATOR_MT6397) += mt6397-regulator.o obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o obj-$(CONFIG_REGULATOR_QCOM_SPMI) += qcom_spmi-regulator.o
drivers/regulator/mt6311-regulator.c new file +180 -0
180 lines not on this page · raw message
drivers/regulator/mt6311-regulator.h new file +65 -0
65 lines not on this page · raw message
include/linux/regulator/mt6311.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright (c) 2015 MediaTek Inc. +* Author: Henry Chen <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef __LINUX_REGULATOR_MT6311_H +#define __LINUX_REGULATOR_MT6311_H + +#define MT6311_MAX_REGULATORS 2 + +enum { +MT6311_ID_VDVFS =0 , +MT6311_ID_VBIASN , +}; + +#define MT6311_E1_CID_CODE 0x10 +#define MT6311_E2_CID_CODE 0x20 +#define MT6311_E3_CID_CODE 0x30 + +#endif /* __LINUX_REGULATOR_MT6311_H */
Signature · 1 line
1.8.1.1.dirty
Re: [PATCH v4 1/2] dt-bindings: regulator: mt6311: Add document for mt6311 regulator
In reply to Henry ChenHello Henry,
I believe Mark asked you to use a subject lines reflecting the style for the subsystem, so the subject should had been something like:
regulators: mt6311: Add DT binding document
Quoted 5 lines · Henry Chen
This patch adds a list of supported regulator names to the devicetree binding documentation for Mediatek MT6311 PMIC.
Signed-off-by Henry Chen <[email protected]>---
I know is in your cover letter, but usually is good to also include a history log of the changes for each patch so people know what changed. Everything between the '---' and the diff are omitted by tools like git am so you can add there. You can use tools like patman that do this automatically for you.
Also, I said that you could add my Reviewed-by after the node name change so you should had carried that. So again:
Best regards,
Javier
Re: [PATCH v4 2/2] regulator: mt6311: Add support for mt6311 regulator
In reply to Henry ChenHello Henry,
Quoted 8 lines · Henry Chen
Add regulator support for mt6311.
It has 2 regulaotrs - Buck and LDO, provide the related buck/ldo voltage data to the driver, and creates theregulator_desctable. Supported operations for Buck are enabled/disabled and voltage change, only enabled/disabled for LDO.Signed-off-by Henry Chen <[email protected]>---
Looks good to me now.
Best regards,
Javier
Mark Brown
maintainerApplied "regulator: mt6311: Add document for mt6311 regulator" to the regulator tree
In reply to Henry ChenThe patch
regulator: mt6311: Add document for mt6311 regulator
has been applied to the regulator tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
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
Quoted 1 line
From
678cdb2fbd7e44b8905a8f4e770c694eb77f0395Mon Sep 17 00:00:00 2001
From: Henry Chen <[email protected]>
Date: Fri, 24 Jul 2015 13:24:40 +0800
Subject: [PATCH] regulator: mt6311: Add document for mt6311 regulator
This patch adds a list of supported regulator names to the devicetree binding documentation for Mediatek MT6311 PMIC.
--- .../bindings/regulator/mt6311-regulator.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mt6311-regulator.txt
Documentation/devicetree/bindings/regulator/mt6311-regulator.txt new file +35 -0
@@ -0,0 +1,35 @@ +Mediatek MT6311 Regulator Driver + +Required properties: +- compatible: "mediatek,mt6311-regulator" +- reg: I2C slave address, usually 0x6b. +- regulators: List of regulators provided by this controller. It is named + to VDVFS and VBIASN. + The definition for each of these nodes is defined using the standard binding + for regulators at Documentation/devicetree/bindings/regulator/regulator.txt. + +The valid names for regulators are: +BUCK: + VDVFS +LDO: + VBIASN + +Example: + mt6311: pmic@6b { + compatible = "mediatek,mt6311-regulator"; + reg = <0x6b>; + + regulators { + mt6311_vcpu_reg: VDVFS { + regulator-name = "VDVFS"; + regulator-min-microvolt = < 600000>; + regulator-max-microvolt = <1400000>; + regulator-ramp-delay = <10000>; + }; + mt6311_ldo_reg: VBIASN { + regulator-name = "VBIASN"; + regulator-min-microvolt = <200000>; + regulator-max-microvolt = <800000>; + }; + }; + };
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "regulator: mt6311: Add support for mt6311 regulator" to the regulator tree
In reply to Henry ChenThe patch
regulator: mt6311: Add support for mt6311 regulator
has been applied to the regulator tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
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
Quoted 1 line
From
8766018b6ef73ca124d13b0d0a06dec906726cc8Mon Sep 17 00:00:00 2001
From: Henry Chen <[email protected]>
Date: Fri, 24 Jul 2015 13:24:41 +0800
Subject: [PATCH] regulator: mt6311: Add support for mt6311 regulator
Add regulator support for mt6311.
It has 2 regulaotrs - Buck and LDO, provide the related buck/ldo voltage data to the driver, and creates the regulator_desc table. Supported operations for Buck are enabled/disabled and voltage change, only enabled/disabled for LDO.
--- drivers/regulator/Kconfig | 9 ++ drivers/regulator/Makefile | 1 + drivers/regulator/mt6311-regulator.c | 180 +++++++++++++++++++++++++++++++++++ drivers/regulator/mt6311-regulator.h | 65 +++++++++++++ include/linux/regulator/mt6311.h | 29 ++++++ 5 files changed, 284 insertions(+) create mode 100644 drivers/regulator/mt6311-regulator.c create mode 100644 drivers/regulator/mt6311-regulator.h create mode 100644 include/linux/regulator/mt6311.h
drivers/regulator/Kconfig +9 -0
@@ -451,6 +451,15 @@ config REGULATOR_MC13892 Say y here to support the regulators found on the Freescale MC13892 PMIC. +config REGULATOR_MT6311 + tristate "MediaTek MT6311 PMIC" + depends on I2C + help + Say y here to select this option to enable the power regulator of + MediaTek MT6311 PMIC. + This driver supports the control of different power rails of device + through regulator interface. + config REGULATOR_MT6397 tristate "MediaTek MT6397 PMIC" depends on MFD_MT6397
drivers/regulator/Makefile +1 -0
@@ -60,6 +60,7 @@ obj-$(CONFIG_REGULATOR_MAX77843) += max77843.o obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o +obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o obj-$(CONFIG_REGULATOR_MT6397) += mt6397-regulator.o obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o obj-$(CONFIG_REGULATOR_QCOM_SPMI) += qcom_spmi-regulator.o
drivers/regulator/mt6311-regulator.c new file +180 -0
180 lines not on this page · raw message
drivers/regulator/mt6311-regulator.h new file +65 -0
65 lines not on this page · raw message
include/linux/regulator/mt6311.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright (c) 2015 MediaTek Inc. +* Author: Henry Chen <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef __LINUX_REGULATOR_MT6311_H +#define __LINUX_REGULATOR_MT6311_H + +#define MT6311_MAX_REGULATORS 2 + +enum { +MT6311_ID_VDVFS =0 , +MT6311_ID_VBIASN , +}; + +#define MT6311_E1_CID_CODE 0x10 +#define MT6311_E2_CID_CODE 0x20 +#define MT6311_E3_CID_CODE 0x30 + +#endif /* __LINUX_REGULATOR_MT6311_H */
Signature · 1 line
2.1.4
Re: [PATCH v4 1/2] dt-bindings: regulator: mt6311: Add document for mt6311 regulator
In reply to Javier Martinez CanillasHi Javier,
Quoted 11 lines · Javier Martinez Canillas
Hello Henry,
I believe Mark asked you to use a subject lines reflecting the style for the subsystem, so the subject should had been something like:
regulators: mt6311: Add DT binding document
Quoted 3 lines · Henry Chen
This patch adds a list of supported regulator names to the devicetree binding documentation for Mediatek MT6311 PMIC.
Quoted 9 lines
Quoted 2 lines
Signed-off-by Henry Chen <[email protected]>---
I know is in your cover letter, but usually is good to also include a history log of the changes for each patch so people know what changed. Everything between the '---' and the diff are omitted by tools like git am so you can add there. You can use tools like patman that do this automatically for you.
Ok, got it, I will follow that.
Quoted 2 lines
Also, I said that you could add my Reviewed-by after the node name change so you should had carried that. So again:
Sorry, did you mean I need to resent again?
Thanks for advise.
Henry
Quoted 4 lines
Reviewed-by Javier Martinez Canillas <[email protected]>Best regards,
Javier
Re: [PATCH v4 1/2] dt-bindings: regulator: mt6311: Add document for mt6311 regulator
Hello Henry,
Quoted 23 lines · Henry Chen
Hi Javier,
Quoted 11 lines · Javier Martinez Canillas
Hello Henry,
I believe Mark asked you to use a subject lines reflecting the style for the subsystem, so the subject should had been something like:
regulators: mt6311: Add DT binding document
Quoted 3 lines · Henry Chen
This patch adds a list of supported regulator names to the devicetree binding documentation for Mediatek MT6311 PMIC.
Quoted 9 lines
Quoted 2 lines
Signed-off-by Henry Chen <[email protected]>---
I know is in your cover letter, but usually is good to also include a history log of the changes for each patch so people know what changed. Everything between the '---' and the diff are omitted by tools like git am so you can add there. You can use tools like patman that do this automatically for you.
Quoted 7 lines
Ok, got it, I will follow that.
Quoted 2 lines
Also, I said that you could add my Reviewed-by after the node name change so you should had carried that. So again:
Sorry, did you mean I need to resent again?
Sorry for not being clear. No, it's not necessary to resend. I just mentioned for the next time.
Quoted 3 lines
Thanks for advise.
Henry
Best regards,
Javier