All of lore.kernel.org
 help / color / mirror / Atom feed
From: Przemyslaw Gaj <pgaj@cadence.com>
To: Boris Brezillon <bbrezillon@kernel.org>
Cc: linux-i3c@lists.infradead.org, psroka@cadence.com,
	rafalc@cadence.com, vitor.soares@synopsys.com
Subject: Re: [PATCH v2 1/3] i3c: Add support for mastership request to I3C subsystem
Date: Mon, 28 Jan 2019 10:37:15 +0000	[thread overview]
Message-ID: <20190128103714.GA619@global.cadence.com> (raw)
In-Reply-To: <20190115220953.400d06e7@bbrezillon>

The 01/15/2019 22:09, Boris Brezillon wrote:
> EXTERNAL MAIL
> 
> 
> > @@ -1727,6 +1836,13 @@ static int i3c_master_bus_init(struct i3c_master_controller *master)
> >  	}
> >  
> >  	/*
> > +	 * Don't reset addresses if this is secondary master.
> 
> When is the bitmap initialization happening then? I really think

What do you mean bitmap? Are you asking about slot statuses?

> secondary master init should happen early on and be limited to SW-side
> object initialization. We can have a separate function to do that, and
> maybe a separate register function too
> (i3c_{main,secondary}_master_register()).

Ok, I get it. Because of lack of information at secondary master init time, I
decided to register devices with full information. PID is blocking me. I'll try
to separate register routines.

> 
> > +	 * Secondary masters can't do DAA.
> > +	 */
> > +	if (master->secondary)
> > +		return 0;
> > +
> > +	/*
> >  	 * Reset all dynamic address that may have been assigned before
> >  	 * (assigned by the bootloader for example).
> >  	 */
> > index f13fd8b..16e7995 100644
> > --- a/include/linux/i3c/master.h
> > +++ b/include/linux/i3c/master.h
> > @@ -418,6 +418,21 @@ struct i3c_bus {
> >   *		      for a future IBI
> >   *		      This method is mandatory only if ->request_ibi is not
> >   *		      NULL.
> > + * @update_devs: updates device list. Called after bus takeover. Secondary
> > + *               master can't perform DAA procedure. This function allows to
> > + *               update devices received from previous bus owner in DEFSLVS
> > + *               command. Useful also when new device joins the bus controlled
> > + *               by secondary master, main master will be able to add
> > + *               this device after mastership takeover.
> 
> Do we really need this hook? AFAIU, this is only called from the master
> controller's work which is responsible with mastership handover, so
> this can be done entirely from the master driver without requiring help
> from the framework (just need to do it with the maintenance lock held).
> Am I missing something?
>

Actually, I use this hook at secondary master init time (in framework) to
register devices which could be received by DEFSLVS command. I can register
those devices in the driver. Separate secondary_master_register routine should
help in this case.

-- 
-- 
Przemyslaw Gaj

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

  reply	other threads:[~2019-01-28 10:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 17:43 [PATCH v2 0/3] Add the I3C mastership request Przemyslaw Gaj
2019-01-11 17:43 ` [PATCH v2 1/3] i3c: Add support for mastership request to I3C subsystem Przemyslaw Gaj
2019-01-15 21:09   ` Boris Brezillon
2019-01-28 10:37     ` Przemyslaw Gaj [this message]
2019-01-28 12:08       ` Boris Brezillon
2019-01-29 18:13     ` Przemyslaw Gaj
2019-01-30  7:56       ` Boris Brezillon
2019-01-30  8:29         ` Przemyslaw Gaj
2019-01-30  8:38           ` Boris Brezillon
2019-01-11 17:43 ` [PATCH v2 2/3] i3c: master: cdns: add support for mastership request to Cadence I3C master driver Przemyslaw Gaj
2019-01-15 21:36   ` Boris Brezillon
2019-01-11 17:43 ` [PATCH v2 3/3] i3c: master: Add module author Przemyslaw Gaj
2019-01-15 21:11   ` Boris Brezillon
2019-01-15 21:40     ` Boris Brezillon

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=20190128103714.GA619@global.cadence.com \
    --to=pgaj@cadence.com \
    --cc=bbrezillon@kernel.org \
    --cc=linux-i3c@lists.infradead.org \
    --cc=psroka@cadence.com \
    --cc=rafalc@cadence.com \
    --cc=vitor.soares@synopsys.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.