[PATCH 3/4] mfd: stm32-timers: Drop TIM_DIER_CC_IE(x) in favour of TIM_DIER_CCxIE(x)
William Breathitt Gray
wbg at kernel.org
Sun Jun 16 01:46:45 PDT 2024
On Fri, Jun 14, 2024 at 10:10:13AM +0200, 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 at baylibre.com>
I concur with Lee Jones that the subject should be renamed. Regardless,
here's my ack for the code changes.
Acked-by: William Breathitt Gray <wbg at kernel.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240616/ab9cdbdd/attachment.sig>
More information about the linux-arm-kernel
mailing list