mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Philipp Zabel <p.zabel@pengutronix.de>, barebox@lists.infradead.org
Cc: lst@pengutronix.de, ukl@pengutronix.de
Subject: Re: [PATCH 02/10] driver: consult feature controller prior to device probe
Date: Thu, 18 Aug 2022 10:34:29 +0200	[thread overview]
Message-ID: <03ac6176-a090-f2ac-e01c-c01043cd5088@pengutronix.de> (raw)
In-Reply-To: <ceb58cd4e79f540e5036b15e545aa758df3aaeba.camel@pengutronix.de>

Hello Philipp,

On 18.08.22 10:19, Philipp Zabel wrote:
> Hi Ahmad,
> 
> On Do, 2022-08-18 at 07:19 +0200, Ahmad Fatoum wrote:
>> The newly added feature controller framework has two goals: Avoid
>> probing device in barebox that aren't indeed available
> 
> This specific wording makes me wonder why this isn't implemented inside
> of_device_is_available().
> 
> This would also take care of other devices querying device node
> availability, for example via of_graph_port_is_available(), if that
> ever happens.

I admit that restricting the barebox-side of feature controllers to device
probe can be limiting. For kernel fixup, any node may be disabled, unlike
with barebox, where only device probes can be skipped.

Placing the feature controller check in of_device_is_available is not
trivial. We currently do a single pass through the device tree and create
devices that are of_device_is_available(). If we start to look up the
feature controller there, we will need to do device creation in multiple
passes. While of_probe() can be called multiple times, I think there are
quite a few cornercase we will need to take into consideration when
doing this and are thus better addressed separately when the need arises.

Thanks,
Ahmad

> 
> regards
> Philipp
> 


-- 
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 |



  reply	other threads:[~2022-08-18  8:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18  5:19 [PATCH 00/10] Add new feature controller framework Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 01/10] driver: add " Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 02/10] driver: consult feature controller prior to device probe Ahmad Fatoum
2022-08-18  8:19   ` Philipp Zabel
2022-08-18  8:34     ` Ahmad Fatoum [this message]
2022-08-18  5:19 ` [PATCH 03/10] driver: featctrl: fixup kernel device tree Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 04/10] dt-bindings: add i.MX8M feature controller bindings Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 05/10] soc: imx: add i.MX8M feature controller driver Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 06/10] nvmem: import Linux nvmem_cell_read_variable_le_u32 Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 07/10] nvmem: ocotp: add i.MX8M[MN] feature controller support Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 08/10] ARM: dts: i.MX8MN: describe feature controller Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 09/10] RFC: soc: imx: imx8m-featctrl: add i.MX8M[MN] stand-alone driver Ahmad Fatoum
2022-08-18  5:19 ` [PATCH 10/10] RFC: ARM: dts: i.MX8MM: describe standlone feature controller Ahmad Fatoum
2022-08-30  7:32 ` [PATCH 00/10] Add new feature controller framework Sascha Hauer
2022-08-30  7:38   ` Ahmad Fatoum
2022-08-31  6:06     ` Sascha Hauer

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=03ac6176-a090-f2ac-e01c-c01043cd5088@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=lst@pengutronix.de \
    --cc=p.zabel@pengutronix.de \
    --cc=ukl@pengutronix.de \
    /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