All of lore.kernel.org
 help / color / mirror / Atom feed
From: vitor <vitor.soares@synopsys.com>
To: Przemyslaw Gaj <pgaj@cadence.com>,
	Boris Brezillon <bbrezillon@kernel.org>
Cc: linux-i3c@lists.infradead.org, psroka@cadence.com,
	rafalc@cadence.com, vitor <vitor.soares@synopsys.com>
Subject: Re: [PATCH 1/2] i3c: Add support for HDR modes.
Date: Fri, 22 Feb 2019 17:41:34 +0000	[thread overview]
Message-ID: <a4d2b1b8-f30f-4c12-a7ab-1bd2bccf1666@synopsys.com> (raw)
In-Reply-To: <20190222150248.GA28244@global.cadence.com>


On 22/02/19 15:02, Przemyslaw Gaj wrote:
>>>>  struct i3c_ibi_payload {
>>>> diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h
>>>> index ada956a..fd50473 100644
>>>> --- a/include/linux/i3c/master.h
>>>> +++ b/include/linux/i3c/master.h
>>>> @@ -386,6 +386,10 @@ struct i3c_bus {
>>>>   *		  This method is mandatory.
>>>>   * @priv_xfers: do one or several private I3C SDR transfers
>>>>   *		This method is mandatory.
>>>> + * @send_hdr_cmds: send one or several HDR commands. If there is more than one
>>>> + *		   command, they should ideally be sent in the same HDR
>>>> + *		   transaction.
>>>> + *		   This method is optional.
>>>>   * @attach_i2c_dev: called every time an I2C device is attached to the bus.
>>>>   *		    This is a good place to attach master controller specific
>>>>   *		    data to I2C devices.
>>>> @@ -457,6 +461,9 @@ struct i3c_master_controller_ops {
>>>>  	int (*priv_xfers)(struct i3c_dev_desc *dev,
>>>>  			  struct i3c_priv_xfer *xfers,
>>>>  			  int nxfers);
>>>> +	int (*send_hdr_cmds)(struct i3c_dev_desc *dev,
>>>> +			     const struct i3c_hdr_cmd *cmds,
>>>> +			     int ncmds);
>>>>  	int (*attach_i2c_dev)(struct i2c_dev_desc *dev);
>>>>  	void (*detach_i2c_dev)(struct i2c_dev_desc *dev);
>>>>  	int (*i2c_xfers)(struct i2c_dev_desc *dev,  
>>> With this approach the controller between a start and stop can only transmit in SDR or HDR.
>>>
>>> This is limited for devices that need the following frame:
>>>     <Start><SDR xfer><Repeated Start><HDR command><Stop>
> Actually, there is repeated start between SDR and ENTHDR. There is no repeated
> start between ENTHDR and HDR commands, HDR command has to start immedetly after
> ENTHDR. Of course, hdr restart may occur between HDR commands.

Sorry, I meant all HDR frame.


>> If this is a use case we want to support, then we should probably have
>> something more generic than what we currently have.
>>
>> Something like
>>
>> enum i3c_xfer_type {
>> 	I3C_CCC_XFER,
>> 	I3C_SDR_XFER,
>> 	I3C_HDR_XFER,
>> }
>>
>> struct i3c_xfer {
>> 	enum i3c_xfer_type type;
>> 	union {
>> 		struct i3c_ccc_cmd ccc;
>> 		struct i3c_priv_xfer sdr;
>> 		struct i3c_hdr_cmd hdr;
>> 	};
>> }

@Boris: I remember you don't want to expose CCC commands, I think at least for now we shouldn't expose too.

Do you agree?

>> struct i3c_master_controller_ops {
>> 	...
>> 	int (*i3c_xfers)(struct i3c_dev_desc *dev,
>> 			 struct i3c_xfer *xfers,
>> 			 int nxfers);
>> 	...
>> };
> I agree. This is something we should think of.


Best regards,
Vitor Soares

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

  reply	other threads:[~2019-02-22 17:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 12:18 [PATCH 0/2] Add the I3C HDR modes Przemyslaw Gaj
2018-12-13 12:18 ` [PATCH 1/2] i3c: Add support for " Przemyslaw Gaj
2018-12-13 12:44   ` Boris Brezillon
2019-02-21 15:15   ` vitor
2019-02-22 14:52     ` Boris Brezillon
2019-02-22 15:02       ` Przemyslaw Gaj
2019-02-22 17:41         ` vitor [this message]
2019-02-25  8:56           ` Boris Brezillon
2019-02-25 12:56             ` vitor
2019-02-25 13:10               ` Boris Brezillon
2019-02-25 16:45                 ` vitor
2019-02-25 17:03                   ` Boris Brezillon
2018-12-13 12:18 ` [PATCH 2/2] i3c: master: cdns: Add support for HDR-DDR mode Przemyslaw Gaj
2018-12-13 12:45   ` 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=a4d2b1b8-f30f-4c12-a7ab-1bd2bccf1666@synopsys.com \
    --to=vitor.soares@synopsys.com \
    --cc=bbrezillon@kernel.org \
    --cc=linux-i3c@lists.infradead.org \
    --cc=pgaj@cadence.com \
    --cc=psroka@cadence.com \
    --cc=rafalc@cadence.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.