linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: Oleksii Moisieiev <Oleksii_Moisieiev@epam.com>
Cc: "sudeep.holla@arm.com" <sudeep.holla@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [RFC v5 2/5] drivers: firmware: scmi: Introduce scmi_get_max_msg_size function
Date: Thu, 2 Nov 2023 15:04:43 +0000	[thread overview]
Message-ID: <ZUO6iyNIbit7PCQ8@pluto> (raw)
In-Reply-To: <9c9660c1-ab64-4186-917d-2007d88ce7c7@epam.com>

On Thu, Nov 02, 2023 at 01:57:24PM +0000, Oleksii Moisieiev wrote:
> Hi Cristian,
> 

Hi,

> Just found an interesting note in the PINCTRL_CONFIG_SET command 
> description:
> 
> The maximum value of this field is limited by
> the transport used. The agent needs to specify
> this field such that the entire command can be
> accommodated within the transport chosen.
> 

Yes I am aware of that.

> Furthermore, I observed the absence of a skip_configs parameter.
> 
>  From my understanding, this implies that the maximum number of 
> configurations should not exceed the msg_max_size allowed by the 
> protocol, enabling the transmission of only one message to the SCMI 
> server at a time.
>

Yes that is correct, my understanding is that the transmitter is in
charge of building a message whose payload can fit into the maximum
message size allowed by the underlying configured transport.

> Given this constraint, it seems we might not require additional helper 
> functions. We could potentially just verify against msg_max_size.
> 

Indeed for that reason the scmi_get_max_msg_size that you introduced is
just enough since it allows you to peek into the transport and get the
max_msg_size...the misunderstanding is around the fact that I was simply
meaning that you should plug it into some new helper_ops so that yo can
call it like:

  max_msg = ph->hops->get_max_msg_size(ph);

(like iterators or get_extended_name)

Because in this way you could use it also when the protocol is build as
a loadable module, thing that now it is possible only for vendor defined
protocols, but we could also easily switch all the base protocols to be
selectable via Kconfig and =m in the future (if ever)

Your helper is fine by itself it is just that it cannot be called by a
protocol defined to loaded as a module because the symbol is not
exported and, indeed, we introduced the ph->hops thing just for this
reason, i.e. to have a set of common protocol utilities that can be
called even from loadable modules protocols without the need to export
every single symbol.

The reference to iterators and extended_name was misleading
probably...my bad...or I am still missing something :D

Thanks,
Cristian

  reply	other threads:[~2023-11-02 15:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27  6:28 [RFC v5 0/4] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Oleksii Moisieiev
2023-10-27  6:28 ` [RFC v5 1/5] firmware: arm_scmi: Add optional flags to extended names helper Oleksii Moisieiev
2023-11-02  7:06   ` Cristian Marussi
2023-10-27  6:28 ` [RFC v5 2/5] drivers: firmware: scmi: Introduce scmi_get_max_msg_size function Oleksii Moisieiev
2023-11-02  7:29   ` Cristian Marussi
2023-11-02 13:57     ` Oleksii Moisieiev
2023-11-02 15:04       ` Cristian Marussi [this message]
2023-10-27  6:28 ` [RFC v5 3/5] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Oleksii Moisieiev
2023-11-02  8:06   ` Cristian Marussi
2023-11-06  2:26     ` AKASHI Takahiro
2023-11-06  2:28       ` AKASHI Takahiro
2023-10-27  6:28 ` [RFC v5 4/5] pinctrl: Implementation of the generic scmi-pinctrl driver Oleksii Moisieiev
2023-10-27  6:28 ` [RFC v5 5/5] dt-bindings: firmware: arm,scmi: Add support for pinctrl protocol Oleksii Moisieiev
2023-10-27  8:56   ` Krzysztof Kozlowski
2023-11-01 14:09     ` Oleksii Moisieiev
2023-10-27 11:54   ` Rob Herring
2023-11-06 13:12   ` Linus Walleij
2023-11-10  0:58     ` Takahiro Akashi
2023-11-10 15:24       ` Cristian Marussi
2023-11-13 12:56         ` Souvik Chakravarty
2023-11-13 13:32           ` Linus Walleij
2023-11-13 14:23             ` Souvik Chakravarty
2023-11-14 13:13               ` Linus Walleij
2023-11-05 21:50 ` [RFC v5 0/4] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Linus Walleij

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=ZUO6iyNIbit7PCQ8@pluto \
    --to=cristian.marussi@arm.com \
    --cc=Oleksii_Moisieiev@epam.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sudeep.holla@arm.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).