From: Przemyslaw Gaj <pgaj@cadence.com> To: Boris Brezillon <boris.brezillon@bootlin.com> Cc: Arnd Bergmann <arnd@arndb.de>, Vitor Soares <Vitor.Soares@synopsys.com>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, Sekhar Nori <nsekhar@ti.com>, Wolfram Sang <wsa@the-dreams.de>, Linux I2C <linux-i2c@vger.kernel.org>, Jonathan Corbet <corbet@lwn.net>, "open list:DOCUMENTATION" <linux-doc@vger.kernel.org>, gregkh <gregkh@linuxfoundation.org>, Przemyslaw Sroka <psroka@cadence.com>, Arkadiusz Golec <agolec@cadence.com>, Alan Douglas <adouglas@cadence.com>, Bartosz Folta <bfolta@cadence.com>, Damian Kos <dkos@cadence.com>, Alicja Jurasik-Urbaniak <alicja@cadence.com>, Cyprian Wronka <cwronka@cadence.com>, Suresh Punnoose <sureshp@cadence.com>, Rafal Ciepiela <rafalc@cadence.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Nis Subject: Re: [PATCH v6 01/10] i3c: Add core I3C infrastructure Date: Thu, 6 Sep 2018 14:20:55 +0000 [thread overview] Message-ID: <A207EE0E-9DBC-4A39-822C-37B09D0F81B3@cadence.com> (raw) In-Reply-To: <20180906160947.3c80072f@bbrezillon> On 9/6/18, 4:10 PM, "Boris Brezillon" <boris.brezillon@bootlin.com> wrote: EXTERNAL MAIL On Thu, 6 Sep 2018 13:47:29 +0000 Przemyslaw Gaj <pgaj@cadence.com> wrote: > On 9/6/18, 3:14 PM, "Boris Brezillon" <boris.brezillon@bootlin.com> wrote: > > EXTERNAL MAIL > > > On Thu, 6 Sep 2018 14:59:46 +0200 > Arnd Bergmann <arnd@arndb.de> wrote: > > > On Thu, Sep 6, 2018 at 2:43 PM Przemyslaw Gaj <pgaj@cadence.com> wrote: > > > > > > Hi Boris, Vitor, > > > > > > This repository does not contain full kernel sources, but it should be enough to discuss mastership request feature. > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_przemekgaj_i3c-2Dlinux_commit_d54fe68a9d3e573c0c454a2c6f1afafc20142ec5&d=DwICAg&c=aUq983L2pue2FqKFoP6PGHMJQyoJ7kl3s3GZ-_haXqY&r=CMnAfM_OfpqcWZRfiqcRWw&m=OPSa25ENnrF0Qv70DG49ZngfdygJZubjo3TOgBA3pJ4&s=_C6i1KPplQGcWvQYPkrGx7V3TjKDJvqt3KG-vcdU2K4&e= > > > > > > Please keep in mind that this is initial version, but mastership works correctly. I added one property to DT to reflect relationship between masters. > > > It is possible to request mastership on demand (using sysfs. Useful in case when Linux machine is equipped only with secondary master controller) or automatically change operation mode when device driver wants to read/write something from/to device. > > > > > > I'm sure I will have to rework something because this was implemented on sources from PATCH v4. I saw that Boris released v7 yesterday :) > > > > > > Can you explain the reason for having a user space interface and DT property? > > I thought we had concluded earlier that we wouldn't need that, but it's possible > > that I missed something in the discussion since then. > > I don't think the sysfs knob is needed, this being said, after thinking > a bit more about mastership handover and the secondary master case, I > think we have something important to solve. > > When a master is not in control of the bus, it gets informed of devices > present on the bus by monitoring DAA or DEFSLVS broadcast events. That > means the secondary master should populate the bus with I3C/I2C devices > on such events, but that's not enough, because DEFSLVS/DAA do not > provide all device info. Some of them (like read/write/ibi limitations) > require extra CCC commands, and, to send those CCC commands, the > secondary master must claim the bus. We could add a case where we > declare devices as partially discovered until the master acquires > ownership of the bus, but that means part of the data returned by > i3c_device_get_info() will be inaccurate, which might have an impact on > some i3c driver ->probe() functions. > > How do you want to handle cases when secondary master joins the bus after > DEFSLVS? Of course we can send DEFSLVS after secondary master joins the bus. That's already the case ;-). Every time the current master discovers another master, it's sends a DEFSLVS at the end of the DAA procedure. > > We could also say that partially discovered devices should not be > registered to the device model, but we then hit the problem of "who can > force the secondary master to claim the bus if there's no users?". > > Now I feel like I missed something. Do you want to populate second instance > of the same physical bus? If yes, then we don't need to have reference > between masters in DT. This is the discussion we've had about 1 month ago with Arnd, Wolfram and Peter, and the conclusion was that 2 different masters connected to the same physical bus should expose 2 different buses (which means having the same physical devices exposed 2 times in Linux). Ok, I implemented it after our discussion, I think it was in May. I even had version where every master had own bus.
WARNING: multiple messages have this Message-ID (diff)
From: Przemyslaw Gaj <pgaj@cadence.com> To: Boris Brezillon <boris.brezillon@bootlin.com> Cc: Arnd Bergmann <arnd@arndb.de>, Vitor Soares <Vitor.Soares@synopsys.com>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, Sekhar Nori <nsekhar@ti.com>, Wolfram Sang <wsa@the-dreams.de>, Linux I2C <linux-i2c@vger.kernel.org>, Jonathan Corbet <corbet@lwn.net>, "open list:DOCUMENTATION" <linux-doc@vger.kernel.org>, gregkh <gregkh@linuxfoundation.org>, Przemyslaw Sroka <psroka@cadence.com>, Arkadiusz Golec <agolec@cadence.com>, Alan Douglas <adouglas@cadence.com>, Bartosz Folta <bfolta@cadence.com>, Damian Kos <dkos@cadence.com>, Alicja Jurasik-Urbaniak <alicja@cadence.com>, Cyprian Wronka <cwronka@cadence.com>, Suresh Punnoose <sureshp@cadence.com>, Rafal Ciepiela <rafalc@cadence.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Nishanth Menon <nm@ti.com>, Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>, Mark Rutland <mark.rutland@arm.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Kumar Gala <galak@codeaurora.org>, DTML <devicetree@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Linus Walleij <linus.walleij@linaro.org>, Xiang Lin <Xiang.Lin@synaptics.com>, Peter Rosin <peda@axentia.se> Subject: Re: [PATCH v6 01/10] i3c: Add core I3C infrastructure Date: Thu, 6 Sep 2018 14:20:55 +0000 [thread overview] Message-ID: <A207EE0E-9DBC-4A39-822C-37B09D0F81B3@cadence.com> (raw) In-Reply-To: <20180906160947.3c80072f@bbrezillon> On 9/6/18, 4:10 PM, "Boris Brezillon" <boris.brezillon@bootlin.com> wrote: EXTERNAL MAIL On Thu, 6 Sep 2018 13:47:29 +0000 Przemyslaw Gaj <pgaj@cadence.com> wrote: > On 9/6/18, 3:14 PM, "Boris Brezillon" <boris.brezillon@bootlin.com> wrote: > > EXTERNAL MAIL > > > On Thu, 6 Sep 2018 14:59:46 +0200 > Arnd Bergmann <arnd@arndb.de> wrote: > > > On Thu, Sep 6, 2018 at 2:43 PM Przemyslaw Gaj <pgaj@cadence.com> wrote: > > > > > > Hi Boris, Vitor, > > > > > > This repository does not contain full kernel sources, but it should be enough to discuss mastership request feature. > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_przemekgaj_i3c-2Dlinux_commit_d54fe68a9d3e573c0c454a2c6f1afafc20142ec5&d=DwICAg&c=aUq983L2pue2FqKFoP6PGHMJQyoJ7kl3s3GZ-_haXqY&r=CMnAfM_OfpqcWZRfiqcRWw&m=OPSa25ENnrF0Qv70DG49ZngfdygJZubjo3TOgBA3pJ4&s=_C6i1KPplQGcWvQYPkrGx7V3TjKDJvqt3KG-vcdU2K4&e= > > > > > > Please keep in mind that this is initial version, but mastership works correctly. I added one property to DT to reflect relationship between masters. > > > It is possible to request mastership on demand (using sysfs. Useful in case when Linux machine is equipped only with secondary master controller) or automatically change operation mode when device driver wants to read/write something from/to device. > > > > > > I'm sure I will have to rework something because this was implemented on sources from PATCH v4. I saw that Boris released v7 yesterday :) > > > > > > Can you explain the reason for having a user space interface and DT property? > > I thought we had concluded earlier that we wouldn't need that, but it's possible > > that I missed something in the discussion since then. > > I don't think the sysfs knob is needed, this being said, after thinking > a bit more about mastership handover and the secondary master case, I > think we have something important to solve. > > When a master is not in control of the bus, it gets informed of devices > present on the bus by monitoring DAA or DEFSLVS broadcast events. That > means the secondary master should populate the bus with I3C/I2C devices > on such events, but that's not enough, because DEFSLVS/DAA do not > provide all device info. Some of them (like read/write/ibi limitations) > require extra CCC commands, and, to send those CCC commands, the > secondary master must claim the bus. We could add a case where we > declare devices as partially discovered until the master acquires > ownership of the bus, but that means part of the data returned by > i3c_device_get_info() will be inaccurate, which might have an impact on > some i3c driver ->probe() functions. > > How do you want to handle cases when secondary master joins the bus after > DEFSLVS? Of course we can send DEFSLVS after secondary master joins the bus. That's already the case ;-). Every time the current master discovers another master, it's sends a DEFSLVS at the end of the DAA procedure. > > We could also say that partially discovered devices should not be > registered to the device model, but we then hit the problem of "who can > force the secondary master to claim the bus if there's no users?". > > Now I feel like I missed something. Do you want to populate second instance > of the same physical bus? If yes, then we don't need to have reference > between masters in DT. This is the discussion we've had about 1 month ago with Arnd, Wolfram and Peter, and the conclusion was that 2 different masters connected to the same physical bus should expose 2 different buses (which means having the same physical devices exposed 2 times in Linux). Ok, I implemented it after our discussion, I think it was in May. I even had version where every master had own bus.
next prev parent reply other threads:[~2018-09-06 14:20 UTC|newest] Thread overview: 177+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-07-19 15:29 [PATCH v6 00/10] Add the I3C subsystem Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 01/10] i3c: Add core I3C infrastructure Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-08-03 21:38 ` mshettel 2018-08-03 21:38 ` mshettel 2018-08-03 21:38 ` mshettel 2018-08-04 5:33 ` Boris Brezillon 2018-08-04 5:33 ` Boris Brezillon 2018-08-04 5:33 ` Boris Brezillon 2018-08-22 16:43 ` vitor 2018-08-22 16:43 ` vitor 2018-08-24 12:39 ` Boris Brezillon 2018-08-24 12:39 ` Boris Brezillon 2018-08-24 17:52 ` vitor 2018-08-24 17:52 ` vitor 2018-08-24 18:16 ` Boris Brezillon 2018-08-24 18:16 ` Boris Brezillon 2018-08-28 11:50 ` vitor 2018-08-28 11:50 ` vitor 2018-08-28 12:02 ` Boris Brezillon 2018-08-28 12:02 ` Boris Brezillon 2018-08-28 12:55 ` Przemyslaw Gaj 2018-08-28 12:55 ` Przemyslaw Gaj 2018-08-28 13:01 ` Boris Brezillon 2018-08-28 13:01 ` Boris Brezillon 2018-08-29 7:41 ` Przemyslaw Gaj 2018-08-29 7:41 ` Przemyslaw Gaj 2018-08-28 13:03 ` Boris Brezillon 2018-08-28 13:03 ` Boris Brezillon 2018-08-30 13:57 ` vitor 2018-08-30 13:57 ` vitor 2018-08-30 19:00 ` Przemyslaw Gaj 2018-08-30 19:00 ` Przemyslaw Gaj 2018-09-03 9:33 ` vitor 2018-09-03 9:33 ` vitor 2018-09-04 11:03 ` Przemyslaw Gaj 2018-09-04 11:03 ` Przemyslaw Gaj 2018-09-06 12:43 ` Przemyslaw Gaj 2018-09-06 12:43 ` Przemyslaw Gaj 2018-09-06 12:59 ` Arnd Bergmann 2018-09-06 12:59 ` Arnd Bergmann 2018-09-06 13:14 ` Boris Brezillon 2018-09-06 13:14 ` Boris Brezillon 2018-09-06 13:20 ` Boris Brezillon 2018-09-06 13:20 ` Boris Brezillon 2018-09-06 13:45 ` Arnd Bergmann 2018-09-06 13:45 ` Arnd Bergmann 2018-09-06 13:50 ` vitor 2018-09-06 13:50 ` vitor 2018-09-06 14:14 ` Boris Brezillon 2018-09-06 14:14 ` Boris Brezillon 2018-09-06 15:17 ` vitor 2018-09-06 15:17 ` vitor 2018-09-06 16:06 ` Boris Brezillon 2018-09-06 16:06 ` Boris Brezillon 2018-09-06 16:17 ` Przemyslaw Gaj 2018-09-06 16:17 ` Przemyslaw Gaj 2018-09-10 16:16 ` vitor 2018-09-10 16:16 ` vitor 2018-09-07 7:51 ` Przemyslaw Gaj 2018-09-07 7:51 ` Przemyslaw Gaj 2018-09-06 13:47 ` Przemyslaw Gaj 2018-09-06 13:47 ` Przemyslaw Gaj 2018-09-06 14:09 ` Boris Brezillon 2018-09-06 14:09 ` Boris Brezillon 2018-09-06 14:20 ` Przemyslaw Gaj [this message] 2018-09-06 14:20 ` Przemyslaw Gaj 2018-07-19 15:29 ` [PATCH v6 02/10] docs: driver-api: Add I3C documentation Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 03/10] i3c: Add sysfs ABI spec Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 04/10] dt-bindings: i3c: Document core bindings Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 05/10] dt-bindings: i3c: Add macros to help fill I3C/I2C device's reg property Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 06/10] MAINTAINERS: Add myself as the I3C subsystem maintainer Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 07/10] i3c: master: Add driver for Cadence IP Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 08/10] dt-bindings: i3c: Document Cadence I3C master bindings Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 09/10] gpio: Add a driver for Cadence I3C GPIO expander Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` [PATCH v6 10/10] dt-bindings: gpio: Add bindings for Cadence I3C gpio expander Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-19 15:29 ` Boris Brezillon 2018-07-20 8:52 ` [PATCH v6 00/10] Add the I3C subsystem Arnd Bergmann 2018-07-20 8:52 ` Arnd Bergmann 2018-07-20 8:52 ` Arnd Bergmann 2018-07-20 9:57 ` Peter Rosin 2018-07-20 9:57 ` Peter Rosin 2018-07-20 9:57 ` Peter Rosin 2018-07-20 10:05 ` Boris Brezillon 2018-07-20 10:05 ` Boris Brezillon 2018-07-20 10:05 ` Boris Brezillon 2018-07-20 10:39 ` Peter Rosin 2018-07-20 10:39 ` Peter Rosin 2018-07-20 10:39 ` Peter Rosin 2018-07-20 10:12 ` Wolfram Sang 2018-07-20 10:12 ` Wolfram Sang 2018-07-20 10:57 ` Arnd Bergmann 2018-07-20 10:57 ` Arnd Bergmann 2018-07-20 10:57 ` Arnd Bergmann 2018-07-20 11:05 ` Wolfram Sang 2018-07-20 11:05 ` Wolfram Sang 2018-07-20 11:13 ` Peter Rosin 2018-07-20 11:13 ` Peter Rosin 2018-07-20 11:13 ` Peter Rosin 2018-07-20 11:28 ` Arnd Bergmann 2018-07-20 11:28 ` Arnd Bergmann 2018-07-20 11:28 ` Arnd Bergmann 2018-07-20 13:16 ` Peter Rosin 2018-07-20 13:16 ` Peter Rosin 2018-07-20 13:16 ` Peter Rosin 2018-07-20 15:41 ` Wolfram Sang 2018-07-20 15:41 ` Wolfram Sang 2018-07-24 14:14 ` Arnd Bergmann 2018-07-24 14:14 ` Arnd Bergmann 2018-07-24 14:14 ` Arnd Bergmann 2018-07-24 15:57 ` Wolfram Sang 2018-07-24 15:57 ` Wolfram Sang 2018-07-24 16:04 ` Arnd Bergmann 2018-07-24 16:04 ` Arnd Bergmann 2018-07-24 16:04 ` Arnd Bergmann 2018-07-24 20:22 ` Wolfram Sang 2018-07-24 20:22 ` Wolfram Sang 2018-07-24 16:07 ` Boris Brezillon 2018-07-24 16:07 ` Boris Brezillon 2018-07-24 16:07 ` Boris Brezillon 2018-07-20 13:17 ` Boris Brezillon 2018-07-20 13:17 ` Boris Brezillon 2018-07-20 13:17 ` Boris Brezillon 2018-07-24 14:03 ` Arnd Bergmann 2018-07-24 14:03 ` Arnd Bergmann 2018-07-24 14:03 ` Arnd Bergmann 2018-07-24 14:28 ` Boris Brezillon 2018-07-24 14:28 ` Boris Brezillon 2018-07-24 14:28 ` Boris Brezillon 2018-07-24 15:05 ` Arnd Bergmann 2018-07-24 15:05 ` Arnd Bergmann 2018-07-24 15:05 ` Arnd Bergmann 2018-07-24 15:15 ` Geert Uytterhoeven 2018-07-24 15:15 ` Geert Uytterhoeven 2018-07-24 15:15 ` Geert Uytterhoeven 2018-07-24 15:40 ` Arnd Bergmann 2018-07-24 15:40 ` Arnd Bergmann 2018-07-24 15:40 ` Arnd Bergmann 2018-07-24 15:46 ` Geert Uytterhoeven 2018-07-24 15:46 ` Geert Uytterhoeven 2018-07-24 15:46 ` Geert Uytterhoeven 2018-07-24 15:58 ` Arnd Bergmann 2018-07-24 15:58 ` Arnd Bergmann 2018-07-24 15:58 ` Arnd Bergmann 2018-07-24 16:14 ` Boris Brezillon 2018-07-24 16:14 ` Boris Brezillon 2018-07-24 16:14 ` Boris Brezillon 2018-07-24 16:25 ` Arnd Bergmann 2018-07-24 16:25 ` Arnd Bergmann 2018-07-24 16:25 ` Arnd Bergmann 2018-07-24 16:54 ` Boris Brezillon 2018-07-24 16:54 ` Boris Brezillon 2018-07-24 16:54 ` Boris Brezillon 2018-07-24 20:21 ` Arnd Bergmann 2018-07-24 20:21 ` Arnd Bergmann 2018-07-24 20:21 ` Arnd Bergmann 2018-07-24 16:04 ` Wolfram Sang 2018-07-24 16:04 ` Wolfram Sang
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=A207EE0E-9DBC-4A39-822C-37B09D0F81B3@cadence.com \ --to=pgaj@cadence.com \ --cc=Vitor.Soares@synopsys.com \ --cc=adouglas@cadence.com \ --cc=agolec@cadence.com \ --cc=alicja@cadence.com \ --cc=arnd@arndb.de \ --cc=bfolta@cadence.com \ --cc=boris.brezillon@bootlin.com \ --cc=corbet@lwn.net \ --cc=cwronka@cadence.com \ --cc=dkos@cadence.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-i2c@vger.kernel.org \ --cc=nsekhar@ti.com \ --cc=psroka@cadence.com \ --cc=rafalc@cadence.com \ --cc=sureshp@cadence.com \ --cc=thomas.petazzoni@bootlin.com \ --cc=wsa@the-dreams.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.