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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 May 2020 23:25:40 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Ahmet Inan <inan@...tec.de>,
        Martin Fuzzey <martin.fuzzey@...wbird.group>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...labora.com
Subject: Re: [PATCHv3 4/5] Input: EXC3000: Add support to query model and
 fw_version

Hi,

On Wed, May 20, 2020 at 10:49:52AM -0700, Dmitry Torokhov wrote:
> Hi Sebastian,
> 
> On Wed, May 20, 2020 at 05:39:35PM +0200, Sebastian Reichel wrote:
> > Expose model and fw_version via sysfs. Also query the model
> > in probe to make sure, that the I2C communication with the
> > device works before successfully probing the driver.
> > 
> > This is a bit complicated, since EETI devices do not have
> > a sync interface. Sending the commands and directly reading
> > does not work. Sending the command and waiting for some time
> > is also not an option, since there might be touch events in
> > the mean time.
> > 
> > Last but not least we do not cache the results, since this
> > interface can be used to check the I2C communication is still
> > working as expected.
> > 
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
> > ---
> >  .../ABI/testing/sysfs-driver-input-exc3000    |  15 ++
> >  drivers/input/touchscreen/exc3000.c           | 145 +++++++++++++++++-
> >  2 files changed, 159 insertions(+), 1 deletion(-)
> >  create mode 100644 Documentation/ABI/testing/sysfs-driver-input-exc3000
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-driver-input-exc3000 b/Documentation/ABI/testing/sysfs-driver-input-exc3000
> > new file mode 100644
> > index 000000000000..d79da4f869af
> > --- /dev/null
> > +++ b/Documentation/ABI/testing/sysfs-driver-input-exc3000
> > @@ -0,0 +1,15 @@
> > +What:		/sys/class/input/inputX/fw_version
> > +Date:		May 2020
> > +Contact:	linux-input@...r.kernel.org
> > +Description:	Reports the firmware version provided by the touchscreen, for example "00_T6" on a EXC80H60
> > +
> > +		Access: Read
> > +		Valid values: Represented as string
> > +
> > +What:		/sys/class/input/inputX/model
> > +Date:		May 2020
> > +Contact:	linux-input@...r.kernel.org
> > +Description:	Reports the model identification provided by the touchscreen, for example "Orion_1320" on a EXC80H60
> > +
> > +		Access: Read
> > +		Valid values: Represented as string
> 
> These are properties of the controller (i2c device), not input
> abstraction class on top of it, so the attributes should be attached to
> i2c_client instance.
> 
> Please use devm_device_add_group() in probe to instantiate them at the
> proper level.

As written in the cover letter using devm_device_add_group() in
probe routine results in a udev race condition:

http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