From: Benno Lossin <benno.lossin@proton.me>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Alice Ryhl" <aliceryhl@google.com>,
linux-pm@vger.kernel.org,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Stephen Boyd" <sboyd@kernel.org>, "Nishanth Menon" <nm@ti.com>,
rust-for-linux@vger.kernel.org,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Erik Schilling" <erik.schilling@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Joakim Bech" <joakim.bech@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 3/3] cpufreq: Add Rust based cpufreq-dt driver
Date: Thu, 25 Apr 2024 15:54:27 +0000 [thread overview]
Message-ID: <f02e0c3f-1e24-4ecc-8729-81d99f7543fc@proton.me> (raw)
In-Reply-To: <20240422103050.tiecvamrd5upunou@vireshk-i7>
On 22.04.24 12:30, Viresh Kumar wrote:
> On 07-04-24, 10:17, Benno Lossin wrote:
>> On 07.04.24 11:54, Benno Lossin wrote:
>>> On 05.04.24 13:09, Viresh Kumar wrote:
>>>> +// Finds exact supply name from the OF node.
>>>> +fn find_supply_name_exact(np: *mut bindings::device_node, name: &str) -> Option<CString> {
>>>> + let sname = CString::try_from_fmt(fmt!("{}-supply", name)).ok()?;
>>>> +
>>>> + // SAFETY: The OF node is guaranteed by the C code to be valid.
>>>> + let pp = unsafe { bindings::of_find_property(np, sname.as_ptr() as *mut _, ptr::null_mut()) };
>>>
>>> Drivers should avoid calling `unsafe` code as much as possible. They
>>> also should not be calling `bindings` code directly. Please write (or
>>> find) abstractions for these `unsafe` calls.
>>
>> Having re-read the cover letter, I see that you are already aware of
>> this. If you need any help with creating the abstractions, feel free to
>> reach out!
>
> Thanks Benno. I am not sure what's the right approach here as there
> are so many missing things (frameworks) I need. Though I don't need
> full support for them but just a handful of APIs.
>
> And then there is dependency on the generic support for device/driver,
> platform device/driver, etc.
I don't know exactly what you are referring to, but you can try to reach
out to other people on our zulip. Splitting the work with others could
help you :)
Also if the frameworks that you need are particularly difficult to
upstream, because they have a lot of dependencies, then you can try to
create something similar to [1].
[1]: https://github.com/Rust-for-Linux/linux/issues/1004
--
Cheers,
Benno
prev parent reply other threads:[~2024-04-25 16:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 11:09 [RFC PATCH 0/3] Rust bindings for cpufreq and OPP core + sample driver Viresh Kumar
2024-04-05 11:09 ` [RFC PATCH 1/3] rust: Add bindings for OPP framework Viresh Kumar
2024-04-07 9:54 ` Benno Lossin
2024-04-22 10:24 ` Viresh Kumar
2024-04-25 15:51 ` Benno Lossin
2024-04-05 11:09 ` [RFC PATCH 2/3] rust: Add bindings for cpufreq framework Viresh Kumar
2024-04-05 11:09 ` [RFC PATCH 3/3] cpufreq: Add Rust based cpufreq-dt driver Viresh Kumar
2024-04-07 9:54 ` Benno Lossin
2024-04-07 10:17 ` Benno Lossin
2024-04-22 10:30 ` Viresh Kumar
2024-04-25 15:54 ` Benno Lossin [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=f02e0c3f-1e24-4ecc-8729-81d99f7543fc@proton.me \
--to=benno.lossin@proton.me \
--cc=a.hindborg@samsung.com \
--cc=alex.bennee@linaro.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=erik.schilling@linaro.org \
--cc=gary@garyguo.net \
--cc=joakim.bech@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=nm@ti.com \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=wedsonaf@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).