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, 1 Sep 2021 17:27:47 -0300
From:   Rogerio Pimentel <rpimentel.silva@...il.com>
To:     Marek Vasut <marex@...x.de>
Cc:     dmitry.torokhov@...il.com, hansemro@...look.com,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: ili210x - Set the device name according to the
 device model

On Wed, Sep 1, 2021 at 4:46 PM Marek Vasut <marex@...x.de> wrote:
>
> On 9/1/21 9:22 PM, Rogerio Pimentel wrote:
>
> [...]
>
> > diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
> > index 30576a5f2f04..ca7af4a6f588 100644
> > --- a/drivers/input/touchscreen/ili210x.c
> > +++ b/drivers/input/touchscreen/ili210x.c
> > @@ -19,6 +19,8 @@
> >   #define ILI251X_DATA_SIZE1  31
> >   #define ILI251X_DATA_SIZE2  20
> >
> > +#define ILI_NAME_LEN         27
> > +
> >   /* Touchscreen commands */
> >   #define REG_TOUCHDATA               0x10
> >   #define REG_PANEL_INFO              0x20
> > @@ -394,6 +396,7 @@ static int ili210x_i2c_probe(struct i2c_client *client,
> >       struct input_dev *input;
> >       int error;
> >       unsigned int max_xy;
> > +     char *model_name;
> >
> >       dev_dbg(dev, "Probing for ILI210X I2C Touschreen driver");
> >
> > @@ -440,7 +443,11 @@ static int ili210x_i2c_probe(struct i2c_client *client,
> >       i2c_set_clientdata(client, priv);
> >
> >       /* Setup input device */
> > -     input->name = "ILI210x Touchscreen";
> > +     input->name = "Ilitek         Touchscreen";
> > +     model_name = (char *)input->name;
> > +     snprintf(model_name, ILI_NAME_LEN, "Ilitek %s Touchscreen",
>
> Which ilitek devices do you have available exactly ?
>
> There is a firmware interface which does report the device type, but I
> don't know whether it works on all the ilitek touchscreen devices. If it
> does, then it could be used here to pull the type from the firmware and
> then use this instead
>
> snprintf(model_name, ILI_NAME_LEN, "Ilitek ILI%04x Touchscreen", type);
>
> Try this command against the touch controller, it sends it command 0x61
> and reads two bytes of the reply:
> i2ctransfer -f -y 1 w1@...1 0x61 r2
> 0x10 0x25 # <---- on ILI2510 it reports 0x25 0x10 in reverse

Thanks for the comments and suggestions. I'll make the changes and send V2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