From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 17/18] of: define of_devices_ensure_probed_by_compatible
Date: Mon, 13 Nov 2023 13:47:40 +0100 [thread overview]
Message-ID: <20231113124740.GQ3359458@pengutronix.de> (raw)
In-Reply-To: <20231110214421.2726093-18-a.fatoum@pengutronix.de>
On Fri, Nov 10, 2023 at 10:44:20PM +0100, Ahmad Fatoum wrote:
> We will need to ensure probe of OP-TEE from SCMI code in a follow-up
> commit, so add a small helper to facilitate this.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> include/of.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/include/of.h b/include/of.h
> index a7a1ce125fc0..7ebf1f02cc68 100644
> --- a/include/of.h
> +++ b/include/of.h
> @@ -1220,6 +1220,16 @@ int of_device_disable(struct device_node *node);
> int of_device_disable_path(const char *path);
> int of_device_disable_by_alias(const char *alias);
>
> +static inline int of_devices_ensure_probed_by_compatible(char *compatible)
Should the argument be const char *?
We would have to change struct of_device_id::compatible to const char *
as well, but at least a test build of multi_v8_defconfig showed no
problems with this change.
Sascha
> +{
> + struct of_device_id match_id[] = {
> + { .compatible = compatible, },
> + { /* sentinel */ },
> + };
> +
> + return of_devices_ensure_probed_by_dev_id(match_id);
> +}
> +
> phandle of_get_tree_max_phandle(struct device_node *root);
> phandle of_node_create_phandle(struct device_node *node);
> int of_set_property_to_child_phandle(struct device_node *node, char *prop_name);
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2023-11-13 12:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 21:44 [PATCH 00/18] prepare for porting OP-TEE communication support Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 01/18] include: provide linux/errno.h Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 02/18] include: add linux/refcount.h Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 03/18] bitops: split off linux/bits.h Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 04/18] include: import <linux/instruction_pointer.h> Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 05/18] asm-generic: split off typeconfused readl and friends Ahmad Fatoum
2023-11-13 12:40 ` Sascha Hauer
2023-11-10 21:44 ` [PATCH 06/18] asm-generic: migrate relaxed helpers into asm-generic/io.h Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 07/18] include: add linux/io.h with strict prototypes Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 08/18] include: import Linux word-at-a-time.h Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 09/18] string: implement strscpy Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 10/18] of: add CONFIG_OF for Linux compatibility Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 11/18] include: asm-generic/atomic.h: define atomic_cmpxchg Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 12/18] kbuild: build barebox for -std=gnu11 Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 13/18] include: linux/idr.h: implement more Linux API Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 14/18] include: implement dev_warn_once and friends Ahmad Fatoum
2023-11-13 12:38 ` Sascha Hauer
2023-11-10 21:44 ` [PATCH 15/18] include: add blocking notifier aliases Ahmad Fatoum
2023-11-13 12:39 ` Sascha Hauer
2023-11-10 21:44 ` [PATCH 16/18] include: add Linux ktime API Ahmad Fatoum
2023-11-10 21:44 ` [PATCH 17/18] of: define of_devices_ensure_probed_by_compatible Ahmad Fatoum
2023-11-13 12:47 ` Sascha Hauer [this message]
2023-11-10 21:44 ` [PATCH 18/18] include: add linux/device.h wrapper around driver.h Ahmad Fatoum
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=20231113124740.GQ3359458@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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