[RFC PATCH 1/2] drivers: pwm: core: implement pwm mode

2017-04-05 Thread Claudiu Beznea
. Since, for the moment, only the complementary and push-pull modes are implemented, only one bit in flags used to pass polarity could also be used for PWM mode. The other drivers are not affected by this change. Signed-off-by: Claudiu Beznea --- Documentation/pwm.txt | 24

[RFC PATCH 1/2] drivers: pwm: core: implement pwm dead-times

2017-04-05 Thread Claudiu Beznea
structure with two new members which keeps the values for dead-times. There was no additions in device tree for PWM channels with inputs there. Signed-off-by: Claudiu Beznea --- Documentation/pwm.txt | 52 drivers/pwm/core.c| 10 ++- drivers/pwm/sysfs.c

[RFC PATCH 2/2] drivers: pwm: pwm-atmel: add support for pwm modes

2017-04-05 Thread Claudiu Beznea
t the new feature. Signed-off-by: Claudiu Beznea --- drivers/pwm/pwm-atmel.c | 94 + 1 file changed, 63 insertions(+), 31 deletions(-) diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index 530d7dc..9e812ce 100644 --- a/drivers/pw

[RFC PATCH 0/2] extends PWM framework to support PWM dead-times

2017-04-05 Thread Claudiu Beznea
for pwm modes but, if you consider relevant, and both patch changes are considered relevant for PWM subsistem, I can combine both of them, if any. Thanks you, Claudiu Beznea Claudiu Beznea (2): drivers: pwm: core: implement pwm dead-times drivers: pwm: pwm-atmel: implement pwm dead-time

[RFC PATCH 0/2] extend PWM framework to support PWM modes

2017-04-05 Thread Claudiu Beznea
, if any. Thanks you, Claudiu Beznea Claudiu Beznea (2): drivers: pwm: core: implement pwm mode drivers: pwm: pwm-atmel: add support for pwm modes drivers/pwm/core.c| 13 +- drivers/pwm/pwm-atmel.c | 94 +-- drivers/pwm/sysfs

[RFC PATCH 2/2] drivers: pwm: pwm-atmel: implement pwm dead-time

2017-04-05 Thread Claudiu Beznea
Implement PWM dead-times for atmel PWM controllers. Since this driver is used by PWM controllers which supports dead-times and PWM controllers which doesn't, add specific input for dead-time register in atmel register private data structure. Signed-off-by: Claudiu Beznea --- drivers/pw

[PATCH 0/2] extends PWM framework to support PWM dead-times

2017-05-08 Thread Claudiu Beznea
f bridge converters applications. Thanks you, Claudiu Beznea Changes since RFC patches: - corrected the Documentation/pwm.txt - in atmel-pwm.c check atmel_pwm->regs->dt before computing dead-times or setting specific registers since the driver is used by controllers witch supports dead-time con

[PATCH 2/2] drivers: pwm: pwm-atmel: implement pwm dead-times

2017-05-08 Thread Claudiu Beznea
Implement PWM dead-times for atmel PWM controllers. Since this driver is used by PWM controllers which supports dead-times and PWM controllers which doesn't, add specific input for dead-time register in atmel register private data structure. Signed-off-by: Claudiu Beznea --- drivers/pw

[PATCH 1/2] drivers: pwm: core: implement pwm dead-times

2017-05-08 Thread Claudiu Beznea
structure with two new members which keeps the values for dead-times. There were no additions in device tree for PWM channels initialized by device tree. Signed-off-by: Claudiu Beznea --- Documentation/pwm.txt | 55 ++ drivers/pwm/core.c| 10 ++- drivers/pwm

[PATCH v2 0/2] extends PWM framework to support PWM dead-times

2017-05-09 Thread Claudiu Beznea
f bridge converters applications. Thank you, Claudiu Beznea Changes since v1: - fixed compilation warning Changes since RFC patches: - corrected the Documentation/pwm.txt - in atmel-pwm.c check atmel_pwm->regs->dt before computing dead-times or setting specific registers since the driver is

[PATCH v2 2/2] drivers: pwm: pwm-atmel: implement pwm dead-times

2017-05-09 Thread Claudiu Beznea
Implement PWM dead-times for atmel PWM controllers. Since this driver is used by PWM controllers which supports dead-times and PWM controllers which doesn't, add specific input for dead-time register in atmel register private data structure. Signed-off-by: Claudiu Beznea --- drivers/pw

[PATCH v2 1/2] drivers: pwm: core: implement pwm dead-times

2017-05-09 Thread Claudiu Beznea
structure with two new members which keeps the values for dead-times. There were no additions in device tree for PWM channels initialized by device tree. Signed-off-by: Claudiu Beznea --- Documentation/pwm.txt | 55 ++ drivers/pwm/core.c| 10 ++- drivers/pwm

[PATCH 0/2] extend PWM framework to support PWM dead-times

2017-05-09 Thread Claudiu Beznea
s on atmel SAMA5D2 SoC. Thank you, Claudiu Beznea Claudiu Beznea (2): drivers: pwm: core: implement pwm mode drivers: pwm: pwm-atmel: add support for pwm modes Documentation/pwm.txt | 24 -- drivers/pwm/core.c| 13 +- drivers/pwm/p

