Linux-i3c Archive mirror
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Ben Dooks <ben.dooks@sifive.com>, linux-i3c@lists.infradead.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Matt Johnston <matt@codeconstruct.com.au>,
	Joel Stanley <joel@jms.id.au>
Subject: Re: [PATCH] i3c: Allow OF-alias-based persistent bus numbering
Date: Wed, 05 Apr 2023 20:40:20 +0800	[thread overview]
Message-ID: <5e48f373e7df77acd95964ea5c18f8d92b8a4582.camel@codeconstruct.com.au> (raw)
In-Reply-To: <d3391a58-a272-9432-8d61-887bb23727b1@sifive.com>

Hi Ben,

> > @@ -419,9 +420,9 @@ static void i3c_bus_cleanup(struct i3c_bus *i3cbus)
> >         mutex_unlock(&i3c_core_lock);
> >   }
> >   
> > -static int i3c_bus_init(struct i3c_bus *i3cbus)
> > +static int i3c_bus_init(struct i3c_bus *i3cbus, struct device_node *np)
> 
> would it be worth passing the struct i3c_master_controller through
> this in case other info is needed at a later date? Does ACPI have
> anything similar?

We could certainly add other platform enumeration data in future, but I
don't know enough about ACPI device discovery to cater for everything at
this stage.

I'm just passing the OF node because that's all we need now; we can
certainly extend once we have a concrete pattern for other platforms -
this is just a static function, so it'll be easy to update.

If we want to follow i2c: for non-OF-based static bus numbering, it's up
to whatever is instantiating the i2c bus device to provide an id for
i2c_add_numbered_adapter(). We don't have any users for that in i3c at
present though, so it's probably a bit premature to add an equivalent
API.

Cheers,


Jeremy

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

      reply	other threads:[~2023-04-05 12:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05  9:41 [PATCH] i3c: Allow OF-alias-based persistent bus numbering Jeremy Kerr
2023-04-05 10:34 ` Ben Dooks
2023-04-05 12:40   ` Jeremy Kerr [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=5e48f373e7df77acd95964ea5c18f8d92b8a4582.camel@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=alexandre.belloni@bootlin.com \
    --cc=ben.dooks@sifive.com \
    --cc=joel@jms.id.au \
    --cc=linux-i3c@lists.infradead.org \
    --cc=matt@codeconstruct.com.au \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).