lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 21 Jun 2023 14:00:48 +0300
From:   Svyatoslav Ryhel <clamor95@...il.com>
To:     Andi Shyti <andi.shyti@...nel.org>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Wolfram Sang <wsa@...nel.org>,
        Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        linux-i2c@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] i2c: Add GPIO-based hotplug gate

ср, 21 черв. 2023 р. о 13:32 Andi Shyti <andi.shyti@...nel.org> пише:
>
> Hi,
>
> On Mon, Jun 19, 2023 at 06:37:32PM +0300, Svyatoslav Ryhel wrote:
> > From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
> >
> > Implement driver for hot-plugged I2C busses, where some devices on
> > a bus are hot-pluggable and their presence is indicated by GPIO line.
> >
> > Co-developed-by: Ion Agorria <ion@...rria.com>
> > Signed-off-by: Ion Agorria <ion@...rria.com>
> > Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
> > Signed-off-by: Svyatoslav Ryhel <clamor95@...il.com>
> > ---
> >  drivers/i2c/Kconfig            |  11 ++
> >  drivers/i2c/Makefile           |   1 +
> >  drivers/i2c/i2c-hotplug-gpio.c | 266 +++++++++++++++++++++++++++++++++
> >  3 files changed, 278 insertions(+)
> >  create mode 100644 drivers/i2c/i2c-hotplug-gpio.c
>
> without going through the code I am missing the big picture here.
>
> What is this actually doing?

Basically it duplicates the parent i2c bus once detection GPIO triggers
and probes all hot-pluggable devices which are connected to it. Once
GPIO triggers detach signal all hot-pluggable devices are unprobed and
bus removed.

> Is this a new bus driver support?

Most likely not.

> Is this a feature to existing drivers?

Yes, it is more like i2c mux

> Is the GPIO an irq line for signalling hoplugging and can be used by
> any driver or just this one?
>

It can be shared if necessary but usually all hot-pluggable devices
are gathered in one container and are plugged simultaneously.

> Without further discussing technicalities, can you please explain
> better and more in detail what is the scope of this patch, why
> there is a need for such a patch, how this new driver/feature
> has been implemented and finally how it can be used.

This patch is a predecessor of a possible larger patchset which
should bring support for a asus-ec, a i2c mfd device programmed by
Asus for their Transformers tablet line.

This is Michał Mirosław, original author quote about this driver:
"The Transformers have a connector that's used for USB, charging or
for attaching a keyboard (called a dock; it also has a battery and
a touchpad). This connector probably (I don't have the means to verify
that) has an I2C bus lines and a "detect" line (pulled low on the dock
side) among the pins. I guess there is either no additional chip or
a transparent bridge/buffer chip, but nothing that could be controlled
by software. For DT this setup could be modelled like an I2C gate or
2-port mux with enable joining two I2C busses (one "closer" to the
CPU -- parent)."

Similar approach is used in Microsoft Surface RT for attachable
Type Cover.

> This would help a lot so that I know already beforehand what I am
> going to read without figuring it out.
>
> Thanks,
> Andi
>
> PS Please notice that my set of questions is even longer than
> your commit log :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