<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/pwm/core.c, branch v6.7</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>pwm: Drop pwm_[sg]et_chip_data()</title>
<updated>2023-10-13T08:07:17+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-05T08:06:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a6e5654e0b8b53e2d0e316bc7cecb81dd8371f18'/>
<id>a6e5654e0b8b53e2d0e316bc7cecb81dd8371f18</id>
<content type='text'>
The semantic of chip_data is a bit surprising as it's cleared when
pwm_put() is called. Also there is a big overlap with the standard driver
data.

All drivers were adapted to not make use of chip_data any more, so it can
go away.

Link: https://lore.kernel.org/r/20230705080650.2353391-9-u.kleine-koenig@pengutronix.de
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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The semantic of chip_data is a bit surprising as it's cleared when
pwm_put() is called. Also there is a big overlap with the standard driver
data.

All drivers were adapted to not make use of chip_data any more, so it can
go away.

Link: https://lore.kernel.org/r/20230705080650.2353391-9-u.kleine-koenig@pengutronix.de
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Manage owner assignment implicitly for drivers</title>
<updated>2023-10-13T08:07:17+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-08-04T14:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=384461abcab6602abc06c2dfb8fb99beeeaa12b0'/>
<id>384461abcab6602abc06c2dfb8fb99beeeaa12b0</id>
<content type='text'>
Instead of requiring each driver to care for assigning the owner member
of struct pwm_ops, handle that implicitly using a macro. Note that the
owner member has to be moved to struct pwm_chip, as the ops structure
usually lives in read-only memory and so cannot be modified.

The upside is that new low level drivers cannot forget the assignment and
save one line each. The pwm-crc driver didn't assign .owner, that's not
a problem in practice though as the driver cannot be compiled as a
module.

Acked-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt; # Intel LPSS
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt; # pwm-{bcm,brcm}*.c
Acked-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt; # sun4i
Acked-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Acked-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt; # pwm-visconti
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt; # pwm-rockchip
Acked-by: Michael Walle &lt;michael@walle.cc&gt; # pwm-sl28cpld
Acked-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt; # pwm-meson
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20230804142707.412137-2-u.kleine-koenig@pengutronix.de
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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of requiring each driver to care for assigning the owner member
of struct pwm_ops, handle that implicitly using a macro. Note that the
owner member has to be moved to struct pwm_chip, as the ops structure
usually lives in read-only memory and so cannot be modified.

The upside is that new low level drivers cannot forget the assignment and
save one line each. The pwm-crc driver didn't assign .owner, that's not
a problem in practice though as the driver cannot be compiled as a
module.

Acked-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt; # Intel LPSS
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt; # pwm-{bcm,brcm}*.c
Acked-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt; # sun4i
Acked-by: Andi Shyti &lt;andi.shyti@kernel.org&gt;
Acked-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt; # pwm-visconti
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt; # pwm-rockchip
Acked-by: Michael Walle &lt;michael@walle.cc&gt; # pwm-sl28cpld
Acked-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt; # pwm-meson
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20230804142707.412137-2-u.kleine-koenig@pengutronix.de
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;
</pre>
</div>
</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.tavy.me/linux.git/commit/?id=86eed2a10304a9efe56c2b192b914b377cad260d'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Drop unused #include &lt;linux/radix-tree.h&gt;</title>
<updated>2023-07-28T07:30:47+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-28T07:12:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=84c33f4278249aecb49375fb884b0b14a3664a63'/>
<id>84c33f4278249aecb49375fb884b0b14a3664a63</id>
<content type='text'>
core.c doens't use any of the symbols provided by linux/radix-tree.h
and compiles just fine without this include. So drop the #include.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
core.c doens't use any of the symbols provided by linux/radix-tree.h
and compiles just fine without this include. So drop the #include.

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;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Remove outdated documentation for pwmchip_remove()</title>
<updated>2023-07-28T07:24:29+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-25T08:19:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=018121e655c8ac2b369f70758dbddf7a37ef534f'/>
<id>018121e655c8ac2b369f70758dbddf7a37ef534f</id>
<content type='text'>
pwmchip_remove() returns void since some time but the documentation still
mentions the situations where it used to return an error code. Just remove
this old and now wrong text.

Fixes: 8083f58d08fd ("pwm: Make pwmchip_remove() return void")
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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pwmchip_remove() returns void since some time but the documentation still
mentions the situations where it used to return an error code. Just remove
this old and now wrong text.

Fixes: 8083f58d08fd ("pwm: Make pwmchip_remove() return void")
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Explicitly include correct DT includes</title>
<updated>2023-07-24T11:28:05+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-14T17:48:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0a41b0c5d97a3758ad102cec469aaa79c7d406b7'/>
<id>0a41b0c5d97a3758ad102cec469aaa79c7d406b7</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Reviewed-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Reviewed-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Use a consistent name for pwm_chip pointers in the core</title>
<updated>2023-07-20T06:50:55+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-07-14T20:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b4f78ff746ec5274fffa92fa2a4dc531360b5016'/>
<id>b4f78ff746ec5274fffa92fa2a4dc531360b5016</id>
<content type='text'>
Most variables of type struct pwm_chip * are named "chip", there are
only three outliers called "pc". Change these three to "chip", too, for
consistency.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most variables of type struct pwm_chip * are named "chip", there are
only three outliers called "pc". Change these three to "chip", too, for
consistency.

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;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Remove unused radix tree</title>
<updated>2023-04-14T09:35:52+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2023-04-13T12:25:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=247ee6c780406513c6031a7f4ea41f1648b03295'/>
<id>247ee6c780406513c6031a7f4ea41f1648b03295</id>
<content type='text'>
The radix tree's only use was to map PWM channels to the global number
space. With that number space gone, the radix tree is now unused, so it
can simply be removed.

Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The radix tree's only use was to map PWM channels to the global number
space. With that number space gone, the radix tree is now unused, so it
can simply be removed.

Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Delete deprecated functions pwm_request() and pwm_free()</title>
<updated>2023-04-13T12:27:53+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-04-12T11:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0af4d704ba8e5ee632b6e65015ffe4d229c1a9a9'/>
<id>0af4d704ba8e5ee632b6e65015ffe4d229c1a9a9</id>
<content type='text'>
Since commit 5a7fbe452ad9 ("backlight: pwm_bl: Drop support for legacy PWM
probing") the last user of pwm_request() and pwm_free() is gone. So remove
these functions that were deprecated over 10 years ago in commit
8138d2ddbcca ("pwm: Add table-based lookup for static mappings").

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
[thierry.reding@gmail.com: clean up a bit after removal]
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 5a7fbe452ad9 ("backlight: pwm_bl: Drop support for legacy PWM
probing") the last user of pwm_request() and pwm_free() is gone. So remove
these functions that were deprecated over 10 years ago in commit
8138d2ddbcca ("pwm: Add table-based lookup for static mappings").

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
[thierry.reding@gmail.com: clean up a bit after removal]
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Zero-initialize the pwm_state passed to driver's .get_state()</title>
<updated>2023-03-23T13:44:43+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-03-22T21:45:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1271a7b98e7989ba6bb978e14403fc84efe16e13'/>
<id>1271a7b98e7989ba6bb978e14403fc84efe16e13</id>
<content type='text'>
This is just to ensure that .usage_power is properly initialized and
doesn't contain random stack data. The other members of struct pwm_state
should get a value assigned in a successful call to .get_state(). So in
the absence of bugs in driver implementations, this is only a safe-guard
and no fix.

Reported-by: Munehisa Kamata &lt;kamatam@amazon.com&gt;
Link: https://lore.kernel.org/r/20230310214004.2619480-1-u.kleine-koenig@pengutronix.de
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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is just to ensure that .usage_power is properly initialized and
doesn't contain random stack data. The other members of struct pwm_state
should get a value assigned in a successful call to .get_state(). So in
the absence of bugs in driver implementations, this is only a safe-guard
and no fix.

Reported-by: Munehisa Kamata &lt;kamatam@amazon.com&gt;
Link: https://lore.kernel.org/r/20230310214004.2619480-1-u.kleine-koenig@pengutronix.de
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;
</pre>
</div>
</content>
</entry>
</feed>
