On Mon, 26 Nov 2018 20:11:39 +0000
vitor <vitor.soares@xxxxxxxxxxxx> wrote:
Look at the bus discovery mechanism, the notion of DCR (close to the
concept of USB class), or the fact that each dev has a unique
manufacturer+PID pair (which resemble the product/vendor ID concept)
that allows us to easily bind a dev to a driver without requiring a
static description.
That's called USB OTG. Okay, to be fair, it's not exactly the same, and
I'm not sure but I think that a controller cannot change between gadget
to host in USB in runtime.
the mastership handover in I3C is probably more complex than what we
have with USB OTG (I'm not a USB expert, so I might be wrong here).
Even so, this kind of behavior is more likelyMaybe.
to have in an I3C bus.
Sorry for that and don't take me wrong... maybe I should rise thisSo you have such a dual-role controller?
question early but this only came up now when I started splitting and
thinking where to put what is for master for slave, what is common and
the thing of putting everything of controller in a folder.
What I call a slave controller would be something that lets you reply to
SDR/DDR transactions or fill a generic regmap that would be exposed to
other masters on the bus. This way we could implement generic slave
drivers in Linux (the same way we have gadget drivers). Anything else
is likely to be to specific to be exposed as a generic framework.
Hm, not sure I like this idea either. So I see 2 options:
Taking the USB as exemple do you prefer a dwc folder on i3c root?
1/ put all controller drivers (both master and slave ones) in a common
directory (drivers/i3c/controllers) as you suggest, and prefix them
correctly (i3c-master-<ip>.c, i3c-slave-<ip>.c and i3c-dual-<ip>.c)
2/ place them in separate directories: drivers/i3c/{master,slave,dual}
I'm fine either way.
I think I understand your concerns now, but only because you started toI'm okay changing it, but I want to understand why the proposed
separation is not good.
I already tell you my use case and as I said maybe someone can advise :)
mention a few things that were not clearly stated before (at least, I
didn't understand it this way), like the fact that your controller (and
probably others too) supports dual-role, or the fact that you plan to
expose your IP through the PCI bus.