[PATCH 1/2] drivers: pwm: core: implement pwm mode

2017-05-09 Thread Claudiu Beznea
. Since, for the moment, only the complementary and push-pull modes are implemented, only one bit in flags used to pass polarity could also be used for PWM mode. The other drivers are not affected by this change. Signed-off-by: Claudiu Beznea --- Documentation/pwm.txt | 24

[PATCH 2/2] drivers: pwm: pwm-atmel: add support for pwm modes

2017-05-09 Thread Claudiu Beznea
t the new feature. Signed-off-by: Claudiu Beznea --- drivers/pwm/pwm-atmel.c | 103 +--- 1 file changed, 72 insertions(+), 31 deletions(-) diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index 530d7dc..9d93cca 100644 --- a/drivers/pw

[PATCH v3 00/10] extend PWM framework to support PWM modes

2018-02-22 Thread Claudiu Beznea
s/class/pwm/pwmchip0/pwm2# cat mode [normal] complementary push-pull The PWM push-pull mode could be usefull in applications like half bridge converters. This series also add support for PWM modes on Atmel/Microchip SoCs. Thank you, Claudiu Beznea [1] https://www.spinics.net/lists/arm-kernel/msg5

[PATCH v3 03/10] pwm: cros-ec: populate PWM mode in of_xlate function

2018-02-22 Thread Claudiu Beznea
Populate PWM mode in of_xlate function to avoid pwm_apply_state() failure. Signed-off-by: Claudiu Beznea --- drivers/pwm/pwm-cros-ec.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c index 9c13694eaa24..e54954c13323 100644 --- a

[PATCH v3 09/10] pwm: add documentation for pwm push-pull mode

2018-02-22 Thread Claudiu Beznea
Add documentation for PWM push-pull mode. Signed-off-by: Claudiu Beznea Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/pwm/pwm.txt | 2 ++ Documentation/pwm.txt | 16 include/dt-bindings/pwm/pwm.h | 1 + 3 files changed

[PATCH v3 10/10] pwm: atmel: add push-pull mode support

2018-02-22 Thread Claudiu Beznea
Add support for PWM push-pull mode. This is only supported by SAMA5D2 SoCs. Signed-off-by: Claudiu Beznea --- drivers/pwm/pwm-atmel.c | 40 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c

[PATCH v3 08/10] pwm: add push-pull mode support

2018-02-22 Thread Claudiu Beznea
Add push-pull mode support. In push-pull mode the channels' outputs have same polarities and the edges are complementary delayed for one period. Signed-off-by: Claudiu Beznea --- include/linux/pwm.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/linux/

[PATCH v3 07/10] pwm: atmel: add pwm capabilities

2018-02-22 Thread Claudiu Beznea
Add pwm capabilities for Atmel/Microchip PWM controllers. Signed-off-by: Claudiu Beznea --- drivers/pwm/pwm-atmel.c | 80 - 1 file changed, 52 insertions(+), 28 deletions(-) diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index

[PATCH v3 06/10] pwm: add PWM modes

2018-02-22 Thread Claudiu Beznea
Add PWM normal and complementary modes. Signed-off-by: Claudiu Beznea --- Documentation/devicetree/bindings/pwm/pwm.txt | 9 +++-- Documentation/pwm.txt | 26 +++--- include/dt-bindings/pwm/pwm.h | 1 + 3 files changed, 31

[PATCH v3 04/10] pwm: pxa: populate PWM mode in of_xlate function

2018-02-22 Thread Claudiu Beznea
Populate PWM mode in of_xlate function to avoid pwm_apply_state() failure. Signed-off-by: Claudiu Beznea --- drivers/pwm/pwm-pxa.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index 4143a46684d2..7a035716e054 100644 --- a/drivers/pwm/pwm

[PATCH v3 05/10] pwm: add PWM mode to pwm_config()

2018-02-22 Thread Claudiu Beznea
Add PWM mode to pwm_config() function. The drivers which uses pwm_config() were adapted to this change. Signed-off-by: Claudiu Beznea --- arch/arm/mach-s3c24xx/mach-rx1950.c | 11 +-- drivers/bus/ts-nbus.c| 2 +- drivers/clk/clk-pwm.c| 3 ++- drivers

[PATCH v3 02/10] pwm: clps711x: populate PWM mode in of_xlate function

2018-02-22 Thread Claudiu Beznea
Populate PWM mode in of_xlate function to avoid pwm_apply_state() failure. Signed-off-by: Claudiu Beznea --- drivers/pwm/pwm-clps711x.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-clps711x.c b/drivers/pwm/pwm-clps711x.c index 26ec24e457b1

[PATCH v3 01/10] pwm: extend PWM framework with PWM modes

2018-02-22 Thread Claudiu Beznea
s could be located in include/dt-bindings/pwm/pwm.h. Only modes supported by PWM channel could be set. If nothing is specified for a PWM channel, via DT, the first available mode will be used (normally, this will be PWM normal mode). Signed-off-by: Claudiu Beznea --- drivers/pwm/co

