Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/5] pwm: fix overflow, truncation and error-path reference leaks
@ 2026-11-06 16:07 shao.mingyin
  2026-11-06 16:07 ` [PATCH 1/5] pwm: dwc: Fix 32 bit overflow when computing duty/period in get_state shao.mingyin
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: shao.mingyin @ 2026-11-06 16:07 UTC (permalink / raw)
  To: ukleinek, linux-pwm
  Cc: laurent.pinchart, heiko, ben.dooks, benjamin.larsson, nuno.sa,
	xiaoning.wang, linux-kernel, linux-gpio, linux-arm-kernel,
	linux-rockchip

Five independent defects in four PWM drivers, found while reviewing
linux-next next-20261030.  Two are 32-bit overflows that make the
hardware readback report a wrong period or duty cycle, one is a 16-bit
truncation of the on/off counters, and two are missing clock or
runtime-PM cleanups on error paths.  All are reachable from the PWM
sysfs interface or from the hardware readback path.

The series is ordered by impact and is independent patch-by-patch; each
patch applies on its own and taking a subset is fine.  Patches 1 and 4
both touch pwm-dwc-core.c but different callbacks (dwc_pwm_get_state()
and dwc_pwm_apply()), so they can be applied separately.

  1/5 pwm: dwc: Fix 32 bit overflow when computing duty/period in get_state
  2/5 pwm: airoha: Fix 32 bit overflow when converting duty ticks to ns
  3/5 pwm: adp5585: Clamp on/off counters to the 16 bit register range
  4/5 pwm: dwc: Balance the runtime PM reference when configuring fails
  5/5 pwm: rockchip: Fix pclk leak in get_state error path

Shao Mingyin (5):
  pwm: dwc: Fix 32 bit overflow when computing duty/period in get_state
  pwm: airoha: Fix 32 bit overflow when converting duty ticks to ns
  pwm: adp5585: Clamp on/off counters to the 16 bit register range
  pwm: dwc: Balance the runtime PM reference when configuring fails
  pwm: rockchip: Fix pclk leak in get_state error path

 drivers/pwm/pwm-adp5585.c  |  7 +++++++
 drivers/pwm/pwm-airoha.c   |  8 ++++----
 drivers/pwm/pwm-dwc-core.c | 12 ++++++++----
 drivers/pwm/pwm-rockchip.c |  6 +++++-
 4 files changed, 24 insertions(+), 9 deletions(-)

---
base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c

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

end of thread, other threads:[~2026-11-06 16:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06 16:07 [PATCH 0/5] pwm: fix overflow, truncation and error-path reference leaks shao.mingyin
2026-11-06 16:07 ` [PATCH 1/5] pwm: dwc: Fix 32 bit overflow when computing duty/period in get_state shao.mingyin
2026-11-06 16:07 ` [PATCH 2/5] pwm: airoha: Fix 32 bit overflow when converting duty ticks to ns shao.mingyin
2026-11-06 16:07 ` [PATCH 3/5] pwm: adp5585: Clamp on/off counters to the 16 bit register range shao.mingyin
2026-11-06 16:27   ` sashiko-bot
2026-11-06 16:46     ` shao.mingyin
2026-11-06 16:07 ` [PATCH 4/5] pwm: dwc: Balance the runtime PM reference when configuring fails shao.mingyin
2026-11-06 16:31   ` sashiko-bot
2026-11-06 16:46     ` shao.mingyin
2026-11-06 16:07 ` [PATCH 5/5] pwm: rockchip: Fix pclk leak in get_state error path shao.mingyin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox