lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ew3w7xtjwbsk77bzdjj2fek3z5kzou2su2gdhdn5qqrnboyxgj@sqmo7mn5myes>
Date: Mon, 1 Dec 2025 09:54:20 +0100
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Daniel Gomez <da.gomez@...sung.com>, linux-pwm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Michal Wilczynski <m.wilczynski@...sung.com>
Subject: [GIT PULL] pwm: Changes for v6.19-rc1

Hello Linus,

the following changes since commit f84fd5bec502447df145f31734793714690ce27f:

  pwm: adp5585: Correct mismatched pwm chip info (2025-11-14 11:55:56 +0100)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git tags/pwm/for-6.19-rc1

for you to fetch changes up to fae00ea9f00367771003ace78f29549dead58fc7:

  pwm: rzg2l-gpt: Allow checking period_tick cache value only if sibling channel is enabled (2025-11-27 09:58:07 +0100)

for the merge window leading to (I guess) 6.19-rc1.

----------------------------------------------------------------
pwm: Changes for v6.19-rc1

Additional to the usual mix of core cleanups, driver changes, minor
fixes and device tree updates the highlight this cycle is Rust support
for the core and a first Rust driver both provided by Michal Wilczynski.
Michal wrote about these changes on
https://mwilczynski.dev/posts/bringing-rust-to-the-pwm-subsystem/ which
is a nice read.

----------------------------------------------------------------

There is a merge conflict with the modules tree, commits 

	0b24f9740f26 rust: module: update the module macro with module parameter support
	3809d7a89fe5 rust: module: use a reference in macros::module::module

currently in next. I think there is no pull request for these yet. The
conflict is resolved correctly in next, the resolution is straight
forward apart from moving a & in the last hunk about import_ns which is
a continuation of 3809d7a89fe5 for the changes added in commit
739ad9be61e5 ("rust: macros: Add support for 'imports_ns' to module!").
For reference here is my resolution:

diff --cc rust/macros/module.rs
index 408cd1154875,d62e9c1e2a89..000000000000
--- a/rust/macros/module.rs
+++ b/rust/macros/module.rs
@@@ -98,7 -205,50 +205,51 @@@ struct ModuleInfo 
      description: Option<String>,
      alias: Option<Vec<String>>,
      firmware: Option<Vec<String>>,
 +    imports_ns: Option<Vec<String>>,
+     params: Option<Vec<Parameter>>,
+ }
+ 
+ #[derive(Debug)]
+ struct Parameter {
+     name: String,
+     ptype: String,
+     default: String,
+     description: String,
+ }
+ 
+ fn expect_params(it: &mut token_stream::IntoIter) -> Vec<Parameter> {
+     let params = expect_group(it);
+     assert_eq!(params.delimiter(), Delimiter::Brace);
+     let mut it = params.stream().into_iter();
+     let mut parsed = Vec::new();
+ 
+     loop {
+         let param_name = match it.next() {
+             Some(TokenTree::Ident(ident)) => ident.to_string(),
+             Some(_) => panic!("Expected Ident or end"),
+             None => break,
+         };
+ 
+         assert_eq!(expect_punct(&mut it), ':');
+         let param_type = expect_ident(&mut it);
+         let group = expect_group(&mut it);
+         assert_eq!(group.delimiter(), Delimiter::Brace);
+         assert_eq!(expect_punct(&mut it), ',');
+ 
+         let mut param_it = group.stream().into_iter();
+         let param_default = expect_param_default(&mut param_it);
+         let param_description = expect_string_field(&mut param_it, "description");
+         expect_end(&mut param_it);
+ 
+         parsed.push(Parameter {
+             name: param_name,
+             ptype: param_type,
+             default: param_default,
+             description: param_description,
+         })
+     }
+ 
+     parsed
  }
  
  impl ModuleInfo {
@@@ -113,7 -263,7 +264,8 @@@
              "license",
              "alias",
              "firmware",
 +            "imports_ns",
+             "params",
          ];
          const REQUIRED_KEYS: &[&str] = &["type", "name", "license"];
          let mut seen_keys = Vec::new();
@@@ -139,7 -289,7 +291,8 @@@
                  "license" => info.license = expect_string_ascii(it),
                  "alias" => info.alias = Some(expect_string_array(it)),
                  "firmware" => info.firmware = Some(expect_string_array(it)),
 +                "imports_ns" => info.imports_ns = Some(expect_string_array(it)),
+                 "params" => info.params = Some(expect_params(it)),
                  _ => panic!("Unknown key \"{key}\". Valid keys are: {EXPECTED_KEYS:?}."),
              }
  
@@@ -179,30 -329,25 +332,30 @@@ pub(crate) fn module(ts: TokenStream) -
      // Rust does not allow hyphens in identifiers, use underscore instead.
      let ident = info.name.replace('-', "_");
      let mut modinfo = ModInfoBuilder::new(ident.as_ref());
-     if let Some(authors) = info.authors {
+     if let Some(authors) = &info.authors {
          for author in authors {
-             modinfo.emit("author", &author);
+             modinfo.emit("author", author);
          }
      }
-     if let Some(description) = info.description {
-         modinfo.emit("description", &description);
+     if let Some(description) = &info.description {
+         modinfo.emit("description", description);
      }
      modinfo.emit("license", &info.license);
-     if let Some(aliases) = info.alias {
+     if let Some(aliases) = &info.alias {
          for alias in aliases {
-             modinfo.emit("alias", &alias);
+             modinfo.emit("alias", alias);
          }
      }
-     if let Some(firmware) = info.firmware {
+     if let Some(firmware) = &info.firmware {
          for fw in firmware {
-             modinfo.emit("firmware", &fw);
+             modinfo.emit("firmware", fw);
          }
      }
-     if let Some(imports) = info.imports_ns {
++    if let Some(imports) = &info.imports_ns {
 +        for ns in imports {
-             modinfo.emit("import_ns", &ns);
++            modinfo.emit("import_ns", ns);
 +        }
 +    }
  
      // Built-in modules also export the `file` modinfo string.
      let file =

Sorry for that inconvenience.

Please pull this for v6.19-rc1.

Best regards
Uwe


Benjamin Larsson (1):
      pwm: airoha: Add support for EN7581 SoC

Biju Das (1):
      pwm: rzg2l-gpt: Allow checking period_tick cache value only if sibling channel is enabled

Chen Ni (1):
      pwm: mediatek: Remove unneeded semicolon

Mathieu Dubois-Briand (1):
      pwm: max7360: Clean MAX7360 code

Michal Wilczynski (9):
      rust: macros: Add support for 'imports_ns' to module!
      pwm: Export `pwmchip_release` for external use
      rust: pwm: Add Kconfig and basic data structures
      rust: pwm: Add complete abstraction layer
      rust: pwm: Add module_pwm_platform_driver! macro
      pwm: Add Rust driver for T-HEAD TH1520 SoC
      dt-bindings: pwm: thead: Add T-HEAD TH1520 PWM controller
      pwm: th1520: Fix clippy warning for redundant struct field init
      pwm: th1520: Use module_pwm_platform_driver! macro

Miguel Ojeda (2):
      rust: pwm: Fix broken intra-doc link
      pwm: Fix Rust formatting

Uwe Kleine-König (8):
      rust: pwm: Drop wrapping of PWM polarity and state
      pwm: Simplify printf to emit chip->npwm in $debugfs/pwm
      pwm: Use %u to printf unsigned int pwm_chip::npwm and pwm_chip::id
      pwm: Drop unused function pwm_apply_args()
      pwm: mediatek: Convert to waveform API
      pwm: mediatek: Make use of struct_size macro
      Merge branch 'pwm/th1520' into pwm/for-next
      pwm: bcm2835: Make sure the channel is enabled after pwm_request()

 .../devicetree/bindings/pwm/thead,th1520-pwm.yaml  |  48 ++
 MAINTAINERS                                        |  10 +
 drivers/pwm/Kconfig                                |  33 +
 drivers/pwm/Makefile                               |   2 +
 drivers/pwm/core.c                                 |   8 +-
 drivers/pwm/pwm-airoha.c                           | 622 +++++++++++++++++
 drivers/pwm/pwm-bcm2835.c                          |  28 +-
 drivers/pwm/pwm-max7360.c                          |   2 +-
 drivers/pwm/pwm-mediatek.c                         | 335 ++++++----
 drivers/pwm/pwm-rzg2l-gpt.c                        |  15 +-
 drivers/pwm/pwm_th1520.rs                          | 387 +++++++++++
 include/linux/pwm.h                                |  39 +-
 rust/bindings/bindings_helper.h                    |   1 +
 rust/helpers/helpers.c                             |   1 +
 rust/helpers/pwm.c                                 |  20 +
 rust/kernel/lib.rs                                 |   2 +
 rust/kernel/pwm.rs                                 | 735 +++++++++++++++++++++
 rust/macros/module.rs                              |   8 +
 18 files changed, 2096 insertions(+), 200 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pwm/thead,th1520-pwm.yaml
 create mode 100644 drivers/pwm/pwm-airoha.c
 create mode 100644 drivers/pwm/pwm_th1520.rs
 create mode 100644 rust/helpers/pwm.c
 create mode 100644 rust/kernel/pwm.rs


Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