Messages in this thread | | | From | Saravana Kannan <> | Date | Thu, 2 Sep 2021 10:58:29 -0700 | Subject | Re: [PATCH v1 1/2] driver core: fw_devlink: Add support for FWNODE_FLAG_BROKEN_PARENT |
| |
On Thu, Sep 2, 2021 at 10:41 AM Andrew Lunn <andrew@lunn.ch> wrote: > > > How would this be avoided? Or are you thinking of some kind of two-level > > component driver system: > > - the DSA switch is a component master, with components being its > > sub-devices such as internal PHYs etc > > - the DSA switch is also a component of the DSA switch tree > > I think you might be missing a level. Think about the automotive > reference design system you posted the DT for a couple of days > ago. Don't you have cascaded switches, which are not members of the > same DSA tree. You might need a component for that whole group of > switches, above what you suggest here. > > Can you nest components? How deep can you nest them?
As far as I know you can nest components.
Also, technically you can make your own lightweight component model like behaviour using stateful device links or fwnode links (probably just a simple for loop). Just create a new "dsa_switch_tree" device and create device links between that and whatever other devices that need to probe first. And then you'll just have a common "dsa_switch_tree" driver that probes these types of devices.
I'm waiting for [1] to land before I jump in and clean up the component model to be more flexible and cleaner by using device links. The current implementation does a lot of stuff that device links will take care of for free.
[1] - https://lore.kernel.org/lkml/CAGETcx-mRrqC_sGiBk+wx8RtwjJjXf0KJo+ejU6SweEBiATaLw@mail.gmail.com/
-Saravana
| |