<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/pwm, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family</title>
<updated>2026-11-06T05:55:50+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-10-29T06:16:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4dd10fbbeb9c33709edc89916e19c03c780a0751'/>
<id>4dd10fbbeb9c33709edc89916e19c03c780a0751</id>
<content type='text'>
Mirroring the earlier kmalloc_obj() conversion, convert the
device-managed allocators over to the type-based API using the now
updated scripts/coccinelle/api/kmalloc_objs.cocci. The size is derived
from the type rather than written out as a sizeof(), and the result is
a pointer to that type rather than void *, so a mismatch between the
size requested and the variable assigned becomes a build error instead
of being silently accepted.

The conversions break down as:

	6713	devm_kzalloc_obj()
	1749	devm_kzalloc_objs()
	 307	devm_kzalloc_flex()
	  91	devm_kmalloc_objs()
	  82	devm_kmalloc_obj()
	   2	devm_kmalloc_flex()

The rules deliberately leave alone allocations sized by a string or a
byte-sized type, or assigned to a pointer to a byte-sized type, since
those are byte buffers rather than objects. Allocations sized by a
multi-byte integer type are only converted when they are assigned to a
pointer to that same type, and allocations of pointers to integers or of
void pointers are left alone too. After this change, 528 files still
call devm_kmalloc(), devm_kzalloc(), devm_kcalloc(), or
devm_kmalloc_array().

Build tested with allmodconfig on x86_64, arm64, i386, arm, riscv, s390,
m68k, mips, parisc, sparc, loongarch, arc, xtensa, and openrisc with GCC
16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mirroring the earlier kmalloc_obj() conversion, convert the
device-managed allocators over to the type-based API using the now
updated scripts/coccinelle/api/kmalloc_objs.cocci. The size is derived
from the type rather than written out as a sizeof(), and the result is
a pointer to that type rather than void *, so a mismatch between the
size requested and the variable assigned becomes a build error instead
of being silently accepted.

The conversions break down as:

	6713	devm_kzalloc_obj()
	1749	devm_kzalloc_objs()
	 307	devm_kzalloc_flex()
	  91	devm_kmalloc_objs()
	  82	devm_kmalloc_obj()
	   2	devm_kmalloc_flex()

The rules deliberately leave alone allocations sized by a string or a
byte-sized type, or assigned to a pointer to a byte-sized type, since
those are byte buffers rather than objects. Allocations sized by a
multi-byte integer type are only converted when they are assigned to a
pointer to that same type, and allocations of pointers to integers or of
void pointers are left alone too. After this change, 528 files still
call devm_kmalloc(), devm_kzalloc(), devm_kcalloc(), or
devm_kmalloc_array().

Build tested with allmodconfig on x86_64, arm64, i386, arm, riscv, s390,
m68k, mips, parisc, sparc, loongarch, arc, xtensa, and openrisc with GCC
16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: tiehrpwm: Clear period on disable to allow reconfiguration</title>
<updated>2026-09-30T06:13:35+00:00</updated>
<author>
<name>Alexander Sverdlin</name>
<email>alexander.sverdlin@siemens.com</email>
</author>
<published>2026-09-29T12:08:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e74b9a7ee50071aad25d3989bf985292f90b0c6e'/>
<id>e74b9a7ee50071aad25d3989bf985292f90b0c6e</id>
<content type='text'>
Both channels share one period register, so ehrpwm_pwm_config() rejects a
period differing from the sibling's period_cycles[]. That value was cleared
only in .free(), not in .disable(), so a stopped channel kept blocking the
sibling from switching to a new frequency. Clear it in .disable() too.

Testcase:

  cd /sys/class/pwm/pwmchip0; echo 0 &gt; export; echo 1 &gt; export
  for p in pwm0 pwm1; do
    echo 1000000 &gt; $p/period; echo 500000 &gt; $p/duty_cycle
    echo 1 &gt; $p/enable; echo 0 &gt; $p/enable; echo 2000000 &gt; $p/period
  done
  echo 1 &gt; pwm0/enable	# before: -EINVAL, after: succeeds

Fixes: 01b2d4536f02 ("pwm: pwm-tiehrpwm: Fix conflicting channel period setting")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Link: https://patch.msgid.link/20260929120806.2790355-1-alexander.sverdlin@siemens.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both channels share one period register, so ehrpwm_pwm_config() rejects a
period differing from the sibling's period_cycles[]. That value was cleared
only in .free(), not in .disable(), so a stopped channel kept blocking the
sibling from switching to a new frequency. Clear it in .disable() too.

