mbox series

[v2,0/3] Atmel TCB capture driver

Message ID 20200409141401.321222-1-kamel.bouhara@bootlin.com (mailing list archive)
Headers show
Series Atmel TCB capture driver | expand

Message

Kamel BOUHARA April 9, 2020, 2:13 p.m. UTC
Hello,

Here is a new counter driver to support Atmel TCB capture devices.

Each SoC has two TCB blocks, each one including three independent
channels.The following series adds support for two counter modes:
increase and quadrature decoder.

As for the atmel clocksource and pwm, the counter driver needs to fill
some tcb capabilities in order to operate with the right configuration.
This is achieved in first patch of this series.

Please feel free to comment.

Cheers,

Changes from v2:
 - Fixed first patch not applying on mainline
 - Updated return code to -EINVAL when user is requesting qdec mode on
   a counter device not supporting it.
 - Added an error case returning -EINVAL when action edge is performed in
   qdec mode.
 - Removed no need to explicity setting ops to NULL from static struct as
   it is the default value.
 - Changed confusing code by using snprintf for the sake of clarity.
 - Changed code to use ARRAY_SIZE so that future reviewers will know
   that num_counts matches what's in the atmel_tc_count array without
   having to check so themselves.

Kamel Bouhara (3):
  ARM: at91: add atmel tcb capabilities
  dt-bindings: counter: atmel-tcb-capture counter
  counter: Add atmel TCB capture counter

 .../bindings/counter/atmel-tcb-capture.yaml   |  35 ++
 drivers/counter/Kconfig                       |  11 +
 drivers/counter/Makefile                      |   1 +
 drivers/counter/atmel-tcb-capture.c           | 394 ++++++++++++++++++
 include/soc/at91/atmel_tcb.h                  |   2 +
 5 files changed, 443 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/counter/atmel-tcb-capture.yaml
 create mode 100644 drivers/counter/atmel-tcb-capture.c

--
2.25.0

Comments

William Breathitt Gray April 11, 2020, 4:01 p.m. UTC | #1
On Thu, Apr 09, 2020 at 04:13:58PM +0200, Kamel Bouhara wrote:
> Hello,
> 
> Here is a new counter driver to support Atmel TCB capture devices.
> 
> Each SoC has two TCB blocks, each one including three independent
> channels.The following series adds support for two counter modes:
> increase and quadrature decoder.
> 
> As for the atmel clocksource and pwm, the counter driver needs to fill
> some tcb capabilities in order to operate with the right configuration.
> This is achieved in first patch of this series.
> 
> Please feel free to comment.
> 
> Cheers,
> 
> Changes from v2:
>  - Fixed first patch not applying on mainline
>  - Updated return code to -EINVAL when user is requesting qdec mode on
>    a counter device not supporting it.
>  - Added an error case returning -EINVAL when action edge is performed in
>    qdec mode.
>  - Removed no need to explicity setting ops to NULL from static struct as
>    it is the default value.
>  - Changed confusing code by using snprintf for the sake of clarity.
>  - Changed code to use ARRAY_SIZE so that future reviewers will know
>    that num_counts matches what's in the atmel_tc_count array without
>    having to check so themselves.
> 
> Kamel Bouhara (3):
>   ARM: at91: add atmel tcb capabilities
>   dt-bindings: counter: atmel-tcb-capture counter
>   counter: Add atmel TCB capture counter
> 
>  .../bindings/counter/atmel-tcb-capture.yaml   |  35 ++
>  drivers/counter/Kconfig                       |  11 +
>  drivers/counter/Makefile                      |   1 +
>  drivers/counter/atmel-tcb-capture.c           | 394 ++++++++++++++++++
>  include/soc/at91/atmel_tcb.h                  |   2 +
>  5 files changed, 443 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/counter/atmel-tcb-capture.yaml
>  create mode 100644 drivers/counter/atmel-tcb-capture.c
> 
> --
> 2.25.0

Thanks Kamel, this version applies nicely now. Fix the error messages
Rob Herring pointed out in the dt-bindings patch and I should be able to
sign off on these.

William Breathitt Gray