public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Breathitt Gray <william.gray@linaro.org>
To: Dharma Balasubiramani <dharma.b@microchip.com>
Cc: kamel.bouhara@bootlin.com, linux-arm-kernel@lists.infradead.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	balamanikandan.gunasundar@microchip.com,
	hari.prasathge@microchip.com, nicolas.ferre@microchip.com
Subject: Re: [linux][PATCH] counter: microchip-tcb-capture: Fix the use of internal GCLK logic
Date: Tue, 5 Sep 2023 12:32:16 -0400	[thread overview]
Message-ID: <ZPdYEC25YMSA0GEq@ishi> (raw)
In-Reply-To: <20230905100835.315024-1-dharma.b@microchip.com>

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

On Tue, Sep 05, 2023 at 03:38:35PM +0530, Dharma Balasubiramani wrote:
> 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

Applied to counter-fixes as commit df8fdd01c98b.

Thanks,

William Breathitt Gray

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2023-09-05 17:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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=ZPdYEC25YMSA0GEq@ishi \
    --to=william.gray@linaro.org \
    --cc=balamanikandan.gunasundar@microchip.com \
    --cc=dharma.b@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=nicolas.ferre@microchip.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox