From: Daniel Almeida <daniel.almeida@collabora.com>
To: Danilo Krummrich <dakr@kernel.org>
Cc: "Igor Korotin" <igor.korotin.linux@gmail.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
"Asahi Lina" <lina+kernel@asahilina.net>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Alex Hung" <alex.hung@amd.com>,
"Tamir Duberstein" <tamird@gmail.com>,
"Xiangfei Ding" <dingxiangfei2009@gmail.com>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH v4 1/3] rust: i2c: add basic I2C device and driver abstractions
Date: Tue, 9 Sep 2025 15:22:42 -0300 [thread overview]
Message-ID: <F8146F2E-E66B-4F47-816D-40AAFE8B65F7@collabora.com> (raw)
In-Reply-To: <DCOH6SUB5M7K.1K4V1DRAERH1S@kernel.org>
> On 9 Sep 2025, at 15:19, Danilo Krummrich <dakr@kernel.org> wrote:
>
> On Tue Sep 9, 2025 at 7:53 PM CEST, Daniel Almeida wrote:
>>> On 9 Sep 2025, at 14:19, Igor Korotin <igor.korotin.linux@gmail.com> wrote:
>>> On 8/27/2025 7:37 PM, Daniel Almeida wrote:
>>>>> + /// Returns the driver's private data from the matching entry in the [`i2c::IdTable`], if any.
>>>>> + ///
>>>>> + /// If this returns `None`, it means there is no match with an entry in the [`i2c::IdTable`].
>>>>> + fn i2c_id_info(dev: &I2cClient) -> Option<&'static <Self as driver::Adapter>::IdInfo> {
>>>> Again, perhaps a private member function? I’m trying to simplify the syntax here.
>>>
>>> Can you, please, kindly clarify what do you mean? If a function is not pub/pub(crate),
>>> it is a private function.
>>
>> I mean a function that takes &self or &mut self as applicable.
>
> This just turns things around you you have to pass in the Adapter type, which is
> required by this function. Having the device ID table and ID info accessors on
> the device structure doesn't really make sense.
>
> The current implementation is also in line with what we do in the driver core
> code and in other bus implementations, such as PCI.
Ok then, in which case feel free to disregard my previous comment :)
— Daniel
next prev parent reply other threads:[~2025-09-09 18:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 15:14 [PATCH v4 0/3] rust: i2c: Add basic I2C " Igor Korotin
2025-08-20 15:19 ` [PATCH v4 1/3] rust: i2c: add basic I2C device and " Igor Korotin
2025-08-27 18:37 ` Daniel Almeida
2025-09-09 17:19 ` Igor Korotin
2025-09-09 17:53 ` Daniel Almeida
2025-09-09 18:19 ` Danilo Krummrich
2025-09-09 18:22 ` Daniel Almeida [this message]
2025-08-20 15:21 ` [PATCH v4 2/3] rust: i2c: add manual I2C device creation abstractions Igor Korotin
2025-08-27 19:23 ` Daniel Almeida
2025-08-20 15:23 ` [PATCH v4 3/3] samples: rust: add Rust I2C sample driver Igor Korotin
2025-08-27 19:38 ` Daniel Almeida
2025-09-09 17:55 ` Igor Korotin
2025-09-09 18:34 ` Danilo Krummrich
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=F8146F2E-E66B-4F47-816D-40AAFE8B65F7@collabora.com \
--to=daniel.almeida@collabora.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=alex.hung@amd.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=dingxiangfei2009@gmail.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=igor.korotin.linux@gmail.com \
--cc=lina+kernel@asahilina.net \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@gmail.com \
--cc=tmgross@umich.edu \
--cc=viresh.kumar@linaro.org \
--cc=wedsonaf@gmail.com \
--cc=wsa+renesas@sang-engineering.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
all inboxes | Powered by JetHome®