devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Input: add ft5426
@ 2024-04-04 22:20 Andreas Kemnade
  2024-04-04 22:20 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: edt-ft5x06: Add ft5426 Andreas Kemnade
  2024-04-04 22:20 ` [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426 Andreas Kemnade
  0 siblings, 2 replies; 12+ messages in thread
From: Andreas Kemnade @ 2024-04-04 22:20 UTC (permalink / raw)
  To: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	andreas, o.rempel, u.kleine-koenig, hdegoede, andy.shevchenko,
	ye.xingchen, p.puschmann, linux-input, devicetree, linux-kernel,
	caleb.connolly

Add ft5426 touchscreen controller and the corresponding compatible.

Changes in v2:
- reorder compatible

Andreas Kemnade (2):
  dt-bindings: input: touchscreen: edt-ft5x06: Add ft5426
  Input: edt-ft5x06 - add ft5426

 .../devicetree/bindings/input/touchscreen/edt-ft5x06.yaml        | 1 +
 drivers/input/touchscreen/edt-ft5x06.c                           | 1 +
 2 files changed, 2 insertions(+)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 1/2] dt-bindings: input: touchscreen: edt-ft5x06: Add ft5426
  2024-04-04 22:20 [PATCH v2 0/2] Input: add ft5426 Andreas Kemnade
@ 2024-04-04 22:20 ` Andreas Kemnade
  2024-04-04 22:20 ` [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426 Andreas Kemnade
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Kemnade @ 2024-04-04 22:20 UTC (permalink / raw)
  To: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	andreas, o.rempel, u.kleine-koenig, hdegoede, andy.shevchenko,
	ye.xingchen, p.puschmann, linux-input, devicetree, linux-kernel,
	caleb.connolly
  Cc: Krzysztof Kozlowski

Add compatible for ft5426.
Searches for documentation reveal neither edt nor evervision
as some related company, only FocalTech.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/input/touchscreen/edt-ft5x06.yaml        | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
index f2808cb4d99d..71fd3c66c966 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
@@ -39,6 +39,7 @@ properties:
       - edt,edt-ft5406
       - edt,edt-ft5506
       - evervision,ev-ft5726
+      - focaltech,ft5426
       - focaltech,ft6236
 
   reg:
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-04 22:20 [PATCH v2 0/2] Input: add ft5426 Andreas Kemnade
  2024-04-04 22:20 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: edt-ft5x06: Add ft5426 Andreas Kemnade
@ 2024-04-04 22:20 ` Andreas Kemnade
  2024-04-05 15:13   ` Andy Shevchenko
  1 sibling, 1 reply; 12+ messages in thread
From: Andreas Kemnade @ 2024-04-04 22:20 UTC (permalink / raw)
  To: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	andreas, o.rempel, u.kleine-koenig, hdegoede, andy.shevchenko,
	ye.xingchen, p.puschmann, linux-input, devicetree, linux-kernel,
	caleb.connolly

As ft5426 seems to be compatible with this driver, add it.
Debug output during identification: Model "generic ft5x06 (79)", Rev. "

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 drivers/input/touchscreen/edt-ft5x06.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 2a1db1134476..4e7621a80175 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -1484,6 +1484,7 @@ static const struct of_device_id edt_ft5x06_of_match[] = {
 	{ .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
 	{ .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
 	{ .compatible = "edt,edt-ft5406", .data = &edt_ft5x06_data },
+	{ .compatible = "focaltech,ft5426", .data = &edt_ft5506_data },
 	{ .compatible = "edt,edt-ft5506", .data = &edt_ft5506_data },
 	{ .compatible = "evervision,ev-ft5726", .data = &edt_ft5506_data },
 	/* Note focaltech vendor prefix for compatibility with ft6236.c */
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-04 22:20 ` [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426 Andreas Kemnade
@ 2024-04-05 15:13   ` Andy Shevchenko
  2024-04-05 16:28     ` Andreas Kemnade
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2024-04-05 15:13 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	o.rempel, u.kleine-koenig, hdegoede, ye.xingchen, p.puschmann,
	linux-input, devicetree, linux-kernel, caleb.connolly

On Fri, Apr 5, 2024 at 1:20 AM Andreas Kemnade <andreas@kemnade.info> wrote:
>
> As ft5426 seems to be compatible with this driver, add it.
> Debug output during identification: Model "generic ft5x06 (79)", Rev. "

...

> @@ -1484,6 +1484,7 @@ static const struct of_device_id edt_ft5x06_of_match[] = {
>         { .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
>         { .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
>         { .compatible = "edt,edt-ft5406", .data = &edt_ft5x06_data },
> +       { .compatible = "focaltech,ft5426", .data = &edt_ft5506_data },

Why a different vendor prefix?
In case you need to use this one, keep the list sorted, currently this
splits the edt,* ones.

>         { .compatible = "edt,edt-ft5506", .data = &edt_ft5506_data },
>         { .compatible = "evervision,ev-ft5726", .data = &edt_ft5506_data },
>         /* Note focaltech vendor prefix for compatibility with ft6236.c */

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-05 15:13   ` Andy Shevchenko
@ 2024-04-05 16:28     ` Andreas Kemnade
  2024-04-05 17:21       ` Andy Shevchenko
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Kemnade @ 2024-04-05 16:28 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	o.rempel, u.kleine-koenig, hdegoede, ye.xingchen, p.puschmann,
	linux-input, devicetree, linux-kernel, caleb.connolly

On Fri, 5 Apr 2024 18:13:45 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Apr 5, 2024 at 1:20 AM Andreas Kemnade <andreas@kemnade.info> wrote:
> >
> > As ft5426 seems to be compatible with this driver, add it.
> > Debug output during identification: Model "generic ft5x06 (79)", Rev. "  
> 
> ...
> 
> > @@ -1484,6 +1484,7 @@ static const struct of_device_id edt_ft5x06_of_match[] = {
> >         { .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
> >         { .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
> >         { .compatible = "edt,edt-ft5406", .data = &edt_ft5x06_data },
> > +       { .compatible = "focaltech,ft5426", .data = &edt_ft5506_data },  
> 
> Why a different vendor prefix?
> In case you need to use this one, keep the list sorted, currently this
> splits the edt,* ones.
> 
How do I know whether to use evervision or edt instead? 
I sorted by the numbers. Looking at datasheets for other controllers I see
https://www.displayfuture.com/Display/datasheet/controller/FT5x06.pdf
it only mentions FocalTech Systems Co., Ltd.
So how the vendor prefixes are derived?

Regards,
Andreas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-05 16:28     ` Andreas Kemnade
@ 2024-04-05 17:21       ` Andy Shevchenko
  2024-04-05 18:56         ` Andreas Kemnade
  2024-04-25 16:54         ` Andreas Kemnade
  0 siblings, 2 replies; 12+ messages in thread
From: Andy Shevchenko @ 2024-04-05 17:21 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	o.rempel, u.kleine-koenig, hdegoede, ye.xingchen, p.puschmann,
	linux-input, devicetree, linux-kernel, caleb.connolly

On Fri, Apr 5, 2024 at 7:28 PM Andreas Kemnade <andreas@kemnade.info> wrote:
> On Fri, 5 Apr 2024 18:13:45 +0300
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > On Fri, Apr 5, 2024 at 1:20 AM Andreas Kemnade <andreas@kemnade.info> wrote:

...

> > > @@ -1484,6 +1484,7 @@ static const struct of_device_id edt_ft5x06_of_match[] = {
> > >         { .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
> > >         { .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
> > >         { .compatible = "edt,edt-ft5406", .data = &edt_ft5x06_data },
> > > +       { .compatible = "focaltech,ft5426", .data = &edt_ft5506_data },
> >
> > Why a different vendor prefix?
> > In case you need to use this one, keep the list sorted, currently this
> > splits the edt,* ones.
> >
> How do I know whether to use evervision or edt instead?

Ask DT people, the vendor-prefixes lists both...

> I sorted by the numbers. Looking at datasheets for other controllers I see
> https://www.displayfuture.com/Display/datasheet/controller/FT5x06.pdf
> it only mentions FocalTech Systems Co., Ltd.

But does the driver use that? AFAICS it uses edt. Perhaps it's due to
a business split, not to my knowledge anyway.

> So how the vendor prefixes are derived?

Rob, Krzysztof?

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-05 17:21       ` Andy Shevchenko
@ 2024-04-05 18:56         ` Andreas Kemnade
  2024-04-25 16:54         ` Andreas Kemnade
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Kemnade @ 2024-04-05 18:56 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	o.rempel, u.kleine-koenig, hdegoede, ye.xingchen, p.puschmann,
	linux-input, devicetree, linux-kernel, caleb.connolly

On Fri, 5 Apr 2024 20:21:19 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Apr 5, 2024 at 7:28 PM Andreas Kemnade <andreas@kemnade.info> wrote:
> > On Fri, 5 Apr 2024 18:13:45 +0300
> > Andy Shevchenko <andy.shevchenko@gmail.com> wrote:  
> > > On Fri, Apr 5, 2024 at 1:20 AM Andreas Kemnade <andreas@kemnade.info> wrote:  
> 
> ...
> 
> > > > @@ -1484,6 +1484,7 @@ static const struct of_device_id edt_ft5x06_of_match[] = {
> > > >         { .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
> > > >         { .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
> > > >         { .compatible = "edt,edt-ft5406", .data = &edt_ft5x06_data },
> > > > +       { .compatible = "focaltech,ft5426", .data = &edt_ft5506_data },  
> > >
> > > Why a different vendor prefix?
> > > In case you need to use this one, keep the list sorted, currently this
> > > splits the edt,* ones.
> > >  
> > How do I know whether to use evervision or edt instead?  
> 
> Ask DT people, the vendor-prefixes lists both...
> 
> > I sorted by the numbers. Looking at datasheets for other controllers I see
> > https://www.displayfuture.com/Display/datasheet/controller/FT5x06.pdf
> > it only mentions FocalTech Systems Co., Ltd.  
> 
> But does the driver use that? AFAICS it uses edt. Perhaps it's due to
> a business split, not to my knowledge anyway.
> 
well, the fact is that there were several tried to add duplicates to this
driver to the kernel using focaltech prefixes e.g.
https://lore.kernel.org/linux-input/47209259-9e57-f263-bf48-10f233c63b69@redhat.com/

My guess it is somehow about owner of the firmware in the chip vs the chip itself.

Regards,
Andreas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-05 17:21       ` Andy Shevchenko
  2024-04-05 18:56         ` Andreas Kemnade
@ 2024-04-25 16:54         ` Andreas Kemnade
  2024-04-26  2:54           ` Felix Kaechele
  1 sibling, 1 reply; 12+ messages in thread
From: Andreas Kemnade @ 2024-04-25 16:54 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	o.rempel, u.kleine-koenig, hdegoede, ye.xingchen, p.puschmann,
	linux-input, devicetree, linux-kernel, caleb.connolly

On Fri, 5 Apr 2024 20:21:19 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Apr 5, 2024 at 7:28 PM Andreas Kemnade <andreas@kemnade.info> wrote:
> > On Fri, 5 Apr 2024 18:13:45 +0300
> > Andy Shevchenko <andy.shevchenko@gmail.com> wrote:  
> > > On Fri, Apr 5, 2024 at 1:20 AM Andreas Kemnade <andreas@kemnade.info> wrote:  
> 
> ...
> 
> > > > @@ -1484,6 +1484,7 @@ static const struct of_device_id edt_ft5x06_of_match[] = {
> > > >         { .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data },
> > > >         { .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
> > > >         { .compatible = "edt,edt-ft5406", .data = &edt_ft5x06_data },
> > > > +       { .compatible = "focaltech,ft5426", .data = &edt_ft5506_data },  
> > >
> > > Why a different vendor prefix?
> > > In case you need to use this one, keep the list sorted, currently this
> > > splits the edt,* ones.
> > >  
> > How do I know whether to use evervision or edt instead?  
> 
> Ask DT people, the vendor-prefixes lists both...
> 
> > I sorted by the numbers. Looking at datasheets for other controllers I see
> > https://www.displayfuture.com/Display/datasheet/controller/FT5x06.pdf
> > it only mentions FocalTech Systems Co., Ltd.  
> 
> But does the driver use that? AFAICS it uses edt. Perhaps it's due to
> a business split, not to my knowledge anyway.
> 
Well, lets cite edt-ft5x06.rst:

"The edt-ft5x06 driver is useful for the EDT "Polytouch" family of capacitive
touch screens. Note that it is *not* suitable for other devices based on the
focaltec ft5x06 devices, since they contain vendor-specific firmware. In
particular this driver is not suitable for the Nook tablet."

So chips from focaltech which can be equipped with different firmware? So
edt prefix means EDT firmware?

Looking around I found this:
            if (tsdata->version == EV_FT)
                        swap(x, y);
...
               case 0x59:  /* Evervision Display with FT5xx6 TS */
                        tsdata->version = EV_FT;

I need swap(x.y), I am using touchscreen-swapped-x-y property now.
So evervision prefix?

Regards,
Andreas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-25 16:54         ` Andreas Kemnade
@ 2024-04-26  2:54           ` Felix Kaechele
  2024-04-26  7:56             ` Andreas Kemnade
  0 siblings, 1 reply; 12+ messages in thread
From: Felix Kaechele @ 2024-04-26  2:54 UTC (permalink / raw)
  To: Andreas Kemnade, Andy Shevchenko
  Cc: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	o.rempel, u.kleine-koenig, hdegoede, ye.xingchen, p.puschmann,
	linux-input, devicetree, linux-kernel, caleb.connolly

On 2024-04-25 12:54, Andreas Kemnade wrote:
> On Fri, 5 Apr 2024 20:21:19 +0300
> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
>> On Fri, Apr 5, 2024 at 7:28 PM Andreas Kemnade <andreas@kemnade.info> wrote: >>> On Fri, 5 Apr 2024 18:13:45 +0300
>>> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

...

>>>> Why a different vendor prefix?

...

>>> I sorted by the numbers. Looking at datasheets for other controllers I see >>> https://www.displayfuture.com/Display/datasheet/controller/FT5x06.pdf
>>> it only mentions FocalTech Systems Co., Ltd.
>>
>> But does the driver use that? AFAICS it uses edt. Perhaps it's due to
>> a business split, not to my knowledge anyway.

I've been looking into this over the past few weeks as I was working on 
mainline support for an Android device.
And please forgive me if any of the following is not fully accurate, I'm 
not an industry expert.

After some research, my understanding of this is as follows:

- There are companies that make touch ICs, LCD driver ICs and sometimes 
even ICs that are both. Focaltech or Himax are examples of such companies.

- There are companies that make LCMs. These are complete assemblies of 
panel, backlight, touch layer and driver circuitry PCBs. This is what 
OEMs generally purchase when they design a consumer device. Emerging 
Display Technologies Corp. (EDT) is such a LCM manufacturing company. 
More often than not LCM manufacturers do not make their own driver ICs.

LCM manufacturers include ICs from Focaltech in their LCMs.
To my knowledge Focaltech is not a manufacturer of LCMs.

As such, an interpretation of the compatible string "edt,edt-ft5406" 
could be: Unspecified EDT LCM with Focaltech FT5406 IC.

 From my perspective, more correct would either be something like 
"edt,etm070001bdh6" (the LCM by EDT that contains this IC, especially if 
it had model specific quirks) or "focaltech,ft5406".
But "edt,edt-ft5406" is incorrect if being specific is the goal here.
Given that the driver predates much of the DT binding rigour it's what 
we have now though.

> Well, lets cite edt-ft5x06.rst:
>
> "The edt-ft5x06 driver is useful for the EDT "Polytouch" family of capacitive > touch screens. Note that it is *not* suitable for other devices based 
on the
> focaltec ft5x06 devices, since they contain vendor-specific firmware. In
> particular this driver is not suitable for the Nook tablet."

That contradicts my experience with this driver. It works fine on a BOE 
TV080WXM-LL4 LCM with a FT8201 without modifications.

> So chips from focaltech which can be equipped with different firmware?

Firmware can change, the vendor drivers support handling firmware transfers.
Apparently firmware is handled differently, depending on how a 
manufacturer designs their LCM.
They can be shipped without flash, with flash but no firmware programmed 
or complete with firmware.

In all but the last scenario the driver would have to load (and possibly 
program to flash) the firmware for the LCM to be fully operational to 
specifications. Today, this driver doesn't do that. As such the 
behaviour is unlikely to change and could as well be described in the 
devicetree instead of having the driver try guessing.

I personally would rather trust whoever is performing the integration 
work to properly describe the hardware in the devicetree if the firmware 
doesn't allow for a definitive way to identify how it would like to be 
treated.
If the driver ever gained firmware handling features I'd expect the 
filename for the firmware to be defined in the devicetree together with 
the properties describing the treatment it expects.

> So edt prefix means EDT firmware?

I don't think that's how the compatible strings are used today, but it 
is what would make sense in my opinion.

> Looking around I found this:
>              if (tsdata->version == EV_FT)
>                          swap(x, y);
> ...
>                 case 0x59:  /* Evervision Display with FT5xx6 TS */
>                          tsdata->version = EV_FT;
>
> I need swap(x.y), I am using touchscreen-swapped-x-y property now.
> So evervision prefix?

The compatible string doesn't have any bearing on whether x and y are 
swapped. The driver relies on its device detection heuristic for that 
determination.
Ideally, the driver would allow describing this property

   1. in the devicetree using the "touchscreen-swapped-x-y" property 
from the common touchscreen bindings

   2. by extending the edt_i2c_chip_data struct to hold that property 
and set it based on the compatible string if it is, in fact, a property 
of that specific IC

The only reason I created this wall of text is because I am intending to 
submit a very similar patch, using the "focaltech,ft8201" string. So 
getting a decision on this would be helpful for my efforts as well.

Regards,
Felix

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-26  2:54           ` Felix Kaechele
@ 2024-04-26  7:56             ` Andreas Kemnade
  2024-04-26 13:51               ` Andy Shevchenko
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Kemnade @ 2024-04-26  7:56 UTC (permalink / raw)
  To: Felix Kaechele
  Cc: Andy Shevchenko, dmitry.torokhov, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, o.rempel, u.kleine-koenig,
	hdegoede, ye.xingchen, p.puschmann, linux-input, devicetree,
	linux-kernel, caleb.connolly

On Thu, 25 Apr 2024 22:54:13 -0400
Felix Kaechele <felix@kaechele.ca> wrote:

> On 2024-04-25 12:54, Andreas Kemnade wrote:
> > On Fri, 5 Apr 2024 20:21:19 +0300
> > Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> >  
> >> On Fri, Apr 5, 2024 at 7:28 PM Andreas Kemnade <andreas@kemnade.info> wrote: >>> On Fri, 5 Apr 2024 18:13:45 +0300  
> >>> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:  
> 
> ...
> 
> >>>> Why a different vendor prefix?  
> 
> ...
> 
> >>> I sorted by the numbers. Looking at datasheets for other controllers I see >>> https://www.displayfuture.com/Display/datasheet/controller/FT5x06.pdf
> >>> it only mentions FocalTech Systems Co., Ltd.  
> >>
> >> But does the driver use that? AFAICS it uses edt. Perhaps it's due to
> >> a business split, not to my knowledge anyway.  
> 
> I've been looking into this over the past few weeks as I was working on 
> mainline support for an Android device.
> And please forgive me if any of the following is not fully accurate, I'm 
> not an industry expert.
> 
> After some research, my understanding of this is as follows:
> 
> - There are companies that make touch ICs, LCD driver ICs and sometimes 
> even ICs that are both. Focaltech or Himax are examples of such companies.
> 
> - There are companies that make LCMs. These are complete assemblies of 
> panel, backlight, touch layer and driver circuitry PCBs. This is what 
> OEMs generally purchase when they design a consumer device. Emerging 
> Display Technologies Corp. (EDT) is such a LCM manufacturing company. 
> More often than not LCM manufacturers do not make their own driver ICs.
> 
> LCM manufacturers include ICs from Focaltech in their LCMs.
> To my knowledge Focaltech is not a manufacturer of LCMs.
> 
> As such, an interpretation of the compatible string "edt,edt-ft5406" 
> could be: Unspecified EDT LCM with Focaltech FT5406 IC.
> 
>  From my perspective, more correct would either be something like 
> "edt,etm070001bdh6" (the LCM by EDT that contains this IC, especially if 
> it had model specific quirks) or "focaltech,ft5406".
> But "edt,edt-ft5406" is incorrect if being specific is the goal here.
> Given that the driver predates much of the DT binding rigour it's what 
> we have now though.
> 
I think focaltech,ft5406 is better because it is consistent with other drivers/
bindings. We do not specify the display it is used on on other touchscreen
bindings. We do not specify the actual LEDs behind a LED interface chip.
And often the chip name is more easily to find out than the name of a
display.
[...]

> I don't think that's how the compatible strings are used today, but it 
> is what would make sense in my opinion.
> 
> > Looking around I found this:
> >              if (tsdata->version == EV_FT)
> >                          swap(x, y);
> > ...
> >                 case 0x59:  /* Evervision Display with FT5xx6 TS */
> >                          tsdata->version = EV_FT;
> >
> > I need swap(x.y), I am using touchscreen-swapped-x-y property now.
> > So evervision prefix?  
> 
> The compatible string doesn't have any bearing on whether x and y are 
> swapped. The driver relies on its device detection heuristic for that 
> determination.

Well, I think, yes, it could have a bearing, on some models, maybe x is
swapped with some pressure value in some record.

> Ideally, the driver would allow describing this property
> 
>    1. in the devicetree using the "touchscreen-swapped-x-y" property 
> from the common touchscreen bindings
> 
It allows that right now.
Well, the devicetree should be driver/os independent, so it describes the
hardware. so the driver should spit out the records specified as x
in the chip manual as x and the ones specified as y as y.

If the display is then wired up to the controller in an unusual way,
it can be compensated by the devicetree specification (if we go the
focaltech,ftxxxx road instead of edt,etm070001bdh6). 

But datasheets... where are you? So we need a heuristic. I guess
the order used most is probably the one used in the data sheet.

>    2. by extending the edt_i2c_chip_data struct to hold that property 
> and set it based on the compatible string if it is, in fact, a property 
> of that specific IC
> 
yes, agreed.

Regards,
Andreas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-26  7:56             ` Andreas Kemnade
@ 2024-04-26 13:51               ` Andy Shevchenko
  2024-04-26 18:53                 ` Andreas Kemnade
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2024-04-26 13:51 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Felix Kaechele, dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt,
	conor+dt, o.rempel, u.kleine-koenig, hdegoede, ye.xingchen,
	p.puschmann, linux-input, devicetree, linux-kernel,
	caleb.connolly

On Fri, Apr 26, 2024 at 10:56 AM Andreas Kemnade <andreas@kemnade.info> wrote:
> On Thu, 25 Apr 2024 22:54:13 -0400
> Felix Kaechele <felix@kaechele.ca> wrote:
> > On 2024-04-25 12:54, Andreas Kemnade wrote:
> > > On Fri, 5 Apr 2024 20:21:19 +0300
> > > Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > >> On Fri, Apr 5, 2024 at 7:28 PM Andreas Kemnade <andreas@kemnade.info> wrote: >>> On Fri, 5 Apr 2024 18:13:45 +0300
> > >>> Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

...

> > >>>> Why a different vendor prefix?
> >
> > >>> I sorted by the numbers. Looking at datasheets for other controllers I see >>> https://www.displayfuture.com/Display/datasheet/controller/FT5x06.pdf
> > >>> it only mentions FocalTech Systems Co., Ltd.
> > >>
> > >> But does the driver use that? AFAICS it uses edt. Perhaps it's due to
> > >> a business split, not to my knowledge anyway.
> >
> > I've been looking into this over the past few weeks as I was working on
> > mainline support for an Android device.
> > And please forgive me if any of the following is not fully accurate, I'm
> > not an industry expert.
> >
> > After some research, my understanding of this is as follows:
> >
> > - There are companies that make touch ICs, LCD driver ICs and sometimes
> > even ICs that are both. Focaltech or Himax are examples of such companies.
> >
> > - There are companies that make LCMs. These are complete assemblies of
> > panel, backlight, touch layer and driver circuitry PCBs. This is what
> > OEMs generally purchase when they design a consumer device. Emerging
> > Display Technologies Corp. (EDT) is such a LCM manufacturing company.
> > More often than not LCM manufacturers do not make their own driver ICs.
> >
> > LCM manufacturers include ICs from Focaltech in their LCMs.
> > To my knowledge Focaltech is not a manufacturer of LCMs.
> >
> > As such, an interpretation of the compatible string "edt,edt-ft5406"
> > could be: Unspecified EDT LCM with Focaltech FT5406 IC.
> >
> >  From my perspective, more correct would either be something like
> > "edt,etm070001bdh6" (the LCM by EDT that contains this IC, especially if
> > it had model specific quirks) or "focaltech,ft5406".
> > But "edt,edt-ft5406" is incorrect if being specific is the goal here.
> > Given that the driver predates much of the DT binding rigour it's what
> > we have now though.
> >
> I think focaltech,ft5406 is better because it is consistent with other drivers/
> bindings. We do not specify the display it is used on on other touchscreen
> bindings. We do not specify the actual LEDs behind a LED interface chip.
> And often the chip name is more easily to find out than the name of a
> display.

I'm _not_ a DT person, you should clarify this with them. I just
pointed out the possible mistake (from Linux / DT perspective), and
not hardware / business related one. If they are fine with focaltech
prefix, then it's fine to me as well!

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426
  2024-04-26 13:51               ` Andy Shevchenko
@ 2024-04-26 18:53                 ` Andreas Kemnade
  0 siblings, 0 replies; 12+ messages in thread
From: Andreas Kemnade @ 2024-04-26 18:53 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Felix Kaechele, dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt,
	conor+dt, o.rempel, u.kleine-koenig, hdegoede, ye.xingchen,
	p.puschmann, linux-input, devicetree, linux-kernel,
	caleb.connolly

Hi,

On Fri, 26 Apr 2024 16:51:59 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> > I think focaltech,ft5406 is better because it is consistent with other drivers/
> > bindings. We do not specify the display it is used on on other touchscreen
> > bindings. We do not specify the actual LEDs behind a LED interface chip.
> > And often the chip name is more easily to find out than the name of a
> > display.  
> 
> I'm _not_ a DT person, you should clarify this with them. I just
> pointed out the possible mistake (from Linux / DT perspective), and
> not hardware / business related one. If they are fine with focaltech
> prefix, then it's fine to me as well!

as 1/2 is Acked-by DT, I think the compatible is fine, so I will probably
just send a v3 with a sorted 2/2.

Regards,
Andreas

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-04-26 18:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 22:20 [PATCH v2 0/2] Input: add ft5426 Andreas Kemnade
2024-04-04 22:20 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: edt-ft5x06: Add ft5426 Andreas Kemnade
2024-04-04 22:20 ` [PATCH v2 2/2] Input: edt-ft5x06 - add ft5426 Andreas Kemnade
2024-04-05 15:13   ` Andy Shevchenko
2024-04-05 16:28     ` Andreas Kemnade
2024-04-05 17:21       ` Andy Shevchenko
2024-04-05 18:56         ` Andreas Kemnade
2024-04-25 16:54         ` Andreas Kemnade
2024-04-26  2:54           ` Felix Kaechele
2024-04-26  7:56             ` Andreas Kemnade
2024-04-26 13:51               ` Andy Shevchenko
2024-04-26 18:53                 ` Andreas Kemnade

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).