linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sven Van Asbroeck <thesven73@gmail.com>,
	Rob Herring <robh@kernel.org>, Marek Vasut <marex@denx.de>
Cc: Adam Ford <aford173@gmail.com>,
	linux-input@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] Input: ili210x - add ILI2117 support
Date: Mon, 11 Nov 2019 10:16:57 -0800	[thread overview]
Message-ID: <20191111181657.GA57214@dtor-ws> (raw)
In-Reply-To: <CAGngYiW0+QkLNmjp4yre2upqsvgEL4Or8rm09k5o7=9WHryyhg@mail.gmail.com>

On Tue, Nov 05, 2019 at 10:29:53AM -0500, Sven Van Asbroeck wrote:
> On Mon, Nov 4, 2019 at 6:36 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > OK, I refreshed the branch with fixes and a couple of new patches. It is
> > on top of 5.3 now. If this works for you guys I will be merging it for
> > 5.5.
> >
> 
> According to the ili2117a/2118a datasheet I have, there are still a
> few loose ends.
> Some of these might be too inconsequential to worry about.
> Dmitry, tell me which ones you think are important, if any,
> and I will spin a patch if you like. Or you can do it, just let me know.
> 
> >       { "ili210x", (long)&ili210x_chip },
> >       { "ili2117", (long)&ili211x_chip },
> >       { "ili251x", (long)&ili251x_chip },
> >
> >       { .compatible = "ilitek,ili210x", .data = &ili210x_chip },
> >       { .compatible = "ilitek,ili2117", .data = &ili211x_chip },
> >       { .compatible = "ilitek,ili251x", .data = &ili251x_chip },
> 
> My datasheet says ILI2117A/ILI2118A, so maybe the compatible string should
> really be "ilitek,ili211x", just like the other variants ?

We have not landed the DT for 2117, so we can either rename it as
"ilitek,ili211x" or have 2 separate compatibles.

Rob, do you have preference?

> 
> In addition, should we add ili2117/ili2118 in comments somewhere, so others
> can find this driver with a simple grep?
> 
> >       error = devm_device_add_group(dev, &ili210x_attr_group);
> >       if (error) {
> >               dev_err(dev, "Unable to create sysfs attributes, err: %d\n",
> >                       error);
> >               return error;
> >       }
> 
> The ili2117/ili2118 does not have a calibrate register, so this sysfs group
> is unsupported and perhaps may even be harmful if touched (?).
> 
> Perhaps add a flag to struct ili2xxx_chip ?


I guess we need is_visible() implementation for the attributes here and
yes, a flag to the chip structure.

> 
> >       input_set_abs_params(input, ABS_MT_POSITION_X, 0, 0xffff, 0, 0);
> >       input_set_abs_params(input, ABS_MT_POSITION_Y, 0, 0xffff, 0, 0);
> 
> The max position on ili2117/8 is 0xfff. The OS I'm using (Android) likes to know
> the correct min and max. So it can map touch coords to pixel coords.

What about the others? I doubt any of them actually support 64K
resolution and I expect everyone simply used device tree to specify
correct size.

Marek, you worked with other versions of this controller, what is your
experience?

> 
> Perhaps add this to struct ili2xxx_chip ?
> 
> >       /* Get firmware version */
> >       error = chip->read_reg(client, REG_FIRMWARE_VERSION,
> >                              &firmware, sizeof(firmware));
> 
> On ili2117/ili2118, the firmware version register is different (0x03), and
> the layout is different too:
> 
> byte    name
> 0       vendor id
> 1       reserved
> 2       firmware version upper
> 3       firmware version lower
> 4       reserved
> 5       reserved
> 6       reserved
> 7       reserved
> 
> But, does it even make sense to retrieve the firmware version? All it's used
> for is a dev_dbg log print, which under normal circumstances is a noop:
> 
> >       dev_dbg(dev,
> >               "ILI210x initialized (IRQ: %d), firmware version %d.%d.%d",
> >               client->irq, firmware.id, firmware.major, firmware.minor);

I'd be OK with simply dropping this.

Thanks.

-- 
Dmitry

  parent reply	other threads:[~2019-11-11 18:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190302141704.32547-1-marex@denx.de>
2019-11-01 20:48 ` [PATCH 2/2] Input: ili210x - add ILI2117 support Sven Van Asbroeck
2019-11-03 23:55   ` Adam Ford
2019-11-04  0:16     ` Marek Vasut
2019-11-04  7:02       ` Dmitry Torokhov
2019-11-04  7:01   ` Dmitry Torokhov
2019-11-04  9:13     ` Marek Vasut
2019-11-04 13:49     ` Sven Van Asbroeck
2019-11-04 14:19       ` Adam Ford
2019-11-04 18:36         ` Dmitry Torokhov
2019-11-04 18:37     ` Sven Van Asbroeck
2019-11-04 21:28       ` Adam Ford
2019-11-04 21:43         ` Sven Van Asbroeck
2019-11-04 23:25           ` Adam Ford
2019-11-04 23:36             ` Dmitry Torokhov
2019-11-04 23:40               ` Adam Ford
2019-11-05  2:04                 ` Sven Van Asbroeck
2019-11-05 13:27                   ` Adam Ford
2019-11-05 15:26               ` Sven Van Asbroeck
2019-11-05 15:29               ` Sven Van Asbroeck
2019-11-05 15:53                 ` Sven Van Asbroeck
2019-11-11 18:16                 ` Dmitry Torokhov [this message]
2019-11-11 18:43                   ` Rob Herring
2019-11-12  0:19                     ` Dmitry Torokhov

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=20191111181657.GA57214@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=aford173@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=robh@kernel.org \
    --cc=thesven73@gmail.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).