Testcase:

  cd /sys/class/pwm/pwmchip0; echo 0 &gt; export; echo 1 &gt; export
  for p in pwm0 pwm1; do
    echo 1000000 &gt; $p/period; echo 500000 &gt; $p/duty_cycle
    echo 1 &gt; $p/enable; echo 0 &gt; $p/enable; echo 2000000 &gt; $p/period
  done
  echo 1 &gt; pwm0/enable	# before: -EINVAL, after: succeeds

Fixes: 01b2d4536f02 ("pwm: pwm-tiehrpwm: Fix conflicting channel period setting")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Sverdlin &lt;alexander.sverdlin@siemens.com&gt;
Link: https://patch.msgid.link/20260929120806.2790355-1-alexander.sverdlin@siemens.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Allow 32-bit tasks to use the character device</title>
<updated>2026-09-29T14:06:42+00:00</updated>
<author>
<name>Danish Khateeb</name>
<email>danishkhateeb03@gmail.com</email>
</author>
<published>2026-09-28T18:44:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=45c3d07e3f18cff2b3ea8b797387451a3df9d421'/>
<id>45c3d07e3f18cff2b3ea8b797387451a3df9d421</id>
<content type='text'>
pwm_cdev_fileops has no .compat_ioctl, so every ioctl on /dev/pwmchipN
fails with -ENOTTY for 32-bit tasks on a 64-bit kernel, e.g. armhf
userspace on arm64.

struct pwmchip_waveform has the same layout for 32-bit and 64-bit tasks,
so compat_ptr_ioctl() is enough. PWM_IOCTL_REQUEST and PWM_IOCTL_FREE
take an integer rather than a pointer, which is fine too: compat_ptr()
only changed the value on s390, which dropped compat support in v6.19.

Fixes: 9c06f26ba5f5 ("pwm: Add support for pwmchip devices for faster and easier userspace access")
Assisted-by: LLM
Signed-off-by: Danish Khateeb &lt;danishkhateeb03@gmail.com&gt;
Link: https://patch.msgid.link/20260928184422.380520-1-danishkhateeb03@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pwm_cdev_fileops has no .compat_ioctl, so every ioctl on /dev/pwmchipN
fails with -ENOTTY for 32-bit tasks on a 64-bit kernel, e.g. armhf
userspace on arm64.

struct pwmchip_waveform has the same layout for 32-bit and 64-bit tasks,
so compat_ptr_ioctl() is enough. PWM_IOCTL_REQUEST and PWM_IOCTL_FREE
take an integer rather than a pointer, which is fine too: compat_ptr()
only changed the value on s390, which dropped compat support in v6.19.

Fixes: 9c06f26ba5f5 ("pwm: Add support for pwmchip devices for faster and easier userspace access")
Assisted-by: LLM
Signed-off-by: Danish Khateeb &lt;danishkhateeb03@gmail.com&gt;
Link: https://patch.msgid.link/20260928184422.380520-1-danishkhateeb03@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: lp3943: fix NULL pointer dereference for an unconfigured channel</title>
<updated>2026-09-08T17:12:19+00:00</updated>
<author>
<name>Manush Prajwal</name>
<email>manushprajwal555@gmail.com</email>
</author>
<published>2026-09-06T11:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=17dbb6938d3ab444cd6be1c95506450595a8800d'/>
<id>17dbb6938d3ab444cd6be1c95506450595a8800d</id>
<content type='text'>
lp3943_pwm_probe() unconditionally registers a pwmchip with
LP3943_NUM_PWMS(2) hwpwm channels, but lp3943_pwm_parse_dt() only
populates pdata-&gt;pwms[i] for the channels whose ti,pwm0/ti,pwm1
property is actually present in the devicetree (the binding
explicitly allows each PWM generator to drive zero or more outputs,
and lp3943_pwm_parse_dt() only fails outright with -ENODATA if
*neither* property is present). A devicetree that configures only one
of the two channels leaves pdata-&gt;pwms[] NULL for the other.

lp3943_pwm_request_map() dereferences pdata-&gt;pwms[hwpwm] with no NULL
check:

	pwm_map-&gt;output = pdata-&gt;pwms[hwpwm]-&gt;output;
	pwm_map-&gt;num_outputs = pdata-&gt;pwms[hwpwm]-&gt;num_outputs;

