diff mbox

[3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings

Message ID 1449191405-3344-4-git-send-email-k.kozlowski@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Krzysztof Kozlowski Dec. 4, 2015, 1:10 a.m. UTC
The mfd/s2mpa01.txt duplicates some of the information about bindings
with old mfd/s2mps11.txt. Now common part exists entirely in
mfd/samsung,sec-core.txt so:
 - add company prefix to file name (regulator/samsung,s2mpa01.txt),
 - remove duplicated information,
 - reorganize the contents to match style of
   regulator/samsung,s2mps11.txt.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 Documentation/devicetree/bindings/mfd/s2mpa01.txt  | 90 ----------------------
 .../devicetree/bindings/mfd/samsung,sec-core.txt   |  4 +-
 .../bindings/regulator/samsung,s2mpa01.txt         | 79 +++++++++++++++++++
 3 files changed, 82 insertions(+), 91 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt

Comments

Mark Brown Dec. 4, 2015, 12:11 p.m. UTC | #1
On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
> The mfd/s2mpa01.txt duplicates some of the information about bindings
> with old mfd/s2mps11.txt. Now common part exists entirely in
> mfd/samsung,sec-core.txt so:

Acked-by: Mark Brown <broonie@kernel.org>

>  - add company prefix to file name (regulator/samsung,s2mpa01.txt),

I'm not 100% convinced about these prefixes BTW, the duplication isn't
usually an issue within a subsystem.  They don't do any harm either
though.
Rob Herring (Arm) Dec. 4, 2015, 3:55 p.m. UTC | #2
On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
> The mfd/s2mpa01.txt duplicates some of the information about bindings
> with old mfd/s2mps11.txt. Now common part exists entirely in
> mfd/samsung,sec-core.txt so:
>  - add company prefix to file name (regulator/samsung,s2mpa01.txt),
>  - remove duplicated information,
>  - reorganize the contents to match style of
>    regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Next time, use git format-patch -M option.

Acked-by: Rob Herring <robh@kernel.org>

> ---
>  Documentation/devicetree/bindings/mfd/s2mpa01.txt  | 90 ----------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  4 +-
>  .../bindings/regulator/samsung,s2mpa01.txt         | 79 +++++++++++++++++++
>  3 files changed, 82 insertions(+), 91 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> deleted file mode 100644
> index c13d3d8c3947..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> +++ /dev/null
> @@ -1,90 +0,0 @@
> -
> -* Samsung S2MPA01 Voltage and Current Regulator
> -
> -The Samsung S2MPA01 is a multi-function device which includes high
> -efficiency buck converters including Dual-Phase buck converter, various LDOs,
> -and an RTC. It is interfaced to the host controller using an I2C interface.
> -Each sub-block is addressed by the host system using different I2C slave
> -addresses.
> -
> -Required properties:
> -- compatible: Should be "samsung,s2mpa01-pmic".
> -- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s2mpa01 are delivered to.
> -- interrupts: An interrupt specifier for the sole interrupt generated by the
> -  device.
> -
> -Optional nodes:
> -- regulators: The regulators of s2mpa01 that have to be instantiated should be
> -  included in a sub-node named 'regulators'. Regulator nodes and constraints
> -  included in this sub-node use the standard regulator bindings which are
> -  documented elsewhere.
> -
> -Properties for BUCK regulator nodes:
> -- regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
> -  (default), 25000, or 50000. May be 0 for disabling the ramp delay on
> -  BUCK{1,2,3,4}.
> -
> - In the absence of the regulator-ramp-delay property, the default ramp
> - delay will be used.
> -
> -  NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set
> -  for a particular group of BUCKs. So provide same regulator-ramp-delay=<value>.
> -
> -  The following BUCKs share ramp settings:
> -  * 1 and 6
> -  * 2 and 4
> -  * 8, 9, and 10
> -
> -The following are the names of the regulators that the s2mpa01 PMIC block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s2mpa01.
> -
> -	- LDOn
> -		  - valid values for n are 1 to 26
> -		  - Example: LDO1, LD02, LDO26
> -	- BUCKn
> -		  - valid values for n are 1 to 10.
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -Example:
> -
> -	s2mpa01_pmic@66 {
> -		compatible = "samsung,s2mpa01-pmic";
> -		reg = <0x66>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ALIVE";
> -				regulator-min-microvolt = <1000000>;
> -				regulator-max-microvolt = <1000000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDDQ_MMC2";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> index 4aeb95c82304..cdd079bfc287 100644
> --- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -4,7 +4,7 @@ Binding for Samsung S2M and S5M family multi-function device
>  This is a part of device tree bindings for S2M and S5M family multi-function
>  devices.
>  
> -The Samsung S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family
> +The Samsung S2MPA01, S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family
>  of multi-function devices which include voltage and current regulators, RTC,
>  charger controller, clock outputs and other sub-blocks. It is interfaced
>  to the host controller using an I2C interface. Each sub-block is usually
> @@ -13,6 +13,7 @@ addressed by the host system using different I2C slave addresses.
>  
>  This document describes bindings for main device node. Optional sub-blocks
>  must be a sub-nodes to it. Bindings for them can be found in:
> + - bindings/regulator/samsung,s2mpa01.txt
>   - bindings/regulator/samsung,s2mps11.txt
>   - bindings/regulator/samsung,s5m8767.txt
>   - bindings/clock/samsung,s2mps11.txt
> @@ -20,6 +21,7 @@ must be a sub-nodes to it. Bindings for them can be found in:
>  
>  Required properties:
>   - compatible: Should be one of the following
> +	- "samsung,s2mpa01-pmic",
>  	- "samsung,s2mps11-pmic",
>  	- "samsung,s2mps13-pmic",
>  	- "samsung,s2mps14-pmic",
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> new file mode 100644
> index 000000000000..bae3c7f838cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> @@ -0,0 +1,79 @@
> +Binding for Samsung S2MPA01 regulator block
> +===========================================
> +
> +This is a part of device tree bindings for S2M family multi-function devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S2MPA01 device provide buck and LDO regulators.
> +
> +To register these with regulator framework instantiate under main device node
> +a sub-node named "regulators" with more sub-nodes for each regulator using the
> +common regulator binding documented in:
> + - Documentation/devicetree/bindings/regulator/regulator.txt
> +
> +
> +Names of regulators supported by S2MPA01 device:
> +	- LDOn
> +		  - valid values for n are 1 to 26
> +		  - Example: LDO1, LD02, LDO26
> +	- BUCKn
> +		  - valid values for n are 1 to 10.
> +		  - Example: BUCK1, BUCK2, BUCK9
> +Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> +as per the datasheet of device.
> +
> +
> +Optional properties of buck regulator nodes under "regulators" sub-node:
> + - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
> +   (default), 25000, or 50000. May be 0 for disabling the ramp delay on
> +   BUCK{1,2,3,4}.
> +
> +   In the absence of the regulator-ramp-delay property, the default ramp
> +   delay will be used.
> +
> +   Note: Some bucks share the ramp rate setting i.e. same ramp value
> +   will be set for a particular group of bucks so provide the same
> +   regulator-ramp-delay value for them.
> +   Groups sharing ramp rate:
> +    - buck{1,6},
> +    - buck{2,4},
> +    - buck{8,9,10}.
> +
> +Example:
> +
> +	s2mpa01_pmic@66 {
> +		compatible = "samsung,s2mpa01-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ALIVE";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDDQ_MMC2";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Krzysztof Kozlowski Dec. 7, 2015, 1:05 a.m. UTC | #3
On 05.12.2015 00:55, Rob Herring wrote:
> On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
>> The mfd/s2mpa01.txt duplicates some of the information about bindings
>> with old mfd/s2mps11.txt. Now common part exists entirely in
>> mfd/samsung,sec-core.txt so:
>>  - add company prefix to file name (regulator/samsung,s2mpa01.txt),
>>  - remove duplicated information,
>>  - reorganize the contents to match style of
>>    regulator/samsung,s2mps11.txt.
>>
>> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
> Next time, use git format-patch -M option.
> 
> Acked-by: Rob Herring <robh@kernel.org>
> 

It is already used but I also changed the style and formatting to the
similarity dropped below default level of 50%. I could of course first
rename and then change formatting/contents but that would be a little
bit too much for this simple patchset, don't you think?

Anyway thanks for acks!

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Krzysztof Kozlowski Dec. 7, 2015, 1:07 a.m. UTC | #4
On 04.12.2015 21:11, Mark Brown wrote:
> On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
>> The mfd/s2mpa01.txt duplicates some of the information about bindings
>> with old mfd/s2mps11.txt. Now common part exists entirely in
>> mfd/samsung,sec-core.txt so:
> 
> Acked-by: Mark Brown <broonie@kernel.org>
> 
>>  - add company prefix to file name (regulator/samsung,s2mpa01.txt),
> 
> I'm not 100% convinced about these prefixes BTW, the duplication isn't
> usually an issue within a subsystem.  They don't do any harm either
> though.
> 

I am not convinced neither... Some of newer documents use prefixes so I
had an impression that this is a more organized way. If there are
objections I can drop it.

Thanks for ack!

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lee Jones Dec. 7, 2015, 9:37 a.m. UTC | #5
On Fri, 04 Dec 2015, Krzysztof Kozlowski wrote:

> The mfd/s2mpa01.txt duplicates some of the information about bindings
> with old mfd/s2mps11.txt. Now common part exists entirely in
> mfd/samsung,sec-core.txt so:
>  - add company prefix to file name (regulator/samsung,s2mpa01.txt),
>  - remove duplicated information,
>  - reorganize the contents to match style of
>    regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  Documentation/devicetree/bindings/mfd/s2mpa01.txt  | 90 ----------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  4 +-

Acked-by: Lee Jones <lee.jones@linaro.org>

>  .../bindings/regulator/samsung,s2mpa01.txt         | 79 +++++++++++++++++++
>  3 files changed, 82 insertions(+), 91 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> deleted file mode 100644
> index c13d3d8c3947..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> +++ /dev/null
> @@ -1,90 +0,0 @@
> -
> -* Samsung S2MPA01 Voltage and Current Regulator
> -
> -The Samsung S2MPA01 is a multi-function device which includes high
> -efficiency buck converters including Dual-Phase buck converter, various LDOs,
> -and an RTC. It is interfaced to the host controller using an I2C interface.
> -Each sub-block is addressed by the host system using different I2C slave
> -addresses.
> -
> -Required properties:
> -- compatible: Should be "samsung,s2mpa01-pmic".
> -- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s2mpa01 are delivered to.
> -- interrupts: An interrupt specifier for the sole interrupt generated by the
> -  device.
> -
> -Optional nodes:
> -- regulators: The regulators of s2mpa01 that have to be instantiated should be
> -  included in a sub-node named 'regulators'. Regulator nodes and constraints
> -  included in this sub-node use the standard regulator bindings which are
> -  documented elsewhere.
> -
> -Properties for BUCK regulator nodes:
> -- regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
> -  (default), 25000, or 50000. May be 0 for disabling the ramp delay on
> -  BUCK{1,2,3,4}.
> -
> - In the absence of the regulator-ramp-delay property, the default ramp
> - delay will be used.
> -
> -  NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set
> -  for a particular group of BUCKs. So provide same regulator-ramp-delay=<value>.
> -
> -  The following BUCKs share ramp settings:
> -  * 1 and 6
> -  * 2 and 4
> -  * 8, 9, and 10
> -
> -The following are the names of the regulators that the s2mpa01 PMIC block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s2mpa01.
> -
> -	- LDOn
> -		  - valid values for n are 1 to 26
> -		  - Example: LDO1, LD02, LDO26
> -	- BUCKn
> -		  - valid values for n are 1 to 10.
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -Example:
> -
> -	s2mpa01_pmic@66 {
> -		compatible = "samsung,s2mpa01-pmic";
> -		reg = <0x66>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ALIVE";
> -				regulator-min-microvolt = <1000000>;
> -				regulator-max-microvolt = <1000000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDDQ_MMC2";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> index 4aeb95c82304..cdd079bfc287 100644
> --- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -4,7 +4,7 @@ Binding for Samsung S2M and S5M family multi-function device
>  This is a part of device tree bindings for S2M and S5M family multi-function
>  devices.
>  
> -The Samsung S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family
> +The Samsung S2MPA01, S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family
>  of multi-function devices which include voltage and current regulators, RTC,
>  charger controller, clock outputs and other sub-blocks. It is interfaced
>  to the host controller using an I2C interface. Each sub-block is usually
> @@ -13,6 +13,7 @@ addressed by the host system using different I2C slave addresses.
>  
>  This document describes bindings for main device node. Optional sub-blocks
>  must be a sub-nodes to it. Bindings for them can be found in:
> + - bindings/regulator/samsung,s2mpa01.txt
>   - bindings/regulator/samsung,s2mps11.txt
>   - bindings/regulator/samsung,s5m8767.txt
>   - bindings/clock/samsung,s2mps11.txt
> @@ -20,6 +21,7 @@ must be a sub-nodes to it. Bindings for them can be found in:
>  
>  Required properties:
>   - compatible: Should be one of the following
> +	- "samsung,s2mpa01-pmic",
>  	- "samsung,s2mps11-pmic",
>  	- "samsung,s2mps13-pmic",
>  	- "samsung,s2mps14-pmic",
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> new file mode 100644
> index 000000000000..bae3c7f838cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> @@ -0,0 +1,79 @@
> +Binding for Samsung S2MPA01 regulator block
> +===========================================
> +
> +This is a part of device tree bindings for S2M family multi-function devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S2MPA01 device provide buck and LDO regulators.
> +
> +To register these with regulator framework instantiate under main device node
> +a sub-node named "regulators" with more sub-nodes for each regulator using the
> +common regulator binding documented in:
> + - Documentation/devicetree/bindings/regulator/regulator.txt
> +
> +
> +Names of regulators supported by S2MPA01 device:
> +	- LDOn
> +		  - valid values for n are 1 to 26
> +		  - Example: LDO1, LD02, LDO26
> +	- BUCKn
> +		  - valid values for n are 1 to 10.
> +		  - Example: BUCK1, BUCK2, BUCK9
> +Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> +as per the datasheet of device.
> +
> +
> +Optional properties of buck regulator nodes under "regulators" sub-node:
> + - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
> +   (default), 25000, or 50000. May be 0 for disabling the ramp delay on
> +   BUCK{1,2,3,4}.
> +
> +   In the absence of the regulator-ramp-delay property, the default ramp
> +   delay will be used.
> +
> +   Note: Some bucks share the ramp rate setting i.e. same ramp value
> +   will be set for a particular group of bucks so provide the same
> +   regulator-ramp-delay value for them.
> +   Groups sharing ramp rate:
> +    - buck{1,6},
> +    - buck{2,4},
> +    - buck{8,9,10}.
> +
> +Example:
> +
> +	s2mpa01_pmic@66 {
> +		compatible = "samsung,s2mpa01-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ALIVE";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDDQ_MMC2";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
Lee Jones Jan. 11, 2016, 7:51 a.m. UTC | #6
On Fri, 04 Dec 2015, Krzysztof Kozlowski wrote:

> The mfd/s2mpa01.txt duplicates some of the information about bindings
> with old mfd/s2mps11.txt. Now common part exists entirely in
> mfd/samsung,sec-core.txt so:
>  - add company prefix to file name (regulator/samsung,s2mpa01.txt),
>  - remove duplicated information,
>  - reorganize the contents to match style of
>    regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  Documentation/devicetree/bindings/mfd/s2mpa01.txt  | 90 ----------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  4 +-
>  .../bindings/regulator/samsung,s2mpa01.txt         | 79 +++++++++++++++++++
>  3 files changed, 82 insertions(+), 91 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt

Applied, thanks.

> diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> deleted file mode 100644
> index c13d3d8c3947..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> +++ /dev/null
> @@ -1,90 +0,0 @@
> -
> -* Samsung S2MPA01 Voltage and Current Regulator
> -
> -The Samsung S2MPA01 is a multi-function device which includes high
> -efficiency buck converters including Dual-Phase buck converter, various LDOs,
> -and an RTC. It is interfaced to the host controller using an I2C interface.
> -Each sub-block is addressed by the host system using different I2C slave
> -addresses.
> -
> -Required properties:
> -- compatible: Should be "samsung,s2mpa01-pmic".
> -- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s2mpa01 are delivered to.
> -- interrupts: An interrupt specifier for the sole interrupt generated by the
> -  device.
> -
> -Optional nodes:
> -- regulators: The regulators of s2mpa01 that have to be instantiated should be
> -  included in a sub-node named 'regulators'. Regulator nodes and constraints
> -  included in this sub-node use the standard regulator bindings which are
> -  documented elsewhere.
> -
> -Properties for BUCK regulator nodes:
> -- regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
> -  (default), 25000, or 50000. May be 0 for disabling the ramp delay on
> -  BUCK{1,2,3,4}.
> -
> - In the absence of the regulator-ramp-delay property, the default ramp
> - delay will be used.
> -
> -  NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set
> -  for a particular group of BUCKs. So provide same regulator-ramp-delay=<value>.
> -
> -  The following BUCKs share ramp settings:
> -  * 1 and 6
> -  * 2 and 4
> -  * 8, 9, and 10
> -
> -The following are the names of the regulators that the s2mpa01 PMIC block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s2mpa01.
> -
> -	- LDOn
> -		  - valid values for n are 1 to 26
> -		  - Example: LDO1, LD02, LDO26
> -	- BUCKn
> -		  - valid values for n are 1 to 10.
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -Example:
> -
> -	s2mpa01_pmic@66 {
> -		compatible = "samsung,s2mpa01-pmic";
> -		reg = <0x66>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ALIVE";
> -				regulator-min-microvolt = <1000000>;
> -				regulator-max-microvolt = <1000000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDDQ_MMC2";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> index 4aeb95c82304..cdd079bfc287 100644
> --- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -4,7 +4,7 @@ Binding for Samsung S2M and S5M family multi-function device
>  This is a part of device tree bindings for S2M and S5M family multi-function
>  devices.
>  
> -The Samsung S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family
> +The Samsung S2MPA01, S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family
>  of multi-function devices which include voltage and current regulators, RTC,
>  charger controller, clock outputs and other sub-blocks. It is interfaced
>  to the host controller using an I2C interface. Each sub-block is usually
> @@ -13,6 +13,7 @@ addressed by the host system using different I2C slave addresses.
>  
>  This document describes bindings for main device node. Optional sub-blocks
>  must be a sub-nodes to it. Bindings for them can be found in:
> + - bindings/regulator/samsung,s2mpa01.txt
>   - bindings/regulator/samsung,s2mps11.txt
>   - bindings/regulator/samsung,s5m8767.txt
>   - bindings/clock/samsung,s2mps11.txt
> @@ -20,6 +21,7 @@ must be a sub-nodes to it. Bindings for them can be found in:
>  
>  Required properties:
>   - compatible: Should be one of the following
> +	- "samsung,s2mpa01-pmic",
>  	- "samsung,s2mps11-pmic",
>  	- "samsung,s2mps13-pmic",
>  	- "samsung,s2mps14-pmic",
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> new file mode 100644
> index 000000000000..bae3c7f838cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> @@ -0,0 +1,79 @@
> +Binding for Samsung S2MPA01 regulator block
> +===========================================
> +
> +This is a part of device tree bindings for S2M family multi-function devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S2MPA01 device provide buck and LDO regulators.
> +
> +To register these with regulator framework instantiate under main device node
> +a sub-node named "regulators" with more sub-nodes for each regulator using the
> +common regulator binding documented in:
> + - Documentation/devicetree/bindings/regulator/regulator.txt
> +
> +
> +Names of regulators supported by S2MPA01 device:
> +	- LDOn
> +		  - valid values for n are 1 to 26
> +		  - Example: LDO1, LD02, LDO26
> +	- BUCKn
> +		  - valid values for n are 1 to 10.
> +		  - Example: BUCK1, BUCK2, BUCK9
> +Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> +as per the datasheet of device.
> +
> +
> +Optional properties of buck regulator nodes under "regulators" sub-node:
> + - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
> +   (default), 25000, or 50000. May be 0 for disabling the ramp delay on
> +   BUCK{1,2,3,4}.
> +
> +   In the absence of the regulator-ramp-delay property, the default ramp
> +   delay will be used.
> +
> +   Note: Some bucks share the ramp rate setting i.e. same ramp value
> +   will be set for a particular group of bucks so provide the same
> +   regulator-ramp-delay value for them.
> +   Groups sharing ramp rate:
> +    - buck{1,6},
> +    - buck{2,4},
> +    - buck{8,9,10}.
> +
> +Example:
> +
> +	s2mpa01_pmic@66 {
> +		compatible = "samsung,s2mpa01-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ALIVE";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDDQ_MMC2";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
Lee Jones Jan. 11, 2016, 7:56 a.m. UTC | #7
On Fri, 04 Dec 2015, Mark Brown wrote:

> On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
> > The mfd/s2mpa01.txt duplicates some of the information about bindings
> > with old mfd/s2mps11.txt. Now common part exists entirely in
> > mfd/samsung,sec-core.txt so:
> 
> Acked-by: Mark Brown <broonie@kernel.org>
> 
> >  - add company prefix to file name (regulator/samsung,s2mpa01.txt),
> 
> I'm not 100% convinced about these prefixes BTW, the duplication isn't
> usually an issue within a subsystem.  They don't do any harm either
> though.

I think they're ugly and would prefer not to accept them, but lots of
people are submitting them now and I can't be bothered to fight it, so
meh!
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt
deleted file mode 100644
index c13d3d8c3947..000000000000
--- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt
+++ /dev/null
@@ -1,90 +0,0 @@ 
-
-* Samsung S2MPA01 Voltage and Current Regulator
-
-The Samsung S2MPA01 is a multi-function device which includes high
-efficiency buck converters including Dual-Phase buck converter, various LDOs,
-and an RTC. It is interfaced to the host controller using an I2C interface.
-Each sub-block is addressed by the host system using different I2C slave
-addresses.
-
-Required properties:
-- compatible: Should be "samsung,s2mpa01-pmic".
-- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66.
-
-Optional properties:
-- interrupt-parent: Specifies the phandle of the interrupt controller to which
-  the interrupts from s2mpa01 are delivered to.
-- interrupts: An interrupt specifier for the sole interrupt generated by the
-  device.
-
-Optional nodes:
-- regulators: The regulators of s2mpa01 that have to be instantiated should be
-  included in a sub-node named 'regulators'. Regulator nodes and constraints
-  included in this sub-node use the standard regulator bindings which are
-  documented elsewhere.
-
-Properties for BUCK regulator nodes:
-- regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
-  (default), 25000, or 50000. May be 0 for disabling the ramp delay on
-  BUCK{1,2,3,4}.
-
- In the absence of the regulator-ramp-delay property, the default ramp
- delay will be used.
-
-  NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set
-  for a particular group of BUCKs. So provide same regulator-ramp-delay=<value>.
-
-  The following BUCKs share ramp settings:
-  * 1 and 6
-  * 2 and 4
-  * 8, 9, and 10
-
-The following are the names of the regulators that the s2mpa01 PMIC block
-supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
-as per the datasheet of s2mpa01.
-
-	- LDOn
-		  - valid values for n are 1 to 26
-		  - Example: LDO1, LD02, LDO26
-	- BUCKn
-		  - valid values for n are 1 to 10.
-		  - Example: BUCK1, BUCK2, BUCK9
-
-Example:
-
-	s2mpa01_pmic@66 {
-		compatible = "samsung,s2mpa01-pmic";
-		reg = <0x66>;
-
-		regulators {
-			ldo1_reg: LDO1 {
-				regulator-name = "VDD_ALIVE";
-				regulator-min-microvolt = <1000000>;
-				regulator-max-microvolt = <1000000>;
-			};
-
-			ldo2_reg: LDO2 {
-				regulator-name = "VDDQ_MMC2";
-				regulator-min-microvolt = <2800000>;
-				regulator-max-microvolt = <2800000>;
-				regulator-always-on;
-			};
-
-			buck1_reg: BUCK1 {
-				regulator-name = "vdd_mif";
-				regulator-min-microvolt = <950000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-always-on;
-				regulator-boot-on;
-			};
-
-			buck2_reg: BUCK2 {
-				regulator-name = "vdd_arm";
-				regulator-min-microvolt = <950000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-ramp-delay = <50000>;
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
index 4aeb95c82304..cdd079bfc287 100644
--- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
+++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
@@ -4,7 +4,7 @@  Binding for Samsung S2M and S5M family multi-function device
 This is a part of device tree bindings for S2M and S5M family multi-function
 devices.
 
-The Samsung S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family
+The Samsung S2MPA01, S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family
 of multi-function devices which include voltage and current regulators, RTC,
 charger controller, clock outputs and other sub-blocks. It is interfaced
 to the host controller using an I2C interface. Each sub-block is usually
@@ -13,6 +13,7 @@  addressed by the host system using different I2C slave addresses.
 
 This document describes bindings for main device node. Optional sub-blocks
 must be a sub-nodes to it. Bindings for them can be found in:
+ - bindings/regulator/samsung,s2mpa01.txt
  - bindings/regulator/samsung,s2mps11.txt
  - bindings/regulator/samsung,s5m8767.txt
  - bindings/clock/samsung,s2mps11.txt
@@ -20,6 +21,7 @@  must be a sub-nodes to it. Bindings for them can be found in:
 
 Required properties:
  - compatible: Should be one of the following
+	- "samsung,s2mpa01-pmic",
 	- "samsung,s2mps11-pmic",
 	- "samsung,s2mps13-pmic",
 	- "samsung,s2mps14-pmic",
diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
new file mode 100644
index 000000000000..bae3c7f838cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
@@ -0,0 +1,79 @@ 
+Binding for Samsung S2MPA01 regulator block
+===========================================
+
+This is a part of device tree bindings for S2M family multi-function devices.
+More information can be found in bindings/mfd/sec-core.txt file.
+
+The S2MPA01 device provide buck and LDO regulators.
+
+To register these with regulator framework instantiate under main device node
+a sub-node named "regulators" with more sub-nodes for each regulator using the
+common regulator binding documented in:
+ - Documentation/devicetree/bindings/regulator/regulator.txt
+
+
+Names of regulators supported by S2MPA01 device:
+	- LDOn
+		  - valid values for n are 1 to 26
+		  - Example: LDO1, LD02, LDO26
+	- BUCKn
+		  - valid values for n are 1 to 10.
+		  - Example: BUCK1, BUCK2, BUCK9
+Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
+as per the datasheet of device.
+
+
+Optional properties of buck regulator nodes under "regulators" sub-node:
+ - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500
+   (default), 25000, or 50000. May be 0 for disabling the ramp delay on
+   BUCK{1,2,3,4}.
+
+   In the absence of the regulator-ramp-delay property, the default ramp
+   delay will be used.
+
+   Note: Some bucks share the ramp rate setting i.e. same ramp value
+   will be set for a particular group of bucks so provide the same
+   regulator-ramp-delay value for them.
+   Groups sharing ramp rate:
+    - buck{1,6},
+    - buck{2,4},
+    - buck{8,9,10}.
+
+Example:
+
+	s2mpa01_pmic@66 {
+		compatible = "samsung,s2mpa01-pmic";
+		reg = <0x66>;
+
+		regulators {
+			ldo1_reg: LDO1 {
+				regulator-name = "VDD_ALIVE";
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <1000000>;
+			};
+
+			ldo2_reg: LDO2 {
+				regulator-name = "VDDQ_MMC2";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-always-on;
+			};
+
+			buck1_reg: BUCK1 {
+				regulator-name = "vdd_mif";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			buck2_reg: BUCK2 {
+				regulator-name = "vdd_arm";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-ramp-delay = <50000>;
+			};
+		};
+	};