Re: [PATCH RESEND] pwm: th1520: Remove requirement for mul_u64_u64_div_u64_roundup
From: Maurice Hieronymus
Date: Mon May 25 2026 - 11:57:00 EST
On Mon, 2026-05-25 at 16:36 +0200, Michal Wilczynski wrote:
>
> To move forward, we should fix this by implementing the proper
> generic
> 64-bit math helper in the Rust abstractions, rather than narrowing
> the
> types here. Are you open to looking into adding the Rust equivalent
> for
> mul_u64_u64_div_u64_roundup instead?
I would be definitely down, to help with that.
Before I start working on it, a couple of clarification questions.
Should I implement this as a thin FFI wrapper calling the C-Functions?
Or do you prefer to have a re-implementation in Rust.
Since mul_u64_u64_div_u64_roundup is a macro: Is it okay if this will
be a small Rust function or should it be a macro as well?
Thanks a lot,
Maurice