so requesting the unconfigured channel (e.g. exporting it from
sysfs) crashes with a NULL pointer dereference instead of failing
cleanly.

Return -ENODEV from lp3943_pwm_request_map() when the channel was
never configured, before the pointer is dereferenced. The caller,
lp3943_pwm_request(), already propagates an ERR_PTR return correctly
(it does so today for the existing -EBUSY case).

Reported-by: Sashiko AI review &lt;sashiko-bot@kernel.org&gt;
Closes: https://sashiko.dev/#/patchset/6a9d4c6b.79b5ea6e.147aa1.5883@mx.google.com?part=1
Signed-off-by: Manush Prajwal &lt;manushprajwal555@gmail.com&gt;
Link: https://patch.msgid.link/6a9d5187.d63de05c.175391.a17c@mx.google.com
Fixes: af66b3c0934e ("pwm: Add LP3943 PWM driver")
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lp3943_pwm_probe() unconditionally registers a pwmchip with
LP3943_NUM_PWMS(2) hwpwm channels, but lp3943_pwm_parse_dt() only
populates pdata-&gt;pwms[i] for the channels whose ti,pwm0/ti,pwm1
property is actually present in the devicetree (the binding
explicitly allows each PWM generator to drive zero or more outputs,
and lp3943_pwm_parse_dt() only fails outright with -ENODATA if
*neither* property is present). A devicetree that configures only one
of the two channels leaves pdata-&gt;pwms[] NULL for the other.

lp3943_pwm_request_map() dereferences pdata-&gt;pwms[hwpwm] with no NULL
check:

	pwm_map-&gt;output = pdata-&gt;pwms[hwpwm]-&gt;output;
	pwm_map-&gt;num_outputs = pdata-&gt;pwms[hwpwm]-&gt;num_outputs;

so requesting the unconfigured channel (e.g. exporting it from
sysfs) crashes with a NULL pointer dereference instead of failing
cleanly.

Return -ENODEV from lp3943_pwm_request_map() when the channel was
never configured, before the pointer is dereferenced. The caller,
lp3943_pwm_request(), already propagates an ERR_PTR return correctly
(it does so today for the existing -EBUSY case).

Reported-by: Sashiko AI review &lt;sashiko-bot@kernel.org&gt;
Closes: https://sashiko.dev/#/patchset/6a9d4c6b.79b5ea6e.147aa1.5883@mx.google.com?part=1
Signed-off-by: Manush Prajwal &lt;manushprajwal555@gmail.com&gt;
Link: https://patch.msgid.link/6a9d5187.d63de05c.175391.a17c@mx.google.com
Fixes: af66b3c0934e ("pwm: Add LP3943 PWM driver")
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: mtk-disp: Fix period readback</title>
<updated>2026-09-08T09:50:38+00:00</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wenst@chromium.org</email>
</author>
<published>2026-08-27T10:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c5b29baad42b2b02389cc6a716697a8a63209930'/>
<id>c5b29baad42b2b02389cc6a716697a8a63209930</id>
<content type='text'>
The period value stored in the register is the number of clock cycles - 1.

Account for the offset when calculating the period in nanoseconds. This
fixes the discrepancy reported by the pwm core when CONFIG_PWM_DEBUG=1:

    mediatek-disp-pwm 1100e000.pwm: .apply is not idempotent
    	(ena=1 pol=0 281500/499875) -&gt; (ena=1 pol=0 281500/499750)

Calculation discrepancy in the driver was found by AI run by a colleague
while debugging another PWM related issue. Check against SoC datasheet
and fix done by the author.

Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()")
Cc: Jitao Shi &lt;jitao.shi@mediatek.com&gt;
Signed-off-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Fei Shao &lt;fshao@chromium.org&gt;
Link: https://patch.msgid.link/20260827105738.8570-1-wenst@chromium.org
[ukleinek: Adapt comment accordingly]
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The period value stored in the register is the number of clock cycles - 1.

Account for the offset when calculating the period in nanoseconds. This
fixes the discrepancy reported by the pwm core when CONFIG_PWM_DEBUG=1:

    mediatek-disp-pwm 1100e000.pwm: .apply is not idempotent
    	(ena=1 pol=0 281500/499875) -&gt; (ena=1 pol=0 281500/499750)