Re: [PATCH v3 05/10] pwm: add PWM mode to pwm_config()

2018-02-22 Thread Claudiu Beznea
On 22.02.2018 14:33, Daniel Thompson wrote: > On Thu, Feb 22, 2018 at 02:01:16PM +0200, Claudiu Beznea wrote: >> Add PWM mode to pwm_config() function. The drivers which uses pwm_config() >> were adapted to this change. >> >> Signed-off-by: Claudiu Beznea >> -

Re: [PATCH v3 05/10] pwm: add PWM mode to pwm_config()

2018-02-22 Thread Claudiu Beznea
On 22.02.2018 15:01, Sean Young wrote: > On Thu, Feb 22, 2018 at 02:01:16PM +0200, Claudiu Beznea wrote: >> Add PWM mode to pwm_config() function. The drivers which uses pwm_config() >> were adapted to this change. >> >> Signed-off-by: Claudiu Beznea >> -

Re: [PATCH v3 06/10] pwm: add PWM modes

2018-02-22 Thread Claudiu Beznea
On 22.02.2018 19:28, Andy Shevchenko wrote: > On Thu, Feb 22, 2018 at 2:01 PM, Claudiu Beznea > wrote: >> Add PWM normal and complementary modes. > >> +- PWM_DTMODE_COMPLEMENTARY: PWM complementary working mode (for PWM >> +channels two outputs); if not specified,

Re: [PATCH v3 01/10] pwm: extend PWM framework with PWM modes

2018-02-26 Thread Claudiu Beznea
I'll rebase it on latest for-next in next version. Thank you, Claudiu Beznea On 24.02.2018 22:49, kbuild test robot wrote: > Hi Claudiu, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on pwm/for-next] > [also build test WA

Re: [PATCH v3 05/10] pwm: add PWM mode to pwm_config()

2018-02-26 Thread Claudiu Beznea
On 26.02.2018 11:57, Jani Nikula wrote: > On Thu, 22 Feb 2018, Daniel Thompson wrote: >> On Thu, Feb 22, 2018 at 02:01:16PM +0200, Claudiu Beznea wrote: >>> Add PWM mode to pwm_config() function. The drivers which uses pwm_config() >>> were adapted to this change. >

Re: [PATCH v3 05/10] pwm: add PWM mode to pwm_config()

2018-02-27 Thread Claudiu Beznea
On 27.02.2018 12:54, Daniel Thompson wrote: > On Mon, Feb 26, 2018 at 04:24:15PM +0200, Claudiu Beznea wrote: >> On 26.02.2018 11:57, Jani Nikula wrote: >>> On Thu, 22 Feb 2018, Daniel Thompson wrote: >>>> On Thu, Feb 22, 2018 at 02:01:16PM +0200, Claudiu Bezne

Re: [PATCH v3 05/10] pwm: add PWM mode to pwm_config()

2018-02-27 Thread Claudiu Beznea
On 27.02.2018 17:38, Daniel Thompson wrote: > On Tue, Feb 27, 2018 at 01:40:58PM +0200, Claudiu Beznea wrote: >> On 27.02.2018 12:54, Daniel Thompson wrote: >>> On Mon, Feb 26, 2018 at 04:24:15PM +0200, Claudiu Beznea wrote: >>>> On 26.02.2018 11:57, Jani Nikula wr

Re: [PATCH v3 05/10] pwm: add PWM mode to pwm_config()

2018-03-02 Thread Claudiu Beznea
On 28.02.2018 21:44, Thierry Reding wrote: > On Thu, Feb 22, 2018 at 02:01:16PM +0200, Claudiu Beznea wrote: >> Add PWM mode to pwm_config() function. The drivers which uses pwm_config() >> were adapted to this change. >> >> Signed-off-by: Claudiu Beznea >> -

Re: [PATCH v3 05/10] pwm: add PWM mode to pwm_config()

2018-03-02 Thread Claudiu Beznea
switch on atomic PWM, on the controller side you can check for drivers that registers apply function at probe time. Regarding the PWM users, you can look for pwm_apply_state() (drivers/hwmon/pwm-fan.c or drivers/input/misc/pwm-beeper.c are some examples). Thierry, please correct me if I'm wrong.

Re: [RESEND PATCH v5 1/9] pwm: extend PWM framework with PWM modes

2018-10-19 Thread Claudiu Beznea
On 18.10.2018 18:32, Thierry Reding wrote: > On Wed, Oct 17, 2018 at 12:42:00PM +, claudiu.bez...@microchip.com wrote: >> On 16.10.2018 15:25, Thierry Reding wrote: >>> On Tue, Aug 28, 2018 at 04:01:18PM +0300, Claudiu Beznea wrote: > [...] >>>> +const char

Re: [RESEND PATCH v5 0/9] extend PWM framework to support PWM modes

2018-10-19 Thread Claudiu Beznea
Thierry, >>>> >>>> On 28/08/2018 at 15:01, Claudiu Beznea wrote: >>>>> Hi, >>>>> >>>>> Please give feedback on these patches which extends the PWM framework in >>>>> order to support multiple PWM modes of operations. Thi