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]
Message-Id: <CVUQTCJBG265.1MTSYOLY0FR7Q@gimli.ms.mff.cuni.cz>
Date:   Thu, 28 Sep 2023 19:56:45 +0200
From:   "Karel Balej" <karelb@...li.ms.mff.cuni.cz>
To:     "Jeff LaBundy" <jeff@...undy.com>, "Karel Balej" <balejk@...fyz.cz>
Cc:     "Dmitry Torokhov" <dmitry.torokhov@...il.com>,
        "Rob Herring" <robh+dt@...nel.org>,
        "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
        "Conor Dooley" <conor+dt@...nel.org>,
        "Markuss Broks" <markuss.broks@...il.com>,
        <linux-input@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Duje Mihanović <duje.mihanovic@...le.hr>,
        <~postmarketos/upstreaming@...ts.sr.ht>
Subject: Re: [PATCH 2/2] input: Imagis: add support for the IST3032C
 touchscreen

Hello, Jeff,

thank you very much for your feedback.

> > +	if (chip_id == IST3032C_WHOAMI) {
> > +		/*
> > +		 * if the regulator voltage is not set like this, the touchscreen
> > +		 * generates random touches without user interaction
> > +		 */
> > +		error = regulator_set_voltage(ts->supplies[0].consumer, 3100000, 3100000);
> > +		if (error)
> > +			dev_warn(dev, "failed to set regulator voltage\n");
> > +	}
> > +
>
> Opinions may vary, but mine is that this kind of hard-coded board-level policy
> does not belong in the driver. Surely the supply need not be equal to exactly
> 3.1 V and this is merely an upper or lower limit? Assuming so, what if the board
> designer opts to share this supply with another consumer that requires a specific
> voltage not equal to 3.1 V, but still within the safe range of IST3032C?
>
> To me, this restriction belongs in dts, specifically within the regulator child
> node referenced by the client which bears the new 'ist3032c' compatible string.
> Maybe a better solution is to simply note this presumed silicon erratum in the
> description of the vdd supply in the binding which, as Conor states, must not be
> clubbed with driver patches.

I agree that the voltage should not be hardcoded. I do not know what the
safe range for the touchscreen is though, because the downstream driver
does exactly this. I will try to test it with several values within the
range allowed by the regulator and see if I can determine some limits on
when the "ghost" touches do not appear.

However I am not sure whether this setting should be moved to the
regulator DT - it is my understanding that the DT for the regulator
should list the min/max range *supported* by the regulator, not conform
to requirements of its consumers, which should instead ask for the
regulator to be set to a range they require themselves, via their driver
- is it not so?

The regulator driver is not mainlined yet (although I managed to get the
downstream code working with mainline), however the downstream DT
contains much wider range of supported voltage (compared to those 3.1 V
used by the touchscreen) - an information which would get lost if I set
the DT for the regulator by the requirements of the touchscreen, which I
believe would have similiar implications as what you said regarding
using this regulator with other consumers.

What would seem a reasonable solution to me would be to move the voltage
range values to the touchscreen DT (which incidentally is what the
downstream driver does also, except it uses one value for both min and
max), so that they would be set by the driver but not hardcoded in the
code - what do you think about this?

Best regards,
K. B.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