From nobody Mon Dec 1 21:32:41 2025 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E046E2E3B0D for ; Mon, 1 Dec 2025 08:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764579268; cv=none; b=hv3ov6M9skCaSK6BO4htQBo0YUZZLVtIYzXHjVCf6nLjidgE/KbkQB2kqCK/PoVXxk4J2jR+ciY1qBwz5LPOcO5VZKZtjVZqyOZKXC314iKZXUaPM3GuR5bN/A0Ffji0josz836o5p0hZ49QCQD2X9e2TfVuYx1exMy6omHCE+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764579268; c=relaxed/simple; bh=OAxr5rndUE1p71G4GvlaIJ7vknpLMgy0h/ZyMFhryPs=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=SHum7nvZJhK0hVXNT5OtjJ/qoN9lmf3UqndNB9RdyuTXZMQ0FX3fVEG6mATzrf+8+Xn5DNC4h2QpxVNe6PNSjWo4QoKPlqxUUsxxvfhQJo6dCqeKcsdEH34/yO/5NgJi7QMb4Ibh+3mjfqypcV/HFRVMRkHlXBhnpYesY3TnWLA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=vRFwZu4y; arc=none smtp.client-ip=209.85.208.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="vRFwZu4y" Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-640b0639dabso6936450a12.3 for ; Mon, 01 Dec 2025 00:54:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1764579263; x=1765184063; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=j5faQ3nMBeXf/+sW6UR7r18N5IMAq8XFYfUScP7vIOw=; b=vRFwZu4yEVO1qFh3yVLhXV+lDAl+LKnH0+AwZk6QmhTXyRbngy1AKNIqc8zjEYlECU PibDp2bhourpmkrKqNZ5eBfRM26QgDGfsfEShn72esDKwz7SsriLkN92hM9FMCac+1+t zyrepyIXGC9XcugfbRHKAhQR7u+HlX3KFNTZnahDf7HlVQj+Y/wehiwSSb4tFijb5C8z pRDneAB/RJ6t+LbBjmD+zlxNmihGi82A714vjY89d3KvIlE283szJ0pREi/2XMR6siuD uc6k/YTIUs4v44cSiBVNsnryrAkkNqyeOgWRINzrHS3A4MUnHNX/DjsktrKvI3UPdypf CBRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764579263; x=1765184063; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j5faQ3nMBeXf/+sW6UR7r18N5IMAq8XFYfUScP7vIOw=; b=HtF1bsilfYjMBXKnh7hciniQ/hMX8S3fXMaPMndZLxh5BVY66rQ9URi6itXwoMsDR7 HmMIkozlDkruGXl3g77crbcJoIVFpX5eBq9ncznG+mXLMVw+f9BtA5xVbY3xUdrdz7/1 9PUK/vgCQJQxd4hzaBzdDX+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2002:a17:906:fe47:b0:b76:2667:7717 with SMTP id a640c23a62f3a-b76718ab19cmr4489495566b.56.1764579263062; Mon, 01 Dec 2025 00:54:23 -0800 (PST) Received: from localhost (p200300f65f0066088b503b97e2761468.dip0.t-ipconnect.de. [2003:f6:5f00:6608:8b50:3b97:e276:1468]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-b76f5a265d4sm1161594966b.60.2025.12.01.00.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Dec 2025 00:54:22 -0800 (PST) Date: Mon, 1 Dec 2025 09:54:20 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Linus Torvalds Cc: Daniel Gomez , linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Wilczynski Subject: [GIT PULL] pwm: Changes for v6.19-rc1 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jyluvubzjghhyklc" Content-Disposition: inline --jyluvubzjghhyklc Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [GIT PULL] pwm: Changes for v6.19-rc1 MIME-Version: 1.0 Content-Type: text/plain; protected-headers="v1"; charset="utf-8" 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/p= wm/for-6.19-rc1 for you to fetch changes up to fae00ea9f00367771003ace78f29549dead58fc7: pwm: rzg2l-gpt: Allow checking period_tick cache value only if sibling ch= annel 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=20 0b24f9740f26 rust: module: update the module macro with module parameter s= upport 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=20 description: Option, alias: Option>, firmware: Option>, + imports_ns: Option>, + params: Option>, + } +=20 + #[derive(Debug)] + struct Parameter { + name: String, + ptype: String, + default: String, + description: String, + } +=20 + fn expect_params(it: &mut token_stream::IntoIter) -> Vec { + let params =3D expect_group(it); + assert_eq!(params.delimiter(), Delimiter::Brace); + let mut it =3D params.stream().into_iter(); + let mut parsed =3D Vec::new(); +=20 + loop { + let param_name =3D match it.next() { + Some(TokenTree::Ident(ident)) =3D> ident.to_string(), + Some(_) =3D> panic!("Expected Ident or end"), + None =3D> break, + }; +=20 + assert_eq!(expect_punct(&mut it), ':'); + let param_type =3D expect_ident(&mut it); + let group =3D expect_group(&mut it); + assert_eq!(group.delimiter(), Delimiter::Brace); + assert_eq!(expect_punct(&mut it), ','); +=20 + let mut param_it =3D group.stream().into_iter(); + let param_default =3D expect_param_default(&mut param_it); + let param_description =3D expect_string_field(&mut param_it, "des= cription"); + expect_end(&mut param_it); +=20 + parsed.push(Parameter { + name: param_name, + ptype: param_type, + default: param_default, + description: param_description, + }) + } +=20 + parsed } =20 impl ModuleInfo { @@@ -113,7 -263,7 +264,8 @@@ "license", "alias", "firmware", + "imports_ns", + "params", ]; const REQUIRED_KEYS: &[&str] =3D &["type", "name", "license"]; let mut seen_keys =3D Vec::new(); @@@ -139,7 -289,7 +291,8 @@@ "license" =3D> info.license =3D expect_string_ascii(it), "alias" =3D> info.alias =3D Some(expect_string_array(it)), "firmware" =3D> info.firmware =3D Some(expect_string_arra= y(it)), + "imports_ns" =3D> info.imports_ns =3D Some(expect_string_= array(it)), + "params" =3D> info.params =3D Some(expect_params(it)), _ =3D> panic!("Unknown key \"{key}\". Valid keys are: {EX= PECTED_KEYS:?}."), } =20 @@@ -179,30 -329,25 +332,30 @@@ pub(crate) fn module(ts: TokenStream) - // Rust does not allow hyphens in identifiers, use underscore instead. let ident =3D info.name.replace('-', "_"); let mut modinfo =3D ModInfoBuilder::new(ident.as_ref()); - if let Some(authors) =3D info.authors { + if let Some(authors) =3D &info.authors { for author in authors { - modinfo.emit("author", &author); + modinfo.emit("author", author); } } - if let Some(description) =3D info.description { - modinfo.emit("description", &description); + if let Some(description) =3D &info.description { + modinfo.emit("description", description); } modinfo.emit("license", &info.license); - if let Some(aliases) =3D info.alias { + if let Some(aliases) =3D &info.alias { for alias in aliases { - modinfo.emit("alias", &alias); + modinfo.emit("alias", alias); } } - if let Some(firmware) =3D info.firmware { + if let Some(firmware) =3D &info.firmware { for fw in firmware { - modinfo.emit("firmware", &fw); + modinfo.emit("firmware", fw); } } - if let Some(imports) =3D info.imports_ns { ++ if let Some(imports) =3D &info.imports_ns { + for ns in imports { - modinfo.emit("import_ns", &ns); ++ modinfo.emit("import_ns", ns); + } + } =20 // Built-in modules also export the `file` modinfo string. let file =3D 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 siblin= g 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=C3=B6nig (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 --jyluvubzjghhyklc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmktV7oACgkQj4D7WH0S /k5PLgf+OPkO9yys1W+ZzSB+XJjAgTULopUIqjIjak2MJO8eYtb1p6VnblEkYiff RcHKwQJyRSObJZrWY+fGSKIkYb7eWxn3An60+EEi5TBtdvhjlrkhjYrnKu3cwBh1 AWGIOHnEvu3iaHmHB7zKsUuSXi5RWJdFuXwBO3pnrNc40An1BN6cUuDoiHoOF50V HjeJzcEiVLMxNhBjH4bQ37LWXl0v21sLdZpQDDeEdiBRTYny6e4iV37RsL+Lpwmk pjpQ9eK9eEOwdWmkk1OGvPBcsswGszsql3D/RmgACSeUiuFjvBlihjzobP5mXwsk 2e/GzJAd7YTz2GveKAAahpHpxbtEjA== =yXXV -----END PGP SIGNATURE----- --jyluvubzjghhyklc--