Devicetree
 help / color / mirror / Atom feed
From: FUJITA Tomonori <tomo@aliasing.net>
To: miguel.ojeda.sandonis@gmail.com
Cc: markus.probst@posteo.de, a.hindborg@kernel.org, boqun@kernel.org,
	fujita.tomonori@gmail.com, frederic@kernel.org, lyude@redhat.com,
	tglx@kernel.org, anna-maria@linutronix.de, jstultz@google.com,
	sboyd@kernel.org, ilpo.jarvinen@linux.intel.com,
	hansg@kernel.org, bryan.odonoghue@linaro.org, lee@kernel.org,
	pavel@kernel.org, ojeda@kernel.org, gary@garyguo.net,
	bjorn3_gh@protonmail.com, lossin@kernel.org,
	aliceryhl@google.com, tmgross@umich.edu, dakr@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	gregkh@linuxfoundation.org, platform-driver-x86@vger.kernel.org,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v8 2/2] platform: Add initial synology microp driver
Date: Wed, 22 Apr 2026 22:48:47 +0900 (JST)	[thread overview]
Message-ID: <20260422.224847.2125717111398595185.fujita@bee> (raw)
In-Reply-To: <CANiq72k=8fmi0fJnNV=GgR5_HO_COWGynKDF-xzoX1nDAdxdrw@mail.gmail.com>

On Tue, 21 Apr 2026 20:46:59 +0200
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Tue, Apr 21, 2026 at 8:21 PM Markus Probst <markus.probst@posteo.de> wrote:
>>
>> Delta stores it in nano seconds, so it will require an additional
>> `.as_millis()` call on use. I assume rust will optimize that out, so it
>> will be fine. I will use the `Delta` type like Miguel suggested in the
>> next revision.
> 
> I think it should (at least in the 64-bit case -- we do have a
> `bindings::` C call in the 32-bit case, so likely not in that case),
> but please double-check the codegen.
> 
> In any case, my suggestion wasn't necessarily about using `Delta`,
> which is definitely an option to consider, but rather more generally
> about using newtypes, e.g. it may be that we want to have a few simple
> time unit types (probably with support for `const`) for cases like
> these if people are going to use primitives everywhere to define their
> `const`s -- Cc'ing the timekeeping Rust folks.

Currently, Msecs is a type alias, so it provides no type safety, and
it has no users in the kernel. I think we should remove it.

I think that Delta works fine for BLINK_DELAY. On 32-bit there is a
small overhead in as_millis(), but I don't think that will be a
problem significant enough to justify introducing new types.


  reply	other threads:[~2026-04-22 13:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 14:24 [PATCH v8 0/2] Introduce Synology Microp driver Markus Probst
2026-04-20 14:24 ` [PATCH v8 1/2] dt-bindings: embedded-controller: Add synology microp devices Markus Probst
2026-04-21  7:07   ` Krzysztof Kozlowski
2026-04-21 14:50     ` Markus Probst
2026-04-21 15:32       ` Krzysztof Kozlowski
2026-04-21 16:25         ` Markus Probst
2026-04-23  9:38           ` Krzysztof Kozlowski
2026-04-20 14:24 ` [PATCH v8 2/2] platform: Add initial synology microp driver Markus Probst
2026-04-21 11:59   ` Ilpo Järvinen
2026-04-21 14:17     ` Markus Probst
2026-04-21 14:58       ` Miguel Ojeda
2026-04-21 18:10       ` Ilpo Järvinen
2026-04-21 18:20         ` Markus Probst
2026-04-21 18:36           ` Ilpo Järvinen
2026-04-21 18:46           ` Miguel Ojeda
2026-04-22 13:48             ` FUJITA Tomonori [this message]
2026-04-21 15:33   ` Krzysztof Kozlowski
2026-04-21 16:29     ` Markus Probst
2026-04-20 15:55 ` [PATCH v8 0/2] Introduce Synology Microp driver Markus Probst

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=20260422.224847.2125717111398595185.fujita@bee \
    --to=tomo@aliasing.net \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=anna-maria@linutronix.de \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=dakr@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frederic@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jstultz@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=lyude@redhat.com \
    --cc=markus.probst@posteo.de \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=pavel@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@kernel.org \
    --cc=tmgross@umich.edu \
    /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