Re: [PATCH 0/2] add fwnode support to reset subsystem
From: Philipp Zabel
Date: Wed Mar 23 2022 - 11:07:42 EST
Hi Clément,
On Mi, 2022-03-23 at 10:50 +0100, Clément Léger wrote:
> This series is part of a larger series which aims at adding fwnode
> support in multiple subsystems [1]. The goal of this series was to
> add support for software node in various subsystem but in a first
> time only the fwnode support had gained consensus and will be added
> to multiple subsystems.
Could you explain the purpose of this a little? From the referenced
mail it looks like this would be intended allow to register reset
controllers via software node? Are there any real systems where this
would be useful?
> For the moment ACPI node support is excluded from the fwnode support
> to avoid creating an unspecified ACPI reset device description.
Are there any plans or ongoing discussions to specify such a
description in the future? Right now I'm only aware of the ACPI _RST
method as used by this patch:
[1] https://lore.kernel.org/all/20220307135626.16673-1-kyarlagadda@xxxxxxxxxx/
> One question raised by this series is that I'm not sure if all reset
> drivers should be modified to use the new fwnode support or keep the
> existing device-tree support. Maintainer advice on that particular
> question will be welcome.
I would prefer not to have to switch all those small DT-only reset
controller drivers all over the tree from of_node to fwnode.
On the other hand, I think it would be good to avoid the direct of_node
assignment, possibly by letting devm_reset_controller_register()
initialize of_node or fwnode from the device for most cases, and by
adding of_reset_controller_register() and
fwnode_reset_controller_register() variants that take the node as an
argument for the rest.
That could allow to eventually get rid of the of_node pointer.
For those drivers that provide their own .of_xlate, I'm not sure it
would make sense to force them to use .fwnode_xlate if they don't
already have a reason to use fwnode on their own.
regards
Philipp