From: Dharma Balasubiramani <dharma.b@microchip.com> To: <kamel.bouhara@bootlin.com>, <william.gray@linaro.org>, <linux-arm-kernel@lists.infradead.org>, <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org> Cc: hari.prasathge@microchip.com, balamanikandan.gunasundar@microchip.com, Dharma Balasubiramani <dharma.b@microchip.com> Subject: [linux][PATCH] counter: microchip-tcb-capture: Fix the use of internal GCLK logic Date: Tue, 5 Sep 2023 15:38:35 +0530 [thread overview] Message-ID: <20230905100835.315024-1-dharma.b@microchip.com> (raw) As per the datasheet, the clock selection Bits 2:0 – TCCLKS[2:0] should be set to 0 while using the internal GCLK (TIMER_CLOCK1). Fixes: 106b104137fd ("counter: Add microchip TCB capture counter") Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> --- drivers/counter/microchip-tcb-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c index e2d1dc6ca668..c7af13aca36c 100644 --- a/drivers/counter/microchip-tcb-capture.c +++ b/drivers/counter/microchip-tcb-capture.c @@ -98,7 +98,7 @@ static int mchp_tc_count_function_write(struct counter_device *counter, priv->qdec_mode = 0; /* Set highest rate based on whether soc has gclk or not */ bmr &= ~(ATMEL_TC_QDEN | ATMEL_TC_POSEN); - if (priv->tc_cfg->has_gclk) + if (!priv->tc_cfg->has_gclk) cmr |= ATMEL_TC_TIMER_CLOCK2; else cmr |= ATMEL_TC_TIMER_CLOCK1; -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Dharma Balasubiramani <dharma.b@microchip.com> To: <kamel.bouhara@bootlin.com>, <william.gray@linaro.org>, <linux-arm-kernel@lists.infradead.org>, <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org> Cc: <balamanikandan.gunasundar@microchip.com>, <hari.prasathge@microchip.com>, <nicolas.ferre@microchip.com>, Dharma Balasubiramani <dharma.b@microchip.com> Subject: [linux][PATCH] counter: microchip-tcb-capture: Fix the use of internal GCLK logic Date: Tue, 5 Sep 2023 15:38:35 +0530 [thread overview] Message-ID: <20230905100835.315024-1-dharma.b@microchip.com> (raw) As per the datasheet, the clock selection Bits 2:0 – TCCLKS[2:0] should be set to 0 while using the internal GCLK (TIMER_CLOCK1). Fixes: 106b104137fd ("counter: Add microchip TCB capture counter") Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> --- drivers/counter/microchip-tcb-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c index e2d1dc6ca668..c7af13aca36c 100644 --- a/drivers/counter/microchip-tcb-capture.c +++ b/drivers/counter/microchip-tcb-capture.c @@ -98,7 +98,7 @@ static int mchp_tc_count_function_write(struct counter_device *counter, priv->qdec_mode = 0; /* Set highest rate based on whether soc has gclk or not */ bmr &= ~(ATMEL_TC_QDEN | ATMEL_TC_POSEN); - if (priv->tc_cfg->has_gclk) + if (!priv->tc_cfg->has_gclk) cmr |= ATMEL_TC_TIMER_CLOCK2; else cmr |= ATMEL_TC_TIMER_CLOCK1; -- 2.25.1
next reply other threads:[~2023-09-05 10:09 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-05 10:08 Dharma Balasubiramani [this message] 2023-09-05 10:08 ` [linux][PATCH] counter: microchip-tcb-capture: Fix the use of internal GCLK logic Dharma Balasubiramani 2023-09-05 16:32 ` William Breathitt Gray 2023-09-05 16:32 ` William Breathitt Gray
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230905100835.315024-1-dharma.b@microchip.com \ --to=dharma.b@microchip.com \ --cc=balamanikandan.gunasundar@microchip.com \ --cc=hari.prasathge@microchip.com \ --cc=kamel.bouhara@bootlin.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-iio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=william.gray@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.