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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 6 Oct 2014 09:37:03 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Mark Rutland <mark.rutland@....com>
Cc:	Duson Lin <dusonlin@....com.tw>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"bleung@...omium.org" <bleung@...omium.org>,
	"agnescheng@...omium.org" <agnescheng@...omium.org>,
	"phoenix@....com.tw" <phoenix@....com.tw>,
	"jeff.chuang@....com.tw" <jeff.chuang@....com.tw>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2] Input: add i2c/smbus driver for elan touchpad

On Mon, Oct 06, 2014 at 10:24:52AM +0100, Mark Rutland wrote:
> On Fri, Oct 03, 2014 at 10:06:51PM +0100, Dmitry Torokhov wrote:
> > [adding devicetree folks...]
> > 
> > On Fri, Oct 03, 2014 at 02:03:57PM -0700, Dmitry Torokhov wrote:
> > > diff --git a/Documentation/devicetree/bindings/input/elan_i2c.txt b/Documentation/devicetree/bindings/input/elan_i2c.txt
> > > new file mode 100644
> > > index 0000000..0a6ee7d
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/input/elan_i2c.txt
> > > @@ -0,0 +1,34 @@
> > > +Elantech I2C Touchpad
> > > +
> > > +Required properties:
> > > +- compatible: must be "elan,i2c_touchpad".
> 
> s/_/-/ in DT strings and property names plase.
> 
> The name seems very generic, and you mention the driver supports a
> variety of touchpads. Please choose a specific device name for the
> compatible string. Other devices can have that as a fallback entry in
> addition to a more specific string.

Duson, what would be a good model/device name here?

> 
> > > +- reg: I2C address of the chip.
> > > +- interrupt-parent: a phandle for the gpio controller (see interrupt
> > > +  binding[0]).
> > > +- interrupts: (gpio) interrupt to which the chip is connected (see interrupt
> > > +  binding[0]).
> 
> If this is an interrupt from the PoV of this device, it doesn't matter
> if the other end is connected to a hardwired interrupt controller or a
> gpio. So drop the mention of GPIOs frmom the interrupt properties.
> 
> > > +
> > > +Optional properties:
> > > +- wakeup-source: touchpad should be configured as a wakeup source.
> 
> s/should be configured as/can be used as/
> 
> > > +- pinctrl-names: should be "default" (see pinctrl binding [1]).
> > > +- pinctrl-0: a phandle pointing to the pin settings for the device (see
> > > +  pinctrl binding [1]).
> > > +- vcc-supply: a phandle for the regulator supplying 3.3V power.
> > > +
> > > +[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
> > > +[1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
> > > +
> > > +Example:
> > > +     &i2c1 {
> > > +             /* ... */
> > > +
> > > +             touchpad@15 {
> > > +                     compatible = "elan,i2c_touchpad";
> > > +                     reg = <0x15>;
> > > +                     interrupt-parent = <&gpio4>;
> > > +                     interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
> > > +                     wakeup-source;
> > > +             };
> > > +
> > > +             /* ... */
> > > +     };
> 
> Otherwise this looks ok.

Thanks Mark.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists