<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/linux/pwm.h, branch rust-fixes-6.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=rust-fixes-6.10</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=rust-fixes-6.10'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2024-04-30T16:57:07Z</updated>
<entry>
<title>pwm: Make pwmchip_[sg]et_drvdata() a wrapper around dev_set_drvdata()</title>
<updated>2024-04-30T16:57:07Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-03-17T10:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=38ae7142e35165571123997addd71393a9dabde5'/>
<id>urn:sha1:38ae7142e35165571123997addd71393a9dabde5</id>
<content type='text'>
Now that a pwm_chip has a dedicated struct device, pwmchip_set_drvdata()
and pwmchip_get_drvdata() can be made thin wrappers around
dev_set_drvdata() and dev_get_drvdata() respectively and the previously
needed pointer can be dropped from struct pwm_chip.

Link: https://lore.kernel.org/r/a5e05bd2d83421a26fdef6a87d69253c0f98becf.1710670958.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: Add a struct device to struct pwm_chip</title>
<updated>2024-04-26T19:29:17Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-03-17T10:40:36Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=4c56b1434b814899c42a9d9f43d8265371282cd0'/>
<id>urn:sha1:4c56b1434b814899c42a9d9f43d8265371282cd0</id>
<content type='text'>
This replaces the formerly dynamically allocated struct device. This
allows to additionally use it to track the lifetime of the struct
pwm_chip. Otherwise the new struct device provides the same sysfs API as
was provided by the dynamic device before.

Link: https://lore.kernel.org/r/35c65ea7f6de789a568ff39d7b6b4ce80de4b7dc.1710670958.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: Ensure a struct pwm has the same lifetime as its pwm_chip</title>
<updated>2024-04-26T19:29:17Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-03-17T10:40:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ee37bf50749f06b29394d7ba8a85b47f023b61e2'/>
<id>urn:sha1:ee37bf50749f06b29394d7ba8a85b47f023b61e2</id>
<content type='text'>
It's required to not free the memory underlying a requested PWM
while a consumer still has a reference to it. While currently a pwm_chip
doesn't live long enough in all cases, linking the struct pwm to the
pwm_chip results in the right lifetime as soon as the pwmchip is living
long enough. This happens with the following commits.

Note this is a breaking change for all pwm drivers that don't use
pwmchip_alloc().

Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt; # for struct_size() and __counted_by()
Link: https://lore.kernel.org/r/7e9e958841f049026c0023b309cc9deecf0ab61d.1710670958.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: Move contents of sysfs.c into core.c</title>
<updated>2024-04-26T19:29:17Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-03-17T10:40:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e9cc807f87ffd1ccc919731e8f624982935af3e0'/>
<id>urn:sha1:e9cc807f87ffd1ccc919731e8f624982935af3e0</id>
<content type='text'>
With the upcoming restructuring having all in a single file simplifies
things a bit. The relevant and somewhat visible changes are:

 - Some dropped prototypes from include/linux/pwm.h that were only
   necessary that core.c has a declaration of the symbols defined in
   sysfs.c. The respective functions are static now.

 - The pwm class now also exists if CONFIG_SYSFS isn't enabled. Having
   CONFIG_SYSFS is not very relevant today, but even without it the
   class and device stuff still provides lifetime tracking.

 - Both files had an initcall, these are merged into a single one now.
   Instead of a big #ifdef block for CONFIG_DEBUG_FS, a single
   if (IS_ENABLED(CONFIG_DEBUG_FS)) is used now. This increases compile
   coverage a bit and is a tad nicer on the eyes.

Link: https://lore.kernel.org/r/9e2d39a5280d7dda5bfc6682a8aef510148635b2.1710670958.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: Ensure that pwm_chips are allocated using pwmchip_alloc()</title>
<updated>2024-04-26T19:29:16Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-02-14T09:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=05947224ff469bf17b3791fd009bc27ce5151997'/>
<id>urn:sha1:05947224ff469bf17b3791fd009bc27ce5151997</id>
<content type='text'>
Memory holding a struct device must not be freed before the reference
count drops to zero. So a struct pwm_chip must not live in memory
freed by a driver on unbind. All in-tree drivers were fixed accordingly,
but as out-of-tree drivers, that were not adapted, still compile fine,
catch these in pwmchip_add().

