diff mbox series

[3/5] arm64: dts: mt7622: add a property "mediatek, num-pwms" for PWM

Message ID b5ed4626a553acb5e3107c6c96e82b674439128f.1547453586.git.ryder.lee@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [1/5] pwm: mediatek: add a property "mediatek,num-pwms" | expand

Commit Message

Ryder Lee Jan. 14, 2019, 8:21 a.m. UTC
This adds a property "mediatek,num-pwms" for PWM controller.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 +
 1 file changed, 1 insertion(+)

Comments

Uwe Kleine-König Jan. 15, 2019, 8:02 p.m. UTC | #1
Hello,

On Mon, Jan 14, 2019 at 04:21:22PM +0800, Ryder Lee wrote:
> This adds a property "mediatek,num-pwms" for PWM controller.
> 
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
>  arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> index 8fc4aa7..ab016cf 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> @@ -436,6 +436,7 @@
>  			 <&pericfg CLK_PERI_PWM6_PD>;
>  		clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4",
>  			      "pwm5", "pwm6";
> +		mediatek,num-pwms = <6>;
>  		status = "disabled";

Conceptually this patch must go in before the change to the driver.
Otherwise the pwms are not usable with only patch 1 applied which breaks
bisectability.

Best regards
Uwe
Matthias Brugger Jan. 17, 2019, 1 p.m. UTC | #2
On 15/01/2019 21:02, Uwe Kleine-König wrote:
> Hello,
> 
> On Mon, Jan 14, 2019 at 04:21:22PM +0800, Ryder Lee wrote:
>> This adds a property "mediatek,num-pwms" for PWM controller.
>>
>> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
>> ---
>>  arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
>> index 8fc4aa7..ab016cf 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
>> +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
>> @@ -436,6 +436,7 @@
>>  			 <&pericfg CLK_PERI_PWM6_PD>;
>>  		clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4",
>>  			      "pwm5", "pwm6";
>> +		mediatek,num-pwms = <6>;
>>  		status = "disabled";
> 
> Conceptually this patch must go in before the change to the driver.
> Otherwise the pwms are not usable with only patch 1 applied which breaks
> bisectability.
> 

The driver should have backwards compatibility to older DTs. So that would need
to be fixed in the driver not in the patch order of the series.

Regards,
Matthias
Uwe Kleine-König Jan. 17, 2019, 7:41 p.m. UTC | #3
Hello,

On Thu, Jan 17, 2019 at 02:00:43PM +0100, Matthias Brugger wrote:
> On 15/01/2019 21:02, Uwe Kleine-König wrote:
> > On Mon, Jan 14, 2019 at 04:21:22PM +0800, Ryder Lee wrote:
> >> diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> >> index 8fc4aa7..ab016cf 100644
> >> --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> >> +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> >> @@ -436,6 +436,7 @@
> >>  			 <&pericfg CLK_PERI_PWM6_PD>;
> >>  		clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4",
> >>  			      "pwm5", "pwm6";
> >> +		mediatek,num-pwms = <6>;
> >>  		status = "disabled";
> > 
> > Conceptually this patch must go in before the change to the driver.
> > Otherwise the pwms are not usable with only patch 1 applied which breaks
> > bisectability.
> > 
> 
> The driver should have backwards compatibility to older DTs. So that would need
> to be fixed in the driver not in the patch order of the series.

Right you are. Bisectability is a reason to not apply the patches in the
order as is, but given that you already requested backwards
compatibility the bisectability will be fixed en passant.

Best regards
Uwe
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
index 8fc4aa7..ab016cf 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -436,6 +436,7 @@ 
 			 <&pericfg CLK_PERI_PWM6_PD>;
 		clock-names = "top", "main", "pwm1", "pwm2", "pwm3", "pwm4",
 			      "pwm5", "pwm6";
+		mediatek,num-pwms = <6>;
 		status = "disabled";
 	};