From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Subject: Re: [PATCH 5/5] Input: Add ChromeOS EC keyboard driver Date: Wed, 19 Dec 2012 12:20:03 -0800 Message-ID: References: <1355348028-19017-1-git-send-email-sjg@chromium.org> <1355348028-19017-6-git-send-email-sjg@chromium.org> <20121215011345.9D5973E0BEE@localhost> <2990462.l5jY89jKQx@dtor-d630.eng.vmware.com> <20121219125722.DCD3E3E0AD7@localhost> <20121219181643.GA31435@core.coreip.homeip.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0886577501179963914==" Return-path: In-Reply-To: <20121219181643.GA31435-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Dmitry Torokhov Cc: Roland Stigge , Vincent Palatin , Samuel Ortiz , linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Devicetree Discuss , LKML , Rob Herring , Wolfram Sang , Luigi Semenzato , Felipe Balbi , "linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Sourav Poddar List-Id: devicetree@vger.kernel.org --===============0886577501179963914== Content-Type: multipart/alternative; boundary=14dae93a1145ed1c7104d13a566d --14dae93a1145ed1c7104d13a566d Content-Type: text/plain; charset=ISO-8859-1 On Wed, Dec 19, 2012 at 10:16 AM, Dmitry Torokhov wrote: > On Wed, Dec 19, 2012 at 12:57:22PM +0000, Grant Likely wrote: > > On Fri, 14 Dec 2012 17:43:31 -0800, Dmitry Torokhov < > dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Saturday, December 15, 2012 01:13:45 AM Grant Likely wrote: > > > > On Wed, 12 Dec 2012 13:33:48 -0800, Simon Glass > wrote: > > > > > Use the key-matrix layer to interpret key scan information from > the EC > > > > > and inject input based on the FDT-supplied key map. This driver > registers > > > > > itself with the ChromeOS EC driver to perform communications. > > > > > > > > > > Additional FDT bindings are provided to specify rows/columns and > the > > > > > auto-repeat information. > > > > > > > > > > Signed-off-by: Simon Glass > > > > > Signed-off-by: Luigi Semenzato > > > > > Signed-off-by: Vincent Palatin > > > > > --- > > > > > > > > > > .../devicetree/bindings/input/cros-ec-keyb.txt | 77 ++++ > > > > > drivers/input/keyboard/Kconfig | 10 + > > > > > drivers/input/keyboard/Makefile | 1 + > > > > > drivers/input/keyboard/cros_ec_keyb.c | 413 > > > > > ++++++++++++++++++++ 4 files changed, 501 insertions(+), 0 > deletions(-) > > > > > create mode 100644 > > > > > Documentation/devicetree/bindings/input/cros-ec-keyb.txt > > > > > create mode 100644 drivers/input/keyboard/cros_ec_keyb.c > > > > > > > > > > diff --git > a/Documentation/devicetree/bindings/input/cros-ec-keyb.txt > > > > > b/Documentation/devicetree/bindings/input/cros-ec-keyb.txt new > file mode > > > > > 100644 > > > > > index 0000000..67f51d8 > > > > > --- /dev/null > > > > > +++ b/Documentation/devicetree/bindings/input/cros-ec-keyb.txt > > > > > @@ -0,0 +1,77 @@ > > > > > +ChromeOS EC Keyboard > > > > > + > > > > > +Google's ChromeOS EC Keyboard is a simple matrix keyboard > implemented on > > > > > +a separate EC (Embedded Controller) device. It provides a message > for > > > > > reading +key scans from the EC. These are then converted into > keycodes > > > > > for processing +by the kernel. > > > > > + > > > > > +Required properties: > > > > > +- compatible: "google,cros-ec-keyb" > > > > > +- google,key-rows: Number of keyboard rows (must be <= 8) > > > > > +- google,key-columns: Number of keyboard columns (must be <= 13) > > > > > +- google,repeat-delay-ms: Key repeat delay in milliseconds > > > > > +- google,repeat-rate-ms: Key repeat rate in milliseconds > > > > > > > > Hmmm, these should probably be in a common binding. Take a look at > > > > the other input bindings and make a proposal for properties to add to > > > > matrix-keymap.txt. > > > > > > Actually these are not essentia for bringup and can be set from > userspace, > > > so I'd say simply drop them. > > > > Aren't they needed for a working keyboard? If so, I would really think > > they should be set correctly without userspace intervention. > > I am sorry if I was unclear, but I was actually talking about the last > 2: repeat-delay-ms and repeat-rate-ms. Input core has I believe sane > defaults (250 msec delay, 33 cps autorepeat) and user can adjust if > other rate is preferred. > I seems like I should remove these two, then. It would be nice if we could keep these parameters so that the keyboard doesn't require user-space set up to work, but I understand and agree they are not essential. Regarding Grant's request to come up with a common binding, if I remove these then that is not needed, right? Regards, Simon > Thanks. > > -- > Dmitry > --14dae93a1145ed1c7104d13a566d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
<= div dir=3D"ltr">
On Wed, Dec 19, 2012 at = 10:16 AM, Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Wed, Dec 19, 201= 2 at 12:57:22PM +0000, Grant Likely wrote:
> On Fri, 14 Dec 2012 17:43:31 -0800, Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > On Saturday, December 15, 2012 01:13:45 AM Grant Likely wrote: > > > On Wed, 12 Dec 2012 13:33:48 -0800, Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> > > > Use the key-matrix layer to interpret key scan informat= ion from the EC
> > > > and inject input based on the FDT-supplied key map. Thi= s driver registers
> > > > itself with the ChromeOS EC driver to perform communica= tions.
> > > >
> > > > Additional FDT bindings are provided to specify rows/co= lumns and the
> > > > auto-repeat information.
> > > >
> > > > Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > > > Signed-off-by: Luigi Semenzato <semenzato-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > > > Signed-off-by: Vincent Palatin <vpalatin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > > > ---
> > > >
> > > > =A0.../devicetree/bindings/input/cros-ec-keyb.txt =A0 = =A0 | =A0 77 ++++
> > > > =A0drivers/input/keyboard/Kconfig =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 | =A0 10 +
> > > > =A0drivers/input/keyboard/Makefile =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0| =A0 =A01 +
> > > > =A0drivers/input/keyboard/cros_ec_keyb.c =A0 =A0 =A0 = =A0 =A0 =A0 =A0| =A0413
> > > > =A0++++++++++++++++++++ 4 files changed, 501 insertions= (+), 0 deletions(-)
> > > > =A0create mode 100644
> > > > =A0Documentation/devicetree/bindings/input/cros-ec-keyb= .txt
> > > > =A0create mode 100644 drivers/input/keyboard/cros_ec_ke= yb.c
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/input/cr= os-ec-keyb.txt
> > > > b/Documentation/devicetree/bindings/input/cros-ec-keyb.= txt new file mode
> > > > 100644
> > > > index 0000000..67f51d8
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/input/cros-ec-k= eyb.txt
> > > > @@ -0,0 +1,77 @@
> > > > +ChromeOS EC Keyboard
> > > > +
> > > > +Google's ChromeOS EC Keyboard is a simple matrix k= eyboard implemented on
> > > > +a separate EC (Embedded Controller) device. It provide= s a message for
> > > > reading +key scans from the EC. These are then converte= d into keycodes
> > > > for processing +by the kernel.
> > > > +
> > > > +Required properties:
> > > > +- compatible: "google,cros-ec-keyb"
> > > > +- google,key-rows: Number of keyboard rows (must be &l= t;=3D 8)
> > > > +- google,key-columns: Number of keyboard columns (must= be <=3D 13)
> > > > +- google,repeat-delay-ms: Key repeat delay in millisec= onds
> > > > +- google,repeat-rate-ms: Key repeat rate in millisecon= ds
> > >
> > > Hmmm, these should probably be in a common binding. Take a l= ook at
> > > the other input bindings and make a proposal for properties = to add to
> > > matrix-keymap.txt.
> >
> > Actually these are not essentia for bringup and can be set from u= serspace,
> > so I'd say simply drop them.
>
> Aren't they needed for a working keyboard? If so, I would really t= hink
> they should be set correctly without userspace intervention.

I am sorry if I was unclear, but I was actually talking about t= he last
2: repeat-delay-ms and repeat-rate-ms. Input core has I believe sane
defaults (250 msec delay, 33 cps autorepeat) and user can adjust if
other rate is preferred.

I seems = like I should remove these two, then.

= It would be nice if we could keep these parameters so that the keyboard doe= sn't require user-space set up to work, but I understand and agree they= are not essential. Regarding Grant's request to come up with a common = binding, if I remove these then that is not needed, right?

Regards,
Simon

Thanks.

--
Dmitry

--14dae93a1145ed1c7104d13a566d-- --===============0886577501179963914== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/devicetree-discuss --===============0886577501179963914==--