Link: https://lore.kernel.org/r/35f5b229c98f78b2f6ce2397259a4a936be477c0.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: Provide pwmchip_alloc() function and a devm variant of it</title>
<updated>2024-02-15T11:59:15Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-02-14T09:30:50Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=024913dbf99f06f09d5c06c940ca39821697d41c'/>
<id>urn:sha1:024913dbf99f06f09d5c06c940ca39821697d41c</id>
<content type='text'>
This function allocates a struct pwm_chip and driver data. Compared to
the status quo the split into pwm_chip and driver data is new, otherwise
it doesn't change anything relevant (yet).

The intention is that after all drivers are switched to use this
allocation function, its possible to add a struct device to struct
pwm_chip to properly track the latter's lifetime without touching all
drivers again. Proper lifetime tracking is a necessary precondition to
introduce character device support for PWMs (that implements atomic
setting and doesn't suffer from the sysfs overhead of the /sys/class/pwm
userspace support).

The new function pwmchip_priv() (obviously?) only works for chips
allocated with pwmchip_alloc().

Link: https://lore.kernel.org/r/9577d6053a5a52536057dc8654ff567181c2da82.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: Provide wrappers for storing and getting driver private data</title>
<updated>2024-02-15T11:37:29Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-02-14T09:30:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=24003d501f112a9827aa8c59c00e12b2d5cbddf6'/>
<id>urn:sha1:24003d501f112a9827aa8c59c00e12b2d5cbddf6</id>
<content type='text'>
These functions are useful to store and query driver private data
depending on the pwm_chip. After struct pwm_chip got its own struct
device, this can make use of dev_get_drvdata() and dev_set_drvdata() on
that device. These functions are required already now to convert
drivers to pwmchip_alloc() which must happen before changing
pwm_chip::dev.

Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/67514cdf29d29bd8b4ad8d44fac87f6ae6dca1e5.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: Provide an inline function to get the parent device of a given chip</title>
<updated>2024-02-15T11:37:29Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-02-14T09:30:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=4e59267c7a20eb1c1ad9106e682cb6a0d8eb3111'/>
<id>urn:sha1:4e59267c7a20eb1c1ad9106e682cb6a0d8eb3111</id>
<content type='text'>
Currently a pwm_chip stores in its struct device *dev member a pointer
to the parent device. Preparing a change that embeds a full struct
device in struct pwm_chip, this accessor function should be used in all
drivers directly accessing chip-&gt;dev now. This way struct pwm_chip and
this new function can be changed without having to touch all drivers in
the same change set.

Make use of this function in the framework's core sources.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/cc30090d2f9762bed9854a55612144bccc910781.1707900770.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: Drop useless member .of_pwm_n_cells of struct pwm_chip</title>
<updated>2024-02-15T11:28:01Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-01-09T21:34:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=4e77431cda4973f03d063c47f6ea313dfceebf16'/>
<id>urn:sha1:4e77431cda4973f03d063c47f6ea313dfceebf16</id>
<content type='text'>
Apart from the two of_xlate implementations this member is write-only.
In the of_xlate functions of_pwm_xlate_with_flags() and
of_pwm_single_xlate() it's more sensible to check for args-&gt;args_count
because this is what is actually used in the device tree.

Acked-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/53d8c545aa8f79a920358be9e72e382b3981bdc4.1704835845.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>pwm: linux/pwm.h: fix Excess kernel-doc description warning</title>
<updated>2024-01-05T08:33:16Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-12-23T05:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d73f444d06fb8a42a5c0623453f3ea1fe9880229'/>
<id>urn:sha1:d73f444d06fb8a42a5c0623453f3ea1fe9880229</id>
<content type='text'>
Remove the @pwm: line to prevent the kernel-doc warning:

include/linux/pwm.h:87: warning: Excess struct member 'pwm' description in 'pwm_device'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Cc:  &lt;linux-pwm@vger.kernel.org&gt;
Fixes: f3e25e68ceb2 ("pwm: Drop unused member "pwm" from struct pwm_device")
Reviewed-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>
