mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Probst <markus.probst@posteo.de>
To: skxby <2374604267@qq.com>, Guenter Roeck <linux@roeck-us.net>
Cc: Donjuanplatinum <donplat@barrensea.org>,
	linux-hwmon@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] rust: hwmon: add hwmon abstractions
Date: Fri, 04 Dec 2026 16:42:58 +0000	[thread overview]
Message-ID: <b4dd895f6c5495a2e932f81017a616a879373e85.camel@posteo.de> (raw)
In-Reply-To: <tencent_95E7F9B5CE294CA4027A0CD4C550B454050A@qq.com>

[-- Attachment #1: Type: text/plain, Size: 1829 bytes --]

On Fri, 2026-10-16 at 15:24 +0800, skxby wrote:
> > > From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
> From: skxby <2374604267@qq.com>
> Date: Fri, 16 Oct 2026 15:12:27 +0800
> Subject: [PATCH 1/2] rust: hwmon: add hwmon abstractions
> 
> Add Rust abstractions for the hwmon subsystem.
> 
> The main type is Registration<T>, which owns and pins its inner state,
> registers the hwmon device, and unregisters it on drop. A Driver trait
> provides callbacks for the temperature and chip attribute families; the
> chip callbacks are optional, following the existing #[vtable] idiom used
> by other subsystems. Channel configuration masks are derived from the
> modeled attribute enums.
> 
> This is a rework of the abstraction proposed in the RFC "rust: hwmon:
> add basic hwmon abstractions" [1], brought up to the current rust tree:
> registration does not use devm, the sensor type enumeration covers the
> chip family in addition to the temperature family, and the resource is
> released explicitly on the registration error path.
> 
> [1] https://lore.kernel.org/all/20260512155747.10136-1-donplat@barrensea.org/
> 
> Signed-off-by: skxby <2374604267@qq.com>
> ---
>  rust/bindings/bindings_helper.h |   1 +
>  rust/kernel/hwmon.rs            | 491 ++++++++++++++++++++++++++++++++
>  rust/kernel/lib.rs              |   2 +
>  3 files changed, 494 insertions(+)
>  create mode 100644 rust/kernel/hwmon.rs
> 
please add me to CC.

Also, you mentioned "v2 is being finalized" almost 2 months ago [1]. I
haven't found it on the LKML. If it has been sent, please link me to
it.

You should also add an entry to the MAINTAINERS file in this patch.

Thanks
- Markus Probst

[1]
https://lore.kernel.org/all/tencent_3A4DA800AA0FC8C76CB748048FFA0DCC210A@qq.com/

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]

      reply	other threads:[~2026-12-04 16:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <179213545522.40444.8748988877722946371@qq.com>
2026-10-16  7:24 ` [PATCH 2/2] hwmon: (tmp108) add Rust TMP108 driver skxby
2026-10-16  7:24 ` [PATCH 1/2] rust: hwmon: add hwmon abstractions skxby
2026-12-04 16:42   ` Markus Probst [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4dd895f6c5495a2e932f81017a616a879373e85.camel@posteo.de \
    --to=markus.probst@posteo.de \
    --cc=2374604267@qq.com \
    --cc=donplat@barrensea.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®