<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/rust/kernel/pwm.rs, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-08-19T16:03:59+00:00</updated>
<entry>
<title>Merge tag 'pwm/for-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux</title>
<updated>2026-08-19T16:03:59+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-19T16:03:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=a288cd69f7dea3cd232b721f935c379b74a69814'/>
<id>urn:sha1:a288cd69f7dea3cd232b721f935c379b74a69814</id>
<content type='text'>
Pull pwm updates from Uwe Kleine-König:
 "A bunch of cleanups - in C and Rust - and a devicetree and driver
  extension for a new SoC variant.

  Thanks to Biju Das, Francis Laniel, Guru Das Srinagesh, Markus
  Elfring, Mikko Perttunen, Thierry Reding, and Yi-Wei Wang for their
  changes and further Alexandre Courbot, Benno Lossin, Chen Wang, Geert
  Uytterhoeven, Jon Hunter, Laurent Pinchart, Michal Wilczynski, Mikko
  Perttunen, and Rob Herring for valuable review feedback"

* tag 'pwm/for-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux:
  pwm: th1520: use vertical import style
  rust: pwm: replace `core::mem::zeroed` with `pin_init::zeroed`
  pwm: rzg2l-gpt: Drop unused rzg2l_gpt_chip parameter from rzg2l_gpt_calculate_prescale()
  pwm: Use seq_putc() calls in pwm_dbg_show()
  pwm: tegra: Add support for Tegra264
  pwm: tegra: Parametrize duty and scale field widths
  pwm: tegra: Modify read/write accessors for multi-register channel
  pwm: tegra: Avoid hard-coded max clock frequency
  pwm: tegra: Prefix driver-local macros and functions
  dt-bindings: pwm: Document Tegra264 controller
  pwm: lpss-pci: Unify coding style of pci_device_id array
  pwm: Unify coding style of of_device_id arrays
  pwm: Unify coding style of acpi_device_id arrays
  pwm: Use named initializers for arrays of acpi_device_id
  pwm: pca9685: Drop unused assignment of acpi_device_id driver data
  pwm: pxa: Depend on OF and simplify accordingly
  pwm: Use named initializers for platform_device_id arrays
  pwm: mc33xs2410: Initialize spi_device_id arrays using member names
</content>
</entry>
<entry>
<title>rust: pwm: replace `core::mem::zeroed` with `pin_init::zeroed`</title>
<updated>2026-08-11T04:58:48+00:00</updated>
<author>
<name>Francis Laniel</name>
<email>laniel_francis@privacyrequired.com</email>
</author>
<published>2026-06-03T16:09:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=3aeb2997680ecbce5564b6aa9a56c6d4f1fed209'/>
<id>urn:sha1:3aeb2997680ecbce5564b6aa9a56c6d4f1fed209</id>
<content type='text'>
All types in `bindings` implement `Zeroable` if they can, so use
`pin_init::zeroed` instead of relying on `unsafe` code.

If this ends up not compiling in the future, something in bindgen or on
the C side changed and is most likely incorrect.

Suggested-by: Benno Lossin &lt;lossin@kernel.org&gt;
Link: https://github.com/Rust-for-Linux/linux/issues/1189
Reviewed-by: Alexandre Courbot &lt;acourbot@nvidia.com&gt;
Acked-by: Michal Wilczynski &lt;m.wilczynski@samsung.com&gt;
Signed-off-by: Francis Laniel &lt;laniel_francis@privacyrequired.com&gt;
Link: https://patch.msgid.link/20260603160910.159307-1-laniel_francis@privacyrequired.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: treewide: replace `__pinned_init` with `raw_[try_]init`</title>
<updated>2026-08-05T10:36:18+00:00</updated>
<author>
<name>Gary Guo</name>
<email>gary@garyguo.net</email>
</author>
<published>2026-07-29T15:38:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ea7da3116015de801840f3e011dee907fb118f0c'/>
<id>urn:sha1:ea7da3116015de801840f3e011dee907fb118f0c</id>
<content type='text'>
The `__init` method is not designed to be a public API (existence of "__"
is a hint for this); replace users with `pin_init::raw_[try_]init` which
does the same thing.