Calculation discrepancy in the driver was found by AI run by a colleague
while debugging another PWM related issue. Check against SoC datasheet
and fix done by the author.

Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()")
Cc: Jitao Shi &lt;jitao.shi@mediatek.com&gt;
Signed-off-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Fei Shao &lt;fshao@chromium.org&gt;
Link: https://patch.msgid.link/20260827105738.8570-1-wenst@chromium.org
[ukleinek: Adapt comment accordingly]
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: ipq: Prevent potential 32-bit integer overflow in hi_div calculation</title>
<updated>2026-09-07T09:37:08+00:00</updated>
<author>
<name>Surendra Singh Chouhan</name>
<email>kr494167@gmail.com</email>
</author>
<published>2026-07-24T04:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a662d944da1e9236a99355aa3e8a93735d8b3521'/>
<id>a662d944da1e9236a99355aa3e8a93735d8b3521</id>
<content type='text'>
In ipq_pwm_get_state(), hi_div was calculated as:
  hi_div = hi_dur * (pre_div + 1);

hi_dur and (pre_div + 1) are both unsigned int (32-bit) values.
Evaluating their multiplication using 32-bit arithmetic before assigning to
the 64-bit u64 hi_div variable can overflow 32-bit unsigned math.

While effective_div explicitly uses (u64)(pwm_div + 1) * (pre_div + 1) to
prevent overflow, hi_div was missing the (u64) cast.

Fix this by casting hi_dur to (u64) before multiplication, matching the
precision used for effective_div.

Fixes: c436e3e9c265 ("pwm: Driver for qualcomm ipq6018 pwm block")
Signed-off-by: Surendra Singh Chouhan &lt;kr494167@gmail.com&gt;
Link: https://patch.msgid.link/20260724044854.33274-1-kr494167@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In ipq_pwm_get_state(), hi_div was calculated as:
  hi_div = hi_dur * (pre_div + 1);

hi_dur and (pre_div + 1) are both unsigned int (32-bit) values.
Evaluating their multiplication using 32-bit arithmetic before assigning to
the 64-bit u64 hi_div variable can overflow 32-bit unsigned math.

While effective_div explicitly uses (u64)(pwm_div + 1) * (pre_div + 1) to
prevent overflow, hi_div was missing the (u64) cast.

Fix this by casting hi_dur to (u64) before multiplication, matching the
precision used for effective_div.

Fixes: c436e3e9c265 ("pwm: Driver for qualcomm ipq6018 pwm block")
Signed-off-by: Surendra Singh Chouhan &lt;kr494167@gmail.com&gt;
Link: https://patch.msgid.link/20260724044854.33274-1-kr494167@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: loongson: Reload PWM configuration through counter reset</title>
<updated>2026-09-07T09:25:23+00:00</updated>
<author>
<name>Keguang Zhang</name>
<email>keguang.zhang@gmail.com</email>
</author>
<published>2026-07-15T11:05:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0de9b836a3bc1cd30578ae2c4463d09afd85ed3d'/>
<id>0de9b836a3bc1cd30578ae2c4463d09afd85ed3d</id>
<content type='text'>
The Loongson PWM controller latches the LOW and PERIOD registers only at
the start of each PWM period. After disabling and re-enabling the PWM,
the controller resumes from the previous counter value and completes the
current period before re-latching the updated LOW and PERIOD values.

Reset the PWM counter when disabling the PWM and release it when
enabling the PWM so that the updated LOW and PERIOD values are latched
before the PWM starts running again.

Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
Signed-off-by: Keguang Zhang &lt;keguang.zhang@gmail.com&gt;
Link: https://patch.msgid.link/20260715-pwm-loongson-fix-v3-2-0aab2847eaa7@gmail.com
[ukleinek: Note LOW refers to the register currently named
LOONGSON_PWM_REG_DUTY. That name is wrong, the fix is still under
discussion.]
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Loongson PWM controller latches the LOW and PERIOD registers only at
the start of each PWM period. After disabling and re-enabling the PWM,
the controller resumes from the previous counter value and completes the
current period before re-latching the updated LOW and PERIOD values.

Reset the PWM counter when disabling the PWM and release it when
enabling the PWM so that the updated LOW and PERIOD values are latched
before the PWM starts running again.

Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
Signed-off-by: Keguang Zhang &lt;keguang.zhang@gmail.com&gt;
Link: https://patch.msgid.link/20260715-pwm-loongson-fix-v3-2-0aab2847eaa7@gmail.com
[ukleinek: Note LOW refers to the register currently named
LOONGSON_PWM_REG_DUTY. That name is wrong, the fix is still under
discussion.]
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Fix typos in comments</title>
<updated>2026-09-07T08:03:42+00:00</updated>
<author>
<name>Hemanth Selam</name>
<email>hemanth.selam@gmail.com</email>
</author>
<published>2026-09-07T06:26:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bdf16a4d74ae6b7fb6dc8953798ba0853ddc4705'/>
<id>bdf16a4d74ae6b7fb6dc8953798ba0853ddc4705</id>
<content type='text'>
Fix typos in comments, reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt. Only touches comments, no code
changes.

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Hemanth Selam &lt;hemanth.selam@gmail.com&gt;
Link: https://patch.msgid.link/20260907062659.15500-1-hemanth.selam@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix typos in comments, reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt. Only touches comments, no code
changes.

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Hemanth Selam &lt;hemanth.selam@gmail.com&gt;
Link: https://patch.msgid.link/20260907062659.15500-1-hemanth.selam@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: iqs620a: Use devm_blocking_notifier_chain_register()</title>
<updated>2026-08-31T21:27:14+00:00</updated>
<author>
<name>Eliav Farber</name>
<email>farbere@amazon.com</email>
</author>
<published>2026-08-16T06:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6b0c6ff76795f62981352cc0be00163077d0961b'/>
<id>6b0c6ff76795f62981352cc0be00163077d0961b</id>
<content type='text'>
Replace the blocking_notifier_chain_register() +
devm_add_action_or_reset() pattern with a single call to
devm_blocking_notifier_chain_register(), removing the
iqs620_pwm_notifier_unregister() callback.

Signed-off-by: Eliav Farber &lt;farbere@amazon.com&gt;
Link: https://patch.msgid.link/20260816060648.4030-3-farbere@amazon.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the blocking_notifier_chain_register() +
devm_add_action_or_reset() pattern with a single call to
devm_blocking_notifier_chain_register(), removing the
iqs620_pwm_notifier_unregister() callback.

Signed-off-by: Eliav Farber &lt;farbere@amazon.com&gt;
Link: https://patch.msgid.link/20260816060648.4030-3-farbere@amazon.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: renesas-tpu: Fix runtime PM reference leak</title>
<updated>2026-08-31T21:27:02+00:00</updated>
<author>
<name>Ruoyu Wang</name>
<email>ruoyuw560@gmail.com</email>
</author>
<published>2026-08-14T13:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=62cff15fbf2b12ebbb0b01ca720030c2bc12aed1'/>
<id>62cff15fbf2b12ebbb0b01ca720030c2bc12aed1</id>
<content type='text'>
tpu_pwm_timer_start() used pm_runtime_get_sync() without checking its
return value before touching the TPU clock.  A failed runtime resume was
therefore ignored, and the callback continued into register access.

Use pm_runtime_resume_and_get() and propagate a failed resume.  Keep the
matching put when clock preparation fails after a successful resume.

tpu_pwm_disable() also needs to propagate a failed start so that the PWM
apply callback does not access registers while runtime PM is inactive.

This issue was found by a static analysis checker and confirmed by manual
source review.

Fixes: 99b82abb0a35 ("pwm: Add Renesas TPU PWM driver")
Signed-off-by: Ruoyu Wang &lt;ruoyuw560@gmail.com&gt;
Link: https://patch.msgid.link/20260814134143.1388120-1-ruoyuw560@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tpu_pwm_timer_start() used pm_runtime_get_sync() without checking its
return value before touching the TPU clock.  A failed runtime resume was
therefore ignored, and the callback continued into register access.

Use pm_runtime_resume_and_get() and propagate a failed resume.  Keep the
matching put when clock preparation fails after a successful resume.

tpu_pwm_disable() also needs to propagate a failed start so that the PWM
apply callback does not access registers while runtime PM is inactive.

This issue was found by a static analysis checker and confirmed by manual
source review.

Fixes: 99b82abb0a35 ("pwm: Add Renesas TPU PWM driver")
Signed-off-by: Ruoyu Wang &lt;ruoyuw560@gmail.com&gt;
Link: https://patch.msgid.link/20260814134143.1388120-1-ruoyuw560@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
