linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] mfd: stm32-timers: Make register definition more flexible
@ 2024-06-14  8:10 Uwe Kleine-König
  2024-06-14  8:10 ` [PATCH 1/4] mfd: stm32-timers: Unify alignment of register definition Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2024-06-14  8:10 UTC (permalink / raw)
  To: Fabrice Gasnier, William Breathitt Gray, Maxime Coquelin,
	Alexandre Torgue, Lee Jones
  Cc: linux-iio, linux-pwm, linux-stm32, linux-arm-kernel, linux-kernel

Hello,

I'm not sure that everyone will agree the changes in here are
worthwhile, but I like them. One surprise is that this makes the
generated code for drivers/pwm/pwm-stm32.c more compact (see patch 4 for
a bloat-o-meter statistic). I'm surprised because it boils down to gcc
not noticing that

	mask = ((((1UL))) << (1 + 4 * ((1) - 1))) << (ch * 4);

is equivalent to

	mask = ((((1UL))) << (1 + 4 * ((ch + 1) - 1)));

.

I'm unsure what to suggest for how to merge this series. I have some
further changes on my agenda to drivers/pwm/pwm-stm32.c, so either
merging this via pwm or a stable branch would be great for me.

Best regards
Uwe

Uwe Kleine-König (4):
  mfd: stm32-timers: Unify alignment of register definition
  mfd: stm32-timers: Add some register definitions with a parameter
  mfd: stm32-timers: Drop TIM_DIER_CC_IE(x) in favour of
    TIM_DIER_CCxIE(x)
  pwm-stm32: Make use of parametrised register definitions

 drivers/counter/stm32-timer-cnt.c |   4 +-
 drivers/pwm/pwm-stm32.c           |  22 ++--
 include/linux/mfd/stm32-timers.h  | 179 ++++++++++++++++--------------
 3 files changed, 107 insertions(+), 98 deletions(-)

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
-- 
2.43.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-06-18 17:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14  8:10 [PATCH 0/4] mfd: stm32-timers: Make register definition more flexible Uwe Kleine-König
2024-06-14  8:10 ` [PATCH 1/4] mfd: stm32-timers: Unify alignment of register definition Uwe Kleine-König
2024-06-18 17:46   ` Thorsten Scherer
2024-06-14  8:10 ` [PATCH 2/4] mfd: stm32-timers: Add some register definitions with a parameter Uwe Kleine-König
2024-06-14  8:10 ` [PATCH 3/4] mfd: stm32-timers: Drop TIM_DIER_CC_IE(x) in favour of TIM_DIER_CCxIE(x) Uwe Kleine-König
2024-06-14  9:31   ` Lee Jones
2024-06-16 13:52     ` Uwe Kleine-König
2024-06-16  8:46   ` William Breathitt Gray
2024-06-14  8:10 ` [PATCH 4/4] pwm-stm32: Make use of parametrised register definitions Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).