From: Sudeep Holla <sudeep.holla@arm.com>
To: "Ludvig Pärsson" <ludvig.parsson@axis.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
kernel@axis.com, Sumit Garg <sumit.garg@linaro.org>,
Sudeep Holla <sudeep.holla@arm.com>,
op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tee: optee: Populate child nodes in probe function
Date: Fri, 11 Nov 2022 16:13:36 +0000 [thread overview]
Message-ID: <20221111161336.msozo7l632jvbwcn@bogus> (raw)
In-Reply-To: <20221109160708.507481-1-ludvig.parsson@axis.com>
On Wed, Nov 09, 2022 at 05:07:08PM +0100, Ludvig Pärsson wrote:
> Currently there is no dependency between the "linaro,scmi-optee" driver
> and the tee_core. If the scmi-optee driver gets probed before the
> tee_bus_type is initialized, then we will get an unwanted error print.
>
> This patch enables putting scmi-optee nodes as children to the optee
> node in devicetree, which indirectly creates the missing dependency.
>
> Signed-off-by: Ludvig Pärsson <ludvig.parsson@axis.com>
> ---
> drivers/tee/optee/smc_abi.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
> index a1c1fa1a9c28..be6f02fd5a7f 100644
> --- a/drivers/tee/optee/smc_abi.c
> +++ b/drivers/tee/optee/smc_abi.c
> @@ -1533,6 +1533,11 @@ static int optee_probe(struct platform_device *pdev)
> if (rc)
> goto err_disable_shm_cache;
>
> + /* Populate any dependent child node (if any) */
> + rc = devm_of_platform_populate(&pdev->dev);
> + if (rc)
> + goto err_disable_shm_cache;
> +
While I agree with idea of populating dependent child nodes from here,
I am not sure if it is OK to give error if that fails or to just continue
as there may be other users(like the user-space) for the OPTEE in general.
--
Regards,
Sudeep
next prev parent reply other threads:[~2022-11-11 16:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 16:07 Ludvig Pärsson
2022-11-10 10:53 ` Sumit Garg
2022-11-10 12:09 ` Ludvig Pärsson
2022-11-11 9:57 ` Sumit Garg
2022-11-11 13:16 ` Ludvig Pärsson
2022-11-11 16:13 ` Sudeep Holla [this message]
2022-11-14 6:38 ` Sumit Garg
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=20221111161336.msozo7l632jvbwcn@bogus \
--to=sudeep.holla@arm.com \
--cc=jens.wiklander@linaro.org \
--cc=kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ludvig.parsson@axis.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=sumit.garg@linaro.org \
/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®