There are a few users of `__init` which are replaced as well.

Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Link: https://patch.msgid.link/20260729-merge-init-v2-4-26adf47109e7@garyguo.net
Signed-off-by: Gary Guo &lt;gary@garyguo.net&gt;
</content>
</entry>
<entry>
<title>rust: pwm: Simplify to_result call sites and unsafe blocks</title>
<updated>2026-01-20T17:49:58+00:00</updated>
<author>
<name>Kari Argillander</name>
<email>kari.argillander@gmail.com</email>
</author>
<published>2026-01-02T07:51:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=fc1e4eae19eef739fea732902354ec93ab8234c6'/>
<id>urn:sha1:fc1e4eae19eef739fea732902354ec93ab8234c6</id>
<content type='text'>
Remove unnecessary temporary variables around to_result() calls and move
trailing semicolons outside unsafe blocks to improve readability and
produce cleaner rustfmt output.

No functional change intended.

Signed-off-by: Kari Argillander &lt;kari.argillander@gmail.com&gt;
Acked-by: Michal Wilczynski &lt;m.wilczynski@samsung.com&gt;
Link: https://patch.msgid.link/20260102-pwm-rust-v2-2-2702ce57d571@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: pwm: Fix potential memory leak on init error</title>
<updated>2026-01-20T17:49:58+00:00</updated>
<author>
<name>Kari Argillander</name>
<email>kari.argillander@gmail.com</email>
</author>
<published>2026-01-02T07:51:41+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=a2633dc243c35754a0c2270131d8a199c987c9bf'/>
<id>urn:sha1:a2633dc243c35754a0c2270131d8a199c987c9bf</id>
<content type='text'>
When initializing a PWM chip using pwmchip_alloc(), the allocated device
owns an initial reference that must be released on all error paths.

If __pinned_init() were to fail, the allocated pwm_chip would currently
leak because the error path returns without calling pwmchip_put().

Fixes: 7b3dce814a15 ("rust: pwm: Add Kconfig and basic data structures")
Signed-off-by: Kari Argillander &lt;kari.argillander@gmail.com&gt;
Acked-by: Michal Wilczynski &lt;m.wilczynski@samsung.com&gt;
Link: https://patch.msgid.link/20260102-pwm-rust-v2-1-2702ce57d571@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: pwm: Add UnregisteredChip wrapper around Chip</title>
<updated>2026-01-20T17:38:05+00:00</updated>
<author>
<name>Markus Probst</name>
<email>markus.probst@posteo.de</email>
</author>
<published>2025-12-02T18:17:52+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=85a5ffbd56b236e96a7a22a631f9febf36d7ead5'/>
<id>urn:sha1:85a5ffbd56b236e96a7a22a631f9febf36d7ead5</id>
<content type='text'>
The `pwm::Registration::register` function provides no guarantee that the
function isn't called twice with the same pwm chip, which is considered
unsafe.

Add `pwm::UnregisteredChip` as wrapper around `pwm::Chip`.
Implement `pwm::UnregisteredChip::register` for the registration. This
function takes ownership of `pwm::UnregisteredChip` and therefore
guarantees that the registration can't be called twice on the same pwm
chip.

Signed-off-by: Markus Probst &lt;markus.probst@posteo.de&gt;
Tested-by: Michal Wilczynski &lt;m.wilczynski@samsung.com&gt;
Acked-by: Michal Wilczynski &lt;m.wilczynski@samsung.com&gt;
Link: https://patch.msgid.link/20251202-pwm_safe_register-v2-1-7a2e0d1e287f@posteo.de
[ukleinek: fixes a typo that Michal pointed out during review]
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: pwm: Update ARef and AlwaysRefCounted imports to use sync::aref</title>
<updated>2026-01-20T17:38:05+00:00</updated>
<author>
<name>Shankari Anand</name>
<email>shankari.ak0208@gmail.com</email>
</author>
<published>2025-11-23T09:24:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=5025569cb63060255834c95ab3779905aecf67b0'/>
<id>urn:sha1:5025569cb63060255834c95ab3779905aecf67b0</id>
<content type='text'>
Update call sites in `pwm.rs` to import `ARef` and `AlwaysRefCounted`
from `sync::aref` instead of `types`.

This aligns with the ongoing effort to move `ARef` and
`AlwaysRefCounted` to sync.

Suggested-by: Benno Lossin &lt;lossin@kernel.org&gt;
Link: https://github.com/Rust-for-Linux/linux/issues/1173
Signed-off-by: Shankari Anand &lt;shankari.ak0208@gmail.com&gt;
Acked-by: Michal Wilczynski &lt;m.wilczynski@samsung.com&gt;
Link: https://patch.msgid.link/20251123092438.182251-7-shankari.ak0208@gmail.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
</entry>
<entry>
<title>pwm: Fix Rust formatting</title>
<updated>2025-11-13T09:21:01+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2025-10-29T18:25:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=6fe9e919c144f1296d38e2abb10c7ac4320aa7fa'/>
<id>urn:sha1:6fe9e919c144f1296d38e2abb10c7ac4320aa7fa</id>
<content type='text'>
We do our best to keep the repository `rustfmt`-clean [1], thus run the
tool to fix the formatting issue.

A trailing empty comment [2] is added in order to preserve the wanted
style for imports (otherwise the tool will compact the first two items).

Link: https://rust-for-linux.com/contributing#submit-checklist-addendum [1]
Link: https://docs.kernel.org/rust/coding-guidelines.html#style-formatting [2]
Fixes: d8046cd50879 ("rust: pwm: Add complete abstraction layer")
Fixes: 7b3dce814a15 ("rust: pwm: Add Kconfig and basic data structures")
Fixes: e03724aac758 ("pwm: Add Rust driver for T-HEAD TH1520 SoC")
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Link: https://patch.msgid.link/20251029182502.783392-1-ojeda@kernel.org
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: pwm: Fix broken intra-doc link</title>
<updated>2025-11-13T09:20:17+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2025-10-29T18:19:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=51b4c0f9749d96d56887896383141e97916ac91b'/>
<id>urn:sha1:51b4c0f9749d96d56887896383141e97916ac91b</id>
<content type='text'>
`rustdoc` reports a broken intra-doc link:

    error: unresolved link to `Devres::register`
       --&gt; rust/kernel/pwm.rs:722:11
        |
    722 | /// via [`Devres::register`]. This ties the lifetime of the PWM chip registration
        |           ^^^^^^^^^^^^^^^^ no item named `Devres` in scope
        |
        = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`

Thus fix it.

Fixes: d8046cd50879 ("rust: pwm: Add complete abstraction layer")
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Link: https://patch.msgid.link/20251029181940.780629-1-ojeda@kernel.org
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: pwm: Drop wrapping of PWM polarity and state</title>
<updated>2025-11-07T09:22:43+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2025-10-25T12:23:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=a69a54f8dffb105b2df2e606b4c9f61127d006ac'/>
<id>urn:sha1:a69a54f8dffb105b2df2e606b4c9f61127d006ac</id>
<content type='text'>
These were introduced and used in an earlier revision of the patch that
became commit fb3957af9ec6 ("pwm: Add Rust driver for T-HEAD TH1520
SoC"). The variant that was actually applied sticks to the modern
waveform abstraction only (and other drivers are supposed to do that,
too), so they can be dropped.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://patch.msgid.link/20251025122359.361372-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
</content>
</entry>
</feed>
