[PATCH v4 0/10] Add mt7629 and fix mt7628 pwm

2019-08-19 Thread Sam Shih
From: sam shih Changes since v4: - Follow reviewer's comments (v3: pwm: mediatek: add a property "num-pwms") Move the changes of droping the check for of_device_get_match_data returning non-NULL to next patch - Follow reviewers's comments (v3: pwm: mediatek: allocate the

[PATCH v4 1/10] pwm: mediatek: add a property "num-pwms"

2019-08-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Used: https://patchwork.kernel.org/project/linux-mediatek/list/?series=68207 Changes since

[PATCH v4 2/10] pwm: mediatek: droping the check for of_device_get_match_data

2019-08-19 Thread Sam Shih
From: sam shih This patch drop the check for of_device_get_match_data. Due to the only way call driver probe is compatible match, In this case, the platform data should never be NULL. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Used: https://patchwork.kernel.org/patch/11096905

[PATCH v4 4/10] pwm: mediatek: use pwm_mediatek as common prefix

2019-08-19 Thread Sam Shih
From: sam shih Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- drivers/pwm/pwm-mediatek.c | 117 ++--- 1 file changed, 58 insertions(+), 59 deletions(-) diff --git

[PATCH v4 3/10] pwm: mediatek: allocate the clks array dynamically and fix mt7628 pwm

2019-08-19 Thread Sam Shih
specific data and legacy MIPS SoC need to configure it in DT. This property is use for period calculation. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Changes since v4: - Follow reviewers's comments 1. use pc->soc->has_clks to check clocks exist or not. 2. Add error message when

[PATCH v4 5/10] dt-bindings: pwm: add a property "num-pwms"

2019-08-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 7 -

[PATCH v4 6/10] dt-bindings: pwm: update bindings for MT7628 SoC

2019-08-19 Thread Sam Shih
From: sam shih This updates bindings for MT7628 pwm controller. Signed-off-by: Sam Shih --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings

[PATCH v4 7/10] arm64: dts: mt7622: add a property "num-pwms" for PWM node

2019-08-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- 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/dt

[PATCH v4 8/10] arm: dts: mt7623: add a property "num-pwms" for PWM node

2019-08-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index a7

[PATCH v4 10/10] arm: dts: mediatek: add mt7629 pwm support

2019-08-19 Thread Sam Shih
From: sam shih This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..493be9a9453b 100644 --- a/arch/arm

[PATCH v4 9/10] dt-bindings: pwm: update bindings for MT7629 SoC

2019-08-19 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings

[PATCH v3 0/10] Add mt7629 and fix mt7628 pwm

2019-08-16 Thread Sam Shih
From: sam shih Changes since v2: - use num-pwms instead of mediatek,num-pwms. - rename the member from num_pwms to fallback_num_pwms to make it more obvious that it doesn't represent the actually used value. - add a dev_warn and a expressive comment to help other developers to not start

[PATCH v3 4/10] dt-bindings: pwm: add a property "num-pwms"

2019-08-16 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 7 -

[PATCH v3 5/10] arm64: dts: mt7622: add a property "num-pwms" for PWM node

2019-08-16 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- 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/dt

[PATCH v3 3/10] pwm: mediatek: use pwm_mediatek as common prefix

2019-08-16 Thread Sam Shih
From: Ryder Lee Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- drivers/pwm/pwm-mediatek.c | 119 +++-- 1 file changed, 60 insertions(+), 59 deletions(-) diff --git

[PATCH v3 8/10] pwm: mediatek: add new property and fix mt7628 pwm

2019-08-16 Thread Sam Shih
From: sam shih This fix mt7628 pwm during configure from userspace. The SoC is legacy MIPS and has no complex clock tree. This patch add property clock-frequency to the SoC specific data and legacy MIPS SoC need to configure it in DT. This property is use for period calculation. Signed-off

[PATCH v3 7/10] dt-bindings: pwm: update bindings for MT7629 SoC

2019-08-16 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings

[PATCH v3 1/10] pwm: mediatek: add a property "num-pwms"

2019-08-16 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- drivers/pwm/pwm-mediatek.c | 35 ++- 1 file changed, 22

[PATCH v3 2/10] pwm: mediatek: allocate the clks array dynamically

2019-08-16 Thread Sam Shih
From: Ryder Lee Instead of using fixed size of arrays, allocate the memory for them based on the information we get from the chips. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- drivers/pwm/pwm-mediatek.c | 76 +++--- 1 file changed, 39 insertions

[PATCH 10/10] arm: dts: mediatek: add mt7629 pwm support

2019-08-16 Thread Sam Shih
From: sam shih This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..10f788a93346 100644 --- a/arch/arm

[PATCH v3 9/10] dt-bindings: pwm: update bindings for MT7628 SoC

2019-08-16 Thread Sam Shih
From: sam shih This updates bindings for MT7628 pwm controller. Signed-off-by: Sam Shih --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings

[PATCH v3 6/10] arm: dts: mt7623: add a property "num-pwms" for PWM node

2019-08-16 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index a7

[RESEND, PATCH v7 03/11] pwm: mediatek: remove a property "has-clks"

2019-09-17 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Changes since v6: Based on fixed-clock in DT, we can remove has-clks property Changes since v5: 1. Follow reviewer's comments Make the changes of fix mt7628 pwm as a single patch Changes since v4: - Follow reviewers's comments 1. use pc->

[RESEND, PATCH v7 02/11] pwm: mediatek: droping the check for of_device_get_match_data

2019-09-17 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Used: https://patchwork.kernel.org/patch/11096905/ Changes since v6: Add an Acked-by tag Changes since v4: Follow reviewer's comments: Move the changes of droping the check for of_device_get_match_data returning non

[RESEND, PATCH v7 01/11] pwm: mediatek: add a property "num-pwms"

2019-09-17 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: Chec

[RESEND, PATCH v7 06/11] pwm: mediatek: update license and switch to SPDX tag

2019-09-17 Thread Sam Shih
Add SPDX identifiers to pwm-mediatek.c Update license to GNU General Public License v2.0 Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate

[RESEND, PATCH v7 0/11] Add mt7629 and fix mt7628 pwm

2019-09-17 Thread Sam Shih
d a property "num-pwms" arm64: dts: mt7622: add a property "num-pwms" for PWM arm: dts: mt7623: add a property "num-pwms" for PWM dt-bindings: pwm: update bindings for MT7629 SoC Sam Shih (6): pwm: mediatek: droping the check for of_device_get_match_data pwm

[RESEND, PATCH v7 04/11] pwm: mediatek: allocate the clks array dynamically

2019-09-17 Thread Sam Shih
Instead of using fixed size of arrays, allocate the memory for them based on the information we get from the DT. Also remove the check for num_pwms, due to dynamically allocate pwm should not cause array index out of bound. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe

[RESEND, PATCH v7 07/11] dt-bindings: pwm: pwm-mediatek: add a property "num-pwms"

2019-09-17 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger Acked-by: Uwe Kleine-König --- Changes since v6: Follow reviewers'

[RESEND, PATCH v7 08/11] arm64: dts: mt7622: add a property "num-pwms" for PWM

2019-09-17 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- 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/dt

[RESEND, PATCH v7 09/11] arm: dts: mt7623: add a property "num-pwms" for PWM

2019-09-17 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index a7

[RESEND, PATCH v7 10/11] dt-bindings: pwm: update bindings for MT7629 SoC

2019-09-17 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Rob Herring Reviewed-by: Matthias Brugger --- Changes since v7: - add a missed Reviewed-by tag back from v1: https://patchwork.kernel.org/patch/10769381/ Changes

[RESEND, PATCH v7 11/11] arm: dts: mediatek: add mt7629 pwm support

2019-09-17 Thread Sam Shih
This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..493be9a9453b 100644 --- a/arch/arm/boot/dts/mt7629

[RESEND, PATCH v7 05/11] pwm: mediatek: use pwm_mediatek as common prefix

2019-09-17 Thread Sam Shih
Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Changes since v6: Add an Acked-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate change

[PATCH v8 0/11] Add mt7629 and fix mt7628 pwm

2019-09-18 Thread Sam Shih
m-pwms" dt-bindings: pwm: add a property "num-pwms" arm64: dts: mt7622: add a property "num-pwms" for PWM arm: dts: mt7623: add a property "num-pwms" for PWM dt-bindings: pwm: update bindings for MT7629 SoC Sam Shih (6): pwm: mediatek: droping the check for of_

[PATCH v8 03/11] pwm: mediatek: remove a property "has-clks"

2019-09-18 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Changes since v6: Based on fixed-clock in DT, we can remove has-clks property Changes since v5: 1. Follow reviewer's comments Make the changes of fix mt7628 pwm as a single patch Changes since v4: - Follow reviewers's comments 1. use pc->

[PATCH v8 09/11] arm: dts: mt7623: add a property "num-pwms" for PWM

2019-09-18 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index a7

[PATCH v8 07/11] dt-bindings: pwm: pwm-mediatek: add a property "num-pwms"

2019-09-18 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger Acked-by: Uwe Kleine-König --- Changes since v6: Follow reviewers'

[PATCH v8 04/11] pwm: mediatek: allocate the clks array dynamically

2019-09-18 Thread Sam Shih
Instead of using fixed size of arrays, allocate the memory for them based on the information we get from the DT. Also remove the check for num_pwms, due to dynamically allocate pwm should not cause array index out of bound. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe

[PATCH v8 01/11] pwm: mediatek: add a property "num-pwms"

2019-09-18 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: Chec

[PATCH v8 11/11] arm: dts: mediatek: add mt7629 pwm support

2019-09-18 Thread Sam Shih
This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..493be9a9453b 100644 --- a/arch/arm/boot/dts/mt7629

[PATCH v8 02/11] pwm: mediatek: droping the check for of_device_get_match_data

2019-09-18 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Used: https://patchwork.kernel.org/patch/11096905/ Changes since v6: Add an Acked-by tag Changes since v4: Follow reviewer's comments: Move the changes of droping the check for of_device_get_match_data returning non

[PATCH v8 10/11] dt-bindings: pwm: update bindings for MT7629 SoC

2019-09-18 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Rob Herring Reviewed-by: Matthias Brugger --- Changes since v7: - add a missed Reviewed-by tag back from v1: https://patchwork.kernel.org/patch/10769381/ Changes

[PATCH v8 06/11] pwm: mediatek: update license and switch to SPDX tag

2019-09-18 Thread Sam Shih
Add SPDX identifiers to pwm-mediatek.c Update license to GNU General Public License v2.0 Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate

[PATCH v8 08/11] arm64: dts: mt7622: add a property "num-pwms" for PWM

2019-09-18 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- 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/dt

[PATCH v8 05/11] pwm: mediatek: use pwm_mediatek as common prefix

2019-09-18 Thread Sam Shih
Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Changes since v6: Add an Acked-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate change

Re: [PATCH v5 07/13] dt-bindings: pwm: add a property "num-pwms"

2019-09-11 Thread Sam Shih
On Mon, 2019-09-02 at 18:04 +0200, Uwe Kleine-König wrote: > On Tue, Aug 27, 2019 at 01:39:24PM -0500, Rob Herring wrote: > > On Thu, Aug 22, 2019 at 02:58:37PM +0800, Sam Shih wrote: > > > From: Ryder Lee > > > > The subject should indicate this is for Mediate

Re: [PATCH v10 08/12] pwm: mediatek: Add MT7629 compatible string

2019-09-30 Thread Sam Shih
Hi, On Fri, 2019-09-27 at 13:28 +0200, Thierry Reding wrote: > On Wed, Sep 25, 2019 at 10:32:33PM +0800, Sam Shih wrote: > > This adds pwm support for MT7629, and separate mt7629 compatible string > > from mt7622 > > > > Signed-off-by: Sam Shih > > --- &g

Re: [PATCH v10 08/12] pwm: mediatek: Add MT7629 compatible string

2019-09-30 Thread Sam Shih
On Mon, 2019-09-30 at 11:36 +0200, Thierry Reding wrote: > On Mon, Sep 30, 2019 at 04:51:08PM +0800, Sam Shih wrote: > > Hi, > > > > On Fri, 2019-09-27 at 13:28 +0200, Thierry Reding wrote: > > > On Wed, Sep 25, 2019 at 10:32:33PM +0800, Sam Shih wrote: > >

[PATCH 1/1] arm: dts: mediatek: add mt7629 pwm support

2019-09-30 Thread Sam Shih
This adds pwm support for MT7629. Used: https://patchwork.kernel.org/patch/11160851/ Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f

[PATCH 0/1] Add mt7629 pwm support

2019-09-30 Thread Sam Shih
This adds pwm support for MT7629. Separate this dtsi update from pwm patches series, Used: https://patchwork.kernel.org/patch/11160851/ Related dependent driver updates have been merged into maintainer's kernel source tree. Sam Shih (1): arm: dts: mediatek: add mt7629 pwm support arch/arm

[PATCH v7 0/11] Add mt7629 and fix mt7628 pwm

2019-08-29 Thread Sam Shih
mt7623: add a property "num-pwms" for PWM dt-bindings: pwm: update bindings for MT7629 SoC Sam Shih (6): pwm: mediatek: droping the check for of_device_get_match_data pwm: mediatek: remove a property "has-clks" pwm: mediatek: allocate the clks array dynamically pwm:

[RESEND PATCH v7 0/11] Add mt7629 and fix mt7628 pwm

2019-08-29 Thread Sam Shih
mt7623: add a property "num-pwms" for PWM dt-bindings: pwm: update bindings for MT7629 SoC Sam Shih (6): pwm: mediatek: droping the check for of_device_get_match_data pwm: mediatek: remove a property "has-clks" pwm: mediatek: allocate the clks array dynamically pwm:

[RESEND PATCH v7 0/11] Add mt7629 and fix mt7628 pwm

2019-08-29 Thread Sam Shih
arm64: dts: mt7622: add a property "num-pwms" for PWM arm: dts: mt7623: add a property "num-pwms" for PWM dt-bindings: pwm: update bindings for MT7629 SoC Sam Shih (6): pwm: mediatek: droping the check for of_device_get_match_data pwm: mediatek: remove a property &qu

[PATCH v7 03/11] pwm: mediatek: remove a property "has-clks"

2019-08-29 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Changes since v6: Based on fixed-clock in DT, we can remove has-clks property Changes since v5: 1. Follow reviewer's comments Make the changes of fix mt7628 pwm as a single patch Changes since v4: - Follow reviewers's comments 1. use pc->

[RESEND, PATCH v7 0/11] Add mt7629 and fix mt7628 pwm

2019-08-29 Thread Sam Shih
dts: mt7622: add a property "num-pwms" for PWM arm: dts: mt7623: add a property "num-pwms" for PWM dt-bindings: pwm: update bindings for MT7629 SoC Sam Shih (6): pwm: mediatek: droping the check for of_device_get_match_data pwm: mediatek: remove a property "has-clk

[PATCH v7 04/11] pwm: mediatek: allocate the clks array dynamically

2019-08-29 Thread Sam Shih
Instead of using fixed size of arrays, allocate the memory for them based on the information we get from the DT. Also remove the check for num_pwms, due to dynamically allocate pwm should not cause array index out of bound. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe

[PATCH v7 02/11] pwm: mediatek: droping the check for of_device_get_match_data

2019-08-29 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Used: https://patchwork.kernel.org/patch/11096905/ Changes since v6: Add an Acked-by tag Changes since v4: Follow reviewer's comments: Move the changes of droping the check for of_device_get_match_data returning non

[PATCH v7 01/11] pwm: mediatek: add a property "num-pwms"

2019-08-29 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: Chec

[PATCH v7 05/11] pwm: mediatek: use pwm_mediatek as common prefix

2019-08-29 Thread Sam Shih
Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Changes since v6: Add an Acked-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate change

[PATCH v7 11/11] arm: dts: mediatek: add mt7629 pwm support

2019-08-29 Thread Sam Shih
This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..493be9a9453b 100644 --- a/arch/arm/boot/dts/mt7629

[PATCH v7 10/11] dt-bindings: pwm: update bindings for MT7629 SoC

2019-08-29 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Rob Herring Reviewed-by: Matthias Brugger --- Changes since v7: - add a missed Reviewed-by tag back from v1: https://patchwork.kernel.org/patch/10769381/ Changes

[PATCH v7 06/11] pwm: mediatek: update license and switch to SPDX tag

2019-08-29 Thread Sam Shih
Add SPDX identifiers to pwm-mediatek.c Update license to GNU General Public License v2.0 Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate

[PATCH v7 09/11] arm: dts: mt7623: add a property "num-pwms" for PWM

2019-08-29 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index a7

[PATCH v7 07/11] dt-bindings: pwm: pwm-mediatek: add a property "num-pwms"

2019-08-29 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger Acked-by: Uwe Kleine-König --- Changes since v6: Follow reviewers'

[PATCH v7 08/11] arm64: dts: mt7622: add a property "num-pwms" for PWM

2019-08-29 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- 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/dt

[PATCH v9 0/11] Add mt7629 and fix mt7628 pwm

2019-09-19 Thread Sam Shih
r Lee (5): pwm: mediatek: add a property "num-pwms" dt-bindings: pwm: add a property "num-pwms" arm64: dts: mt7622: add a property "num-pwms" for PWM arm: dts: mt7623: add a property "num-pwms" for PWM dt-bindings: pwm: update binding

[PATCH v9 01/11] pwm: mediatek: add a property "num-pwms"

2019-09-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: Chec

[PATCH v9 08/11] arm64: dts: mt7622: add a property "num-pwms" for PWM

2019-09-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- 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/dt

[PATCH v9 03/11] pwm: mediatek: remove a property "has-clks"

2019-09-19 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-Kö --- Changes since v9: Added an Acked-by tag Changes since v6: Based on fixed-clock in DT, we can remove has-clks property Changes since v5: 1. Follow reviewer's comments Make the changes of fix mt7628 pwm as a single patch

[PATCH v9 06/11] pwm: mediatek: update license and switch to SPDX tag

2019-09-19 Thread Sam Shih
Add SPDX identifiers to pwm-mediatek.c Update license to GNU General Public License v2.0 Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate

[PATCH v9 07/11] dt-bindings: pwm: pwm-mediatek: add a property "num-pwms"

2019-09-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger Acked-by: Uwe Kleine-König --- Changes since v6: Follow reviewers'

[PATCH v9 02/11] pwm: mediatek: droping the check for of_device_get_match_data

2019-09-19 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Used: https://patchwork.kernel.org/patch/11096905/ Changes since v6: Add an Acked-by tag Changes since v4: Follow reviewer's comments: Move the changes of droping the check for of_device_get_match_data returning non

[PATCH v9 04/11] pwm: mediatek: allocate the clks array dynamically

2019-09-19 Thread Sam Shih
Instead of using fixed size of arrays, allocate the memory for them based on the information we get from the DT. Also remove the check for num_pwms, due to dynamically allocate pwm should not cause array index out of bound. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe

[PATCH v9 05/11] pwm: mediatek: use pwm_mediatek as common prefix

2019-09-19 Thread Sam Shih
Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Changes since v6: Add an Acked-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate change

[PATCH v9 10/11] dt-bindings: pwm: update bindings for MT7629 SoC

2019-09-19 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Rob Herring Reviewed-by: Matthias Brugger --- Changes since v7: - add a missed Reviewed-by tag back from v1: https://patchwork.kernel.org/patch/10769381/ Changes

[PATCH v9 11/11] arm: dts: mediatek: add mt7629 pwm support

2019-09-19 Thread Sam Shih
This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..493be9a9453b 100644 --- a/arch/arm/boot/dts/mt7629

[PATCH v9 09/11] arm: dts: mt7623: add a property "num-pwms" for PWM

2019-09-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index a7

[PATCH v2 2/10] pwm: mediatek: allocate the clks array dynamically

2019-08-14 Thread Sam Shih
From: Ryder Lee Instead of using fixed size of arrays, allocate the memory for them based on the information we get from the chips. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- drivers/pwm/pwm-mediatek.c | 76 -- 1 file changed, 39

[PATCH v2 1/10] pwm: mediatek: add a property "num-pwms"

2019-08-14 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Used: https://patchwork.kernel.org/project/linux-mediatek/list/?series=68207 Changes since

[PATCH v2 7/10] dt-bindings: pwm: update bindings for MT7629 SoC

2019-08-14 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings

[PATCH v2 4/10] dt-bindings: pwm: add a property "num-pwms"

2019-08-14 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Changes since v2: - use num-pwms instead of mediatek,num-pwms

[PATCH v2 6/10] arm: dts: mt7623: add a property "num-pwms" for PWM node

2019-08-14 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Changes since v2: use num-pwms instead of mediatek,num-pwms. --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/

[PATCH v2 3/10] pwm: mediatek: use pwm_mediatek as common prefix

2019-08-14 Thread Sam Shih
From: Ryder Lee Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- drivers/pwm/pwm-mediatek.c | 119 +++-- 1 file changed, 60 insertions(+), 59 deletions(-) diff

[PATCH v2 9/10] dt-bindings: pwm: update bindings for MT7628 SoC

2019-08-14 Thread Sam Shih
From: sam shih This updates bindings for MT7628 pwm controller. Signed-off-by: Sam Shih --- .../devicetree/bindings/pwm/pwm-mediatek.txt | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree

[PATCH v2 5/10] arm64: dts: mt7622: add a property "num-pwms" for PWM node

2019-08-14 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Changes since v2: use num-pwms instead of mediatek,num-pwms. --- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/

[PATCH v2 8/10] pwm: mediatek: add new property and fix mt7628 pwm

2019-08-14 Thread Sam Shih
From: sam shih This fix mt7628 pwm during configure from userspace. The SoC is legacy MIPS and has no complex clock tree. This patch add property clock-frequency to the SoC specific data and legacy MIPS SoC need to configure it in DT. This property is use for period calculation. Signed-off

[PATCH v2 10/10] arm: dts: mediatek: add mt7629 pwm support

2019-08-14 Thread Sam Shih
From: sam shih This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 14 ++ drivers/pwm/pwm-mediatek.c| 7 +++ 2 files changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index

[PATCH v6 0/11] Add mt7629 and fix mt7628 pwm

2019-08-28 Thread Sam Shih
mt7623: add a property "num-pwms" for PWM dt-bindings: pwm: update bindings for MT7629 SoC Sam Shih (6): pwm: mediatek: droping the check for of_device_get_match_data pwm: mediatek: remove a property "has-clks" pwm: mediatek: allocate the clks array dynamically pwm:

[PATCH v6 01/11] pwm: mediatek: add a property "num-pwms"

2019-08-28 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: Chec

[PATCH v6 02/11] pwm: mediatek: droping the check for of_device_get_match_data

2019-08-28 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Used: https://patchwork.kernel.org/patch/11096905/ Changes since v6: Add an Acked-by tag Changes since v4: Follow reviewer's comments: Move the changes of droping the check for of_device_get_match_data returning non

[PATCH v6 03/11] pwm: mediatek: remove a property "has-clks"

2019-08-28 Thread Sam Shih
. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Changes since v6: Based on fixed-clock in DT, we can remove has-clks property Changes since v5: 1. Follow reviewer's comments Make the changes of fix mt7628 pwm as a single patch Changes since v4: - Follow reviewers's comments 1. use pc->

[PATCH v6 04/11] pwm: mediatek: allocate the clks array dynamically

2019-08-28 Thread Sam Shih
Instead of using fixed size of arrays, allocate the memory for them based on the information we get from the DT. Also remove the check for num_pwms, due to dynamically allocate pwm should not cause array index out of bound. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe

[PATCH v6 05/11] pwm: mediatek: use pwm_mediatek as common prefix

2019-08-28 Thread Sam Shih
Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Acked-by: Uwe Kleine-König --- Changes since v6: Add an Acked-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate change

[PATCH v6 06/11] pwm: mediatek: update license and switch to SPDX tag

2019-08-28 Thread Sam Shih
Add SPDX identifiers to pwm-mediatek.c Update license to GNU General Public License v2.0 Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Uwe Kleine-König --- Changes since v6: Add a Reviewed-by tag Changes since v5: - Follow reviewers's comments The license stuff is a separate

[PATCH v6 07/11] dt-bindings: pwm: pwm-mediatek: add a property "num-pwms"

2019-08-28 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger Acked-by: Uwe Kleine-König --- Changes since v6: Follow reviewers'

[PATCH v6 08/11] arm64: dts: mt7622: add a property "num-pwms" for PWM

2019-08-28 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- 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/dt

[PATCH v6 10/11] dt-bindings: pwm: update bindings for MT7629 SoC

2019-08-28 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Changes since v1: - add a Reviewed-by tag --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion

[PATCH v6 09/11] arm: dts: mt7623: add a property "num-pwms" for PWM

2019-08-28 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index a7

[PATCH v6 11/11] arm: dts: mediatek: add mt7629 pwm support

2019-08-28 Thread Sam Shih
This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..493be9a9453b 100644 --- a/arch/arm/boot/dts/mt7629

  1   2   >