[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1F3AC3675D538145B1661F571FE1805F19A79DF9@irsmsx105.ger.corp.intel.com>
Date: Fri, 5 Jun 2015 16:37:49 +0000
From: "Tirdea, Irina" <irina.tirdea@...el.com>
To: Bastien Nocera <hadess@...ess.net>
CC: Mark Rutland <mark.rutland@....com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 8/9] input: goodix: add support for ESD
> -----Original Message-----
> From: Bastien Nocera [mailto:hadess@...ess.net]
> Sent: 04 June, 2015 15:58
> To: Tirdea, Irina
> Cc: Mark Rutland; Dmitry Torokhov; linux-input@...r.kernel.org; devicetree@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH 8/9] input: goodix: add support for ESD
>
> On Thu, 2015-05-28 at 14:26 +0000, Tirdea, Irina wrote:
> >
> > > -----Original Message-----
> > > From: linux-input-owner@...r.kernel.org [mailto:
> > > linux-input-owner@...r.kernel.org] On Behalf Of Mark Rutland
> > > Sent: 28 May, 2015 16:24
> > > To: Tirdea, Irina
> > > Cc: Dmitry Torokhov; Bastien Nocera; linux-input@...r.kernel.org;
> > > devicetree@...r.kernel.org; linux-kernel@...r.kernel.org
> > > Subject: Re: [PATCH 8/9] input: goodix: add support for ESD
> > >
> > > On Thu, May 28, 2015 at 01:47:44PM +0100, Irina Tirdea wrote:
> > > > Add ESD (Electrostatic Discharge) protection mechanism.
> > > >
> > > > The driver enables ESD protection in HW and checks a register
> > > > to determine if ESD occurred. If ESD is signalled by the HW,
> > > > the driver will reset the device.
> > > >
> > > > The ESD poll time (in ms) can be set through
> > > > esd-recovery-timeout-ms ACPI/DT property. If it is set to 0,
> > > > ESD protection is disabled.
> > > >
> > > > Signed-off-by: Irina Tirdea <irina.tirdea@...el.com>
> > > > ---
> > > > .../bindings/input/touchscreen/goodix.txt | 4 +
> > > > drivers/input/touchscreen/goodix.c | 106
> > > > ++++++++++++++++++++-
> > > > 2 files changed, 106 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > index 9e4ff69..9132ee0 100644
> > > > ---
> > > > a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > +++
> > > > b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt
> > > > @@ -19,6 +19,10 @@ Optional properties:
> > > >
> > > > - device-config : device configuration information
> > > > (specified as byte
> > > > array). Maximum size is 240 bytes.
> > > > + - esd-recovery-timeout-ms : ESD poll time (in milli seconds)
> > > > for the driver to
> > > > + check if ESD occurred and in that
> > > > case reset the
> > > > + device. ESD is disabled if this
> > > > property is not set
> > > > + or is set to 0.
> > >
> > > This sounds like software configuration rather than HW description.
> > > Is
> > > there any reason this needs to be a DT property?
> > >
> >
> > Although this enables a software feature, it depends on the platform
> > if electrostatic discharge
> > protection should be enabled or not. Some platform designs handle ESD
> > better and do not need
> > the SW mechanism, so the property can be used to disable it.
> >
> > I also saw an example in
> > Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt
> > and I though this is the standard way to use it.
>
> As for the configuration data, is this useful/used on ACPI?
This can be used with ACPI 5.1 by specifying the timeout as a _DSD property.
I will add an excerpt from an ACPI DSDT file in the commit message.
>
> > > Can we not just choose a sensible default and allow this to be
> > > overridden dynamically?
> >
> > I could separate the enabling part from the actual poll timeout by
> > using a DT property to enable/disable
> > ESD and a sysfs property to set the timeout. I can also move this
> > over to sysfs entirely if you prefer.
>
> If this needs to be in the DT for some devices, and isn't available
> from ACPI, maybe we should have a list of DMI matches for ACPI instead,
> with a module option to override it?
Powered by blists - more mailing lists