<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pwm, branch v6.6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-09-08T01:05:58+00:00</updated>
<entry>
<title>Merge tag 'pwm/for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm</title>
<updated>2023-09-08T01:05:58+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-09-08T01:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d844b351824d622fa28bb0cd7a8fecf9aae05ed'/>
<id>urn:sha1:8d844b351824d622fa28bb0cd7a8fecf9aae05ed</id>
<content type='text'>
Pull pwm updates from Thierry Reding:
 "Various cleanups and fixes across the board"

* tag 'pwm/for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (31 commits)
  pwm: lpc32xx: Remove handling of PWM channels
  pwm: atmel: Simplify using devm functions
  dt-bindings: pwm: brcm,kona-pwm: convert to YAML
  pwm: stmpe: Handle errors when disabling the signal
  pwm: stm32: Simplify using devm_pwmchip_add()
  pwm: stm32: Don't modify HW state in .remove() callback
  pwm: Fix order of freeing resources in pwmchip_remove()
  pwm: ntxec: Use device_set_of_node_from_dev()
  pwm: ntxec: Drop a write-only variable from driver data
  pwm: pxa: Don't reimplement of_device_get_match_data()
  pwm: lpc18xx-sct: Simplify using devm_clk_get_enabled()
  pwm: atmel-tcb: Don't track polarity in driver data
  pwm: atmel-tcb: Unroll atmel_tcb_pwm_set_polarity() into only caller
  pwm: atmel-tcb: Put per-channel data into driver data
  pwm: atmel-tcb: Fix resource freeing in error path and remove
  pwm: atmel-tcb: Harmonize resource allocation order
  pwm: Drop unused #include &lt;linux/radix-tree.h&gt;
  pwm: rz-mtu3: Fix build warning 'num_channel_ios' not described
  pwm: Remove outdated documentation for pwmchip_remove()
  pwm: atmel: Enable clk when pwm already enabled in bootloader
  ...
</content>
</entry>
<entry>
<title>pwm: lpc32xx: Remove handling of PWM channels</title>
<updated>2023-08-22T08:14:16+00:00</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vz@mleia.com</email>
</author>
<published>2023-07-17T15:52:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4aae44f65827f0213a7361cf9c32cfe06114473f'/>
<id>urn:sha1:4aae44f65827f0213a7361cf9c32cfe06114473f</id>
<content type='text'>
Because LPC32xx PWM controllers have only a single output which is
registered as the only PWM device/channel per controller, it is known in
advance that pwm-&gt;hwpwm value is always 0. On basis of this fact
simplify the code by removing operations with pwm-&gt;hwpwm, there is no
controls which require channel number as input.

Even though I wasn't aware at the time when I forward ported that patch,
this fixes a null pointer dereference as lpc32xx-&gt;chip.pwms is NULL
before devm_pwmchip_add() is called.

Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Fixes: 3d2813fb17e5 ("pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered")
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>mfd: rz-mtu3: Link time dependencies</title>
<updated>2023-08-18T20:48:04+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2023-07-19T09:02:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10d3340441bd0db857fc7fcb1733a800acf47a3d'/>
<id>urn:sha1:10d3340441bd0db857fc7fcb1733a800acf47a3d</id>
<content type='text'>
The new set of drivers for RZ/G2L MTU3a tries to enable compile-testing the
individual client drivers even when the MFD portion is disabled but gets it
wrong, causing a link failure when the core is in a loadable module but the
other drivers are built-in:

x86_64-linux-ld: drivers/pwm/pwm-rz-mtu3.o: in function `rz_mtu3_pwm_apply':
pwm-rz-mtu3.c:(.text+0x4bf): undefined reference to `rz_mtu3_8bit_ch_write'
x86_64-linux-ld: pwm-rz-mtu3.c:(.text+0x509): undefined reference to `rz_mtu3_disable'

arm-linux-gnueabi-ld: drivers/counter/rz-mtu3-cnt.o: in function `rz_mtu3_cascade_counts_enable_get':
rz-mtu3-cnt.c:(.text+0xbec): undefined reference to `rz_mtu3_shared_reg_read'

It seems better not to add the extra complexity here but instead just use
a normal hard dependency, so remove the #else portion in the header along
with the "|| COMPILE_TEST". This could also be fixed by having slightly more
elaborate Kconfig dependencies or using the cursed 'IS_REACHABLE()' helper,
but in practice it's already possible to compile-test all these drivers
by enabling the mtd portion.

Fixes: 254d3a727421c ("pwm: Add Renesas RZ/G2L MTU3a PWM driver")
Fixes: 0be8907359df4 ("counter: Add Renesas RZ/G2L MTU3a counter driver")
Fixes: 654c293e1687b ("mfd: Add Renesas RZ/G2L MTU3a core driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Reviewed-by: Biju Das &lt;biju.das.jz@bp.renesas.com&gt;
Link: https://lore.kernel.org/r/20230719090430.1925182-1-arnd@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>pwm: atmel: Simplify using devm functions</title>
<updated>2023-07-28T08:15:44+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-28T08:11:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b22bb0d6a828b4eab579056647d2f362ac116cf2'/>
<id>urn:sha1:b22bb0d6a828b4eab579056647d2f362ac116cf2</id>
<content type='text'>
For all resources used by the driver there is a devm variant to allocate
these. This simplifies the error path in the probe callback and allows
to drop the remove callback.

While at it also use dev_err_probe() to compact returning an error.

With the remove callback gone, there is no user of driver data left, so
the call to platform_set_drvdata() can also be dropped.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: stmpe: Handle errors when disabling the signal</title>
<updated>2023-07-28T07:49:18+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-14T21:45:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b2c71e9f8dd0d023a847f6c38f9a83c0949ec01a'/>
<id>urn:sha1:b2c71e9f8dd0d023a847f6c38f9a83c0949ec01a</id>
<content type='text'>
Before the pwm framework implementedatomic updates (with the .apply()
callback) the .disable() callback returned void. This is still visible
in the stmpe driver which drops errors in the disable path.

Improve the driver to forward failures in stmpe_24xx_pwm_disable() to
the caller of pwm_apply_state().

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: stm32: Simplify using devm_pwmchip_add()</title>
<updated>2023-07-28T07:46:22+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-13T15:51:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8c89fd866ad221af037ef0ec3d60b83d0b859c65'/>
<id>urn:sha1:8c89fd866ad221af037ef0ec3d60b83d0b859c65</id>
<content type='text'>
This allows to drop the platform_driver's remove function.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: stm32: Don't modify HW state in .remove() callback</title>
<updated>2023-07-28T07:46:21+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-13T15:51:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9c2f69aac05919a4f2bf72a7b53c43ac3f4c410'/>
<id>urn:sha1:e9c2f69aac05919a4f2bf72a7b53c43ac3f4c410</id>
<content type='text'>
A consumer is expected to disable a PWM before calling pwm_put(). And if
they didn't there is hopefully a good reason (or the consumer needs
fixing). Also if disabling an enabled PWM was the right thing to do,
this should better be done in the framework instead of in each low level
driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Fix order of freeing resources in pwmchip_remove()</title>
<updated>2023-07-28T07:42:37+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-25T08:10:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86eed2a10304a9efe56c2b192b914b377cad260d'/>
<id>urn:sha1:86eed2a10304a9efe56c2b192b914b377cad260d</id>
<content type='text'>
pwmchip_add() calls of_pwmchip_add() only after adding the chip to
pwm_chips and releasing pwm_lock. So the proper order in
pwmchip_remove() is to call of_pwmchip_remove() before taking the mutex
and removing the chip from pwm_chips. This way pwmchip_remove() releases
the resources in reverse order compared to pwmchip_add() requesting
them.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: ntxec: Use device_set_of_node_from_dev()</title>
<updated>2023-07-28T07:39:02+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-18T17:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=387c74e5f91d8e6f0c6e49fddd8b0e53118e5def'/>
<id>urn:sha1:387c74e5f91d8e6f0c6e49fddd8b0e53118e5def</id>
<content type='text'>
Compared to overwriting pdev-&gt;dev.of_node directly, this takes care of
reference counting. It also prevents that the parent device matches this
driver. See commit 9b22c17a3cc5 ("of: Check 'of_node_reused' flag on
of_match_device()") for further details.

Suggested-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: ntxec: Drop a write-only variable from driver data</title>
<updated>2023-07-28T07:38:29+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-18T15:23:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=250b4ca0c9d611c61e12a8eb2d24e69f9058de2b'/>
<id>urn:sha1:250b4ca0c9d611c61e12a8eb2d24e69f9058de2b</id>
<content type='text'>
.dev is assigned in .probe() and never read. So it serves no purpose and
can be removed.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
</feed>
