linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Microchip TCB Capture driver
@ 2020-04-15 13:04 Kamel Bouhara
  2020-04-15 13:04 ` [PATCH v3 1/3] ARM: at91: add atmel tcb capabilities Kamel Bouhara
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kamel Bouhara @ 2020-04-15 13:04 UTC (permalink / raw)
  To: William Breathitt Gray, Rob Herring, Mark Rutland, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, linux-arm-kernel
  Cc: linux-iio, devicetree, Kamel Bouhara, Thomas Petazzoni, linux-input

Hello,

Here is a new counter driver to support Microchip 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 v3:
 - Updated the brand name: s/atmel/microchip/.
 - Added missing kernel doc for new elements introduced in structure
   atmel_tcb_config.
 - Removed useless blank line
 - Added an explicit clock removing path using devm_add_action_or_reset

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.
 - Fixed errors reported by dt_binding_check


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

 .../counter/microchip-tcb-capture.yaml        |  33 ++
 drivers/counter/Kconfig                       |  11 +
 drivers/counter/Makefile                      |   1 +
 drivers/counter/microchip-tcb-capture.c       | 397 ++++++++++++++++++
 include/soc/at91/atmel_tcb.h                  |   5 +
 5 files changed, 447 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/counter/microchip-tcb-capture.yaml
 create mode 100644 drivers/counter/microchip-tcb-capture.c

-- 
2.25.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-04-20 22:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 13:04 [PATCH v3 0/3] Microchip TCB Capture driver Kamel Bouhara
2020-04-15 13:04 ` [PATCH v3 1/3] ARM: at91: add atmel tcb capabilities Kamel Bouhara
2020-04-17 13:56   ` William Breathitt Gray
2020-04-18 18:23     ` Jonathan Cameron
2020-04-18 23:44       ` Alexandre Belloni
2020-04-15 13:04 ` [PATCH v3 2/3] dt-bindings: counter: microchip-tcb-capture counter Kamel Bouhara
2020-04-17 13:58   ` William Breathitt Gray
2020-04-18 18:24     ` Jonathan Cameron
2020-04-20 22:21   ` Rob Herring
2020-04-15 13:04 ` [PATCH v3 3/3] counter: Add microchip TCB capture counter Kamel Bouhara
2020-04-17 14:06   ` William Breathitt Gray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).