[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <vhbq2mpiervp5iwsfu2cbcvrxpfq6mr63uqyonyc7xt75jponi@h37z6g43ohdj>
Date: Sun, 16 Jun 2024 15:52:13 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Lee Jones <lee@...nel.org>
Cc: Fabrice Gasnier <fabrice.gasnier@...s.st.com>,
William Breathitt Gray <wbg@...nel.org>, Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>, linux-iio@...r.kernel.org, linux-pwm@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] mfd: stm32-timers: Drop TIM_DIER_CC_IE(x) in favour
of TIM_DIER_CCxIE(x)
Hello Lee,
On Fri, Jun 14, 2024 at 10:31:24AM +0100, Lee Jones wrote:
> On Fri, 14 Jun 2024, Uwe Kleine-König wrote:
>
> > These two defines have the same purpose and this change doesn't
> > introduce any differences in drivers/counter/stm32-timer-cnt.o.
> >
> > The only difference between the two is that
> >
> > TIM_DIER_CC_IE(1) == TIM_DIER_CC2IE
> >
> > while
> >
> > TIM_DIER_CCxIE(1) == TIM_DIER_CC1IE
> >
> > . That makes it necessary to have an explicit "+ 1" in the user code,
> > but IMHO this is a good thing as this is the code locatation that
> > "knows" that for software channel 1 you have to use TIM_DIER_CC2IE
> > (because software guys start counting at 0, while the relevant hardware
> > designer started at 1).
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...libre.com>
> > ---
> > drivers/counter/stm32-timer-cnt.c | 4 ++--
>
> The subject should be renamed.
I guess you mean it should be something like:
counter: stm32-timer-cnt: Drop TIM_DIER_CC_IE(x) in favour of TIM_DIER_CCxIE(x + 1)
?
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists