diff mbox series

[v3,1/3] ARM: at91: add atmel tcb capabilities

Message ID 20200415130455.2222019-2-kamel.bouhara@bootlin.com (mailing list archive)
State Superseded
Headers show
Series Microchip TCB Capture driver | expand

Commit Message

Kamel BOUHARA April 15, 2020, 1:04 p.m. UTC
Some atmel socs have extra tcb capabilities that allow using a generic
clock source or enabling a quadrature decoder.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
Changes from v3:
 - Added missing kernel doc for new elements introduced in structure
   atmel_tcb_config.

Changes from v2:
 - Fixed first patch not applying on mainline

 include/soc/at91/atmel_tcb.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

William Breathitt Gray April 17, 2020, 1:56 p.m. UTC | #1
On Wed, Apr 15, 2020 at 03:04:53PM +0200, Kamel Bouhara wrote:
> Some atmel socs have extra tcb capabilities that allow using a generic
> clock source or enabling a quadrature decoder.
> 
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>

> ---
> Changes from v3:
>  - Added missing kernel doc for new elements introduced in structure
>    atmel_tcb_config.
> 
> Changes from v2:
>  - Fixed first patch not applying on mainline
> 
>  include/soc/at91/atmel_tcb.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/soc/at91/atmel_tcb.h b/include/soc/at91/atmel_tcb.h
> index c3c7200ce151..1d7071dc0bca 100644
> --- a/include/soc/at91/atmel_tcb.h
> +++ b/include/soc/at91/atmel_tcb.h
> @@ -36,9 +36,14 @@ struct clk;
>  /**
>   * struct atmel_tcb_config - SoC data for a Timer/Counter Block
>   * @counter_width: size in bits of a timer counter register
> + * @has_gclk: boolean indicating if a timer counter has a generic clock
> + * @has_qdec: boolean indicating if a timer counter has a quadrature
> + * decoder.
>   */
>  struct atmel_tcb_config {
>  	size_t	counter_width;
> +	bool    has_gclk;
> +	bool    has_qdec;
>  };
>  
>  /**
> -- 
> 2.25.0
>
Jonathan Cameron April 18, 2020, 6:23 p.m. UTC | #2
On Fri, 17 Apr 2020 09:56:35 -0400
William Breathitt Gray <vilhelm.gray@gmail.com> wrote:

> On Wed, Apr 15, 2020 at 03:04:53PM +0200, Kamel Bouhara wrote:
> > Some atmel socs have extra tcb capabilities that allow using a generic
> > clock source or enabling a quadrature decoder.
> > 
> > Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>  
> 
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> 
I'll need an appropriate ack from at91 maintainers for this bit

Thanks,

Jonathan

> > ---
> > Changes from v3:
> >  - Added missing kernel doc for new elements introduced in structure
> >    atmel_tcb_config.
> > 
> > Changes from v2:
> >  - Fixed first patch not applying on mainline
> > 
> >  include/soc/at91/atmel_tcb.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/include/soc/at91/atmel_tcb.h b/include/soc/at91/atmel_tcb.h
> > index c3c7200ce151..1d7071dc0bca 100644
> > --- a/include/soc/at91/atmel_tcb.h
> > +++ b/include/soc/at91/atmel_tcb.h
> > @@ -36,9 +36,14 @@ struct clk;
> >  /**
> >   * struct atmel_tcb_config - SoC data for a Timer/Counter Block
> >   * @counter_width: size in bits of a timer counter register
> > + * @has_gclk: boolean indicating if a timer counter has a generic clock
> > + * @has_qdec: boolean indicating if a timer counter has a quadrature
> > + * decoder.
> >   */
> >  struct atmel_tcb_config {
> >  	size_t	counter_width;
> > +	bool    has_gclk;
> > +	bool    has_qdec;
> >  };
> >  
> >  /**
> > -- 
> > 2.25.0
> >
Alexandre Belloni April 18, 2020, 11:44 p.m. UTC | #3
On 18/04/2020 19:23:27+0100, Jonathan Cameron wrote:
> On Fri, 17 Apr 2020 09:56:35 -0400
> William Breathitt Gray <vilhelm.gray@gmail.com> wrote:
> 
> > On Wed, Apr 15, 2020 at 03:04:53PM +0200, Kamel Bouhara wrote:
> > > Some atmel socs have extra tcb capabilities that allow using a generic
> > > clock source or enabling a quadrature decoder.
> > > 
> > > Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>  
> > 
> > Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> > 
> I'll need an appropriate ack from at91 maintainers for this bit
> 

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
diff mbox series

Patch

diff --git a/include/soc/at91/atmel_tcb.h b/include/soc/at91/atmel_tcb.h
index c3c7200ce151..1d7071dc0bca 100644
--- a/include/soc/at91/atmel_tcb.h
+++ b/include/soc/at91/atmel_tcb.h
@@ -36,9 +36,14 @@  struct clk;
 /**
  * struct atmel_tcb_config - SoC data for a Timer/Counter Block
  * @counter_width: size in bits of a timer counter register
+ * @has_gclk: boolean indicating if a timer counter has a generic clock
+ * @has_qdec: boolean indicating if a timer counter has a quadrature
+ * decoder.
  */
 struct atmel_tcb_config {
 	size_t	counter_width;
+	bool    has_gclk;
+	bool    has_qdec;
 };
 
 /**