[PATCH v3 01/10] counter: stm32-timer-cnt: rename quadrature signal

Fabrice Gasnier posted 10 patches 1 year, 12 months ago
There is a newer version of this series
[PATCH v3 01/10] counter: stm32-timer-cnt: rename quadrature signal
Posted by Fabrice Gasnier 1 year, 12 months ago
Drop the Quadrature convention in the signal name. On stm32-timer:
- Quadrature A signal corresponds to timer input ch1, hence "Channel 1"
- Quadrature B signal corresponds to timer input ch2, hence "Channel 2".
So name these signals after their channel. I suspect it referred to the
(unique) quadrature counter support earlier, but the physical input
really is CH1/CH2. This will be easier to support other counter modes.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
Changes in v2:
- Drop the "Quadrature" convention from the signal name, as suggested by
  William
---
 drivers/counter/stm32-timer-cnt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
index 6206d2dc3d47..36d812ddf162 100644
--- a/drivers/counter/stm32-timer-cnt.c
+++ b/drivers/counter/stm32-timer-cnt.c
@@ -279,11 +279,11 @@ static const struct counter_ops stm32_timer_cnt_ops = {
 static struct counter_signal stm32_signals[] = {
 	{
 		.id = 0,
-		.name = "Channel 1 Quadrature A"
+		.name = "Channel 1"
 	},
 	{
 		.id = 1,
-		.name = "Channel 1 Quadrature B"
+		.name = "Channel 2"
 	}
 };
 
-- 
2.25.1
Re: [PATCH v3 01/10] counter: stm32-timer-cnt: rename quadrature signal
Posted by William Breathitt Gray 1 year, 11 months ago
On Wed, Dec 20, 2023 at 03:57:17PM +0100, Fabrice Gasnier wrote:
> Drop the Quadrature convention in the signal name. On stm32-timer:
> - Quadrature A signal corresponds to timer input ch1, hence "Channel 1"
> - Quadrature B signal corresponds to timer input ch2, hence "Channel 2".
> So name these signals after their channel. I suspect it referred to the
> (unique) quadrature counter support earlier, but the physical input
> really is CH1/CH2. This will be easier to support other counter modes.
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>

Reviewed-by: William Breathitt Gray <william.gray@linaro.org>