2020-03-17 12:34:05

by Oleksandr Suvorov

[permalink] [raw]
Subject: [RFC PATCH 4/7] dt-bindings: pwm: add description of PWM polarity

Move the description of the PWM signal polarity from
<linux/pwm.h>, prepare for removing the polarity
definition from <linux/pwm.h>.

Signed-off-by: Oleksandr Suvorov <[email protected]>
---

include/dt-bindings/pwm/pwm.h | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/include/dt-bindings/pwm/pwm.h b/include/dt-bindings/pwm/pwm.h
index 6b58caa6385e..c07da2088a61 100644
--- a/include/dt-bindings/pwm/pwm.h
+++ b/include/dt-bindings/pwm/pwm.h
@@ -10,7 +10,16 @@
#ifndef _DT_BINDINGS_PWM_PWM_H
#define _DT_BINDINGS_PWM_PWM_H

+/**
+ * a high signal for the duration of the duty-cycle, followed by a low signal
+ * for the remainder of the pulse period.
+ */
#define PWM_POLARITY_NORMAL 0
+
+/**
+ * a low signal for the duration of the duty-cycle, followed by a high signal
+ * for the remainder of the pulse period.
+ */
#define PWM_POLARITY_INVERTED (1 << 0)

#endif
--
2.24.1


2020-03-17 23:01:55

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [RFC PATCH 4/7] dt-bindings: pwm: add description of PWM polarity

Hi Oleksandr,

Thank you for the patch.

On Tue, Mar 17, 2020 at 02:32:28PM +0200, Oleksandr Suvorov wrote:
> Move the description of the PWM signal polarity from
> <linux/pwm.h>, prepare for removing the polarity
> definition from <linux/pwm.h>.
>
> Signed-off-by: Oleksandr Suvorov <[email protected]>
> ---
>
> include/dt-bindings/pwm/pwm.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/include/dt-bindings/pwm/pwm.h b/include/dt-bindings/pwm/pwm.h
> index 6b58caa6385e..c07da2088a61 100644
> --- a/include/dt-bindings/pwm/pwm.h
> +++ b/include/dt-bindings/pwm/pwm.h
> @@ -10,7 +10,16 @@
> #ifndef _DT_BINDINGS_PWM_PWM_H
> #define _DT_BINDINGS_PWM_PWM_H
>
> +/**
> + * a high signal for the duration of the duty-cycle, followed by a low signal
> + * for the remainder of the pulse period.
> + */

Last time I checked, kernedoc didn't support documenting macros (enums
are supported).

> #define PWM_POLARITY_NORMAL 0
> +
> +/**
> + * a low signal for the duration of the duty-cycle, followed by a high signal
> + * for the remainder of the pulse period.
> + */
> #define PWM_POLARITY_INVERTED (1 << 0)
>
> #endif

--
Regards,

Laurent Pinchart

2020-03-18 11:39:41

by Oleksandr Suvorov

[permalink] [raw]
Subject: Re: [RFC PATCH 4/7] dt-bindings: pwm: add description of PWM polarity

On Wed, Mar 18, 2020 at 1:02 AM Laurent Pinchart
<[email protected]> wrote:
>
> Hi Oleksandr,
>
> Thank you for the patch.
>
> On Tue, Mar 17, 2020 at 02:32:28PM +0200, Oleksandr Suvorov wrote:
> > Move the description of the PWM signal polarity from
> > <linux/pwm.h>, prepare for removing the polarity
> > definition from <linux/pwm.h>.
> >
> > Signed-off-by: Oleksandr Suvorov <[email protected]>
> > ---
> >
> > include/dt-bindings/pwm/pwm.h | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/include/dt-bindings/pwm/pwm.h b/include/dt-bindings/pwm/pwm.h
> > index 6b58caa6385e..c07da2088a61 100644
> > --- a/include/dt-bindings/pwm/pwm.h
> > +++ b/include/dt-bindings/pwm/pwm.h
> > @@ -10,7 +10,16 @@
> > #ifndef _DT_BINDINGS_PWM_PWM_H
> > #define _DT_BINDINGS_PWM_PWM_H
> >
> > +/**
> > + * a high signal for the duration of the duty-cycle, followed by a low signal
> > + * for the remainder of the pulse period.
> > + */
>
> Last time I checked, kernedoc didn't support documenting macros (enums
> are supported).

That's why I dropped the kerneldoc tags leaving the descriptions only.

> > #define PWM_POLARITY_NORMAL 0
> > +
> > +/**
> > + * a low signal for the duration of the duty-cycle, followed by a high signal
> > + * for the remainder of the pulse period.
> > + */
> > #define PWM_POLARITY_INVERTED (1 << 0)
> >
> > #endif
>
> --
> Regards,
>
> Laurent Pinchart

--
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00

2020-03-18 12:31:18

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [RFC PATCH 4/7] dt-bindings: pwm: add description of PWM polarity

Hi Oleksandr,

On Wed, Mar 18, 2020 at 01:37:00PM +0200, Oleksandr Suvorov wrote:
> On Wed, Mar 18, 2020 at 1:02 AM Laurent Pinchart wrote:
> > On Tue, Mar 17, 2020 at 02:32:28PM +0200, Oleksandr Suvorov wrote:
> > > Move the description of the PWM signal polarity from
> > > <linux/pwm.h>, prepare for removing the polarity
> > > definition from <linux/pwm.h>.
> > >
> > > Signed-off-by: Oleksandr Suvorov <[email protected]>
> > > ---
> > >
> > > include/dt-bindings/pwm/pwm.h | 9 +++++++++
> > > 1 file changed, 9 insertions(+)
> > >
> > > diff --git a/include/dt-bindings/pwm/pwm.h b/include/dt-bindings/pwm/pwm.h
> > > index 6b58caa6385e..c07da2088a61 100644
> > > --- a/include/dt-bindings/pwm/pwm.h
> > > +++ b/include/dt-bindings/pwm/pwm.h
> > > @@ -10,7 +10,16 @@
> > > #ifndef _DT_BINDINGS_PWM_PWM_H
> > > #define _DT_BINDINGS_PWM_PWM_H
> > >
> > > +/**
> > > + * a high signal for the duration of the duty-cycle, followed by a low signal
> > > + * for the remainder of the pulse period.
> > > + */
> >
> > Last time I checked, kernedoc didn't support documenting macros (enums
> > are supported).
>
> That's why I dropped the kerneldoc tags leaving the descriptions only.

But you forgot to replace /** with /* :-) Sorry for not being clear
about what I meant.

> > > #define PWM_POLARITY_NORMAL 0
> > > +
> > > +/**
> > > + * a low signal for the duration of the duty-cycle, followed by a high signal
> > > + * for the remainder of the pulse period.
> > > + */
> > > #define PWM_POLARITY_INVERTED (1 << 0)
> > >
> > > #endif

--
Regards,

Laurent Pinchart

2020-03-18 12:36:56

by Oleksandr Suvorov

[permalink] [raw]
Subject: Re: [RFC PATCH 4/7] dt-bindings: pwm: add description of PWM polarity

On Wed, Mar 18, 2020 at 2:30 PM Laurent Pinchart
<[email protected]> wrote:
>
> Hi Oleksandr,
>
> On Wed, Mar 18, 2020 at 01:37:00PM +0200, Oleksandr Suvorov wrote:
> > On Wed, Mar 18, 2020 at 1:02 AM Laurent Pinchart wrote:
> > > On Tue, Mar 17, 2020 at 02:32:28PM +0200, Oleksandr Suvorov wrote:
> > > > Move the description of the PWM signal polarity from
> > > > <linux/pwm.h>, prepare for removing the polarity
> > > > definition from <linux/pwm.h>.
> > > >
> > > > Signed-off-by: Oleksandr Suvorov <[email protected]>
> > > > ---
> > > >
> > > > include/dt-bindings/pwm/pwm.h | 9 +++++++++
> > > > 1 file changed, 9 insertions(+)
> > > >
> > > > diff --git a/include/dt-bindings/pwm/pwm.h b/include/dt-bindings/pwm/pwm.h
> > > > index 6b58caa6385e..c07da2088a61 100644
> > > > --- a/include/dt-bindings/pwm/pwm.h
> > > > +++ b/include/dt-bindings/pwm/pwm.h
> > > > @@ -10,7 +10,16 @@
> > > > #ifndef _DT_BINDINGS_PWM_PWM_H
> > > > #define _DT_BINDINGS_PWM_PWM_H
> > > >
> > > > +/**
> > > > + * a high signal for the duration of the duty-cycle, followed by a low signal
> > > > + * for the remainder of the pulse period.
> > > > + */
> > >
> > > Last time I checked, kernedoc didn't support documenting macros (enums
> > > are supported).
> >
> > That's why I dropped the kerneldoc tags leaving the descriptions only.
>
> But you forgot to replace /** with /* :-) Sorry for not being clear
> about what I meant.

Ah, yes, thanks! I'll fix it in the next version :)

>
> > > > #define PWM_POLARITY_NORMAL 0
> > > > +
> > > > +/**
> > > > + * a low signal for the duration of the duty-cycle, followed by a high signal
> > > > + * for the remainder of the pulse period.
> > > > + */
> > > > #define PWM_POLARITY_INVERTED (1 << 0)
> > > >
> > > > #endif
>
> --
> Regards,
>
> Laurent Pinchart



--
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00