From: Dmitry Torokhov <dmitry.torokhov@gmail.com> To: Alberto Panizzo <maramaopercheseimorto@gmail.com> Cc: H Hartley Sweeten <hartleys@visionengravers.com>, linux-input@vger.kernel.org, linux-kernel <linux-kernel@vger.kernel.org>, linux-arm-kernel-infradead <linux-arm-kernel@lists.infradead.org>, Sascha linux-arm <s.hauer@pengutronix.de> Subject: Re: [PATCH v2] input: MXC: add mxc-keypad driver to support the Keypad Port present in the mxc application processors family. Date: Tue, 26 Jan 2010 01:52:17 -0800 [thread overview] Message-ID: <20100126095217.GC3480@core.coreip.homeip.net> (raw) In-Reply-To: <1263664125.4350.18.camel@realization> Hi Alberto, On Sat, Jan 16, 2010 at 06:48:45PM +0100, Alberto Panizzo wrote: > Version 2 for this driver proposal. > -------------------------------------------------------------------------------- > The MXC family of Application Processors is shipped with a Keypad Port > supported now by this driver. > > The peripheral can control up to an 8x8 matrix key pad where all the scanning > procedure is done via software. > > The hardware provide two interrupts: one for a key pressed (KDI) and one for > all key releases (KRI). There is also a simple circuit for glitch reduction > (said for synchronization) made by two series of 3 D-latches clocked by the > keypad-clock that stabilize the interrupts sources. > KDI and KRI are fired only if the respective conditions are maintained for at > last 4 keypad-clock cycle. > > Those simple synchronization circuits are used also for multiple key pressures: > between a KDI and a KRI the driver reset the sync circuit and re-enable the KDI > interrupt so after 3 keypad-clock cycle another KDI is fired making possible to > repeat the matrix scan operation. > Nicely looking driver, thank you. > This algorithm is done via a threaded management of the keypad interrupt source > and delayed by a proper (and longer) debounce interval controlled by the > platform initialization. This I am not so sure about - the core of the matrix scan routine does not sleep so I wonder if starting a separate thread is not too wasteful in this case - you can easily do whan you want with a timer, no? > + > + /* > + * Search for rows and cols enabled > + */ > + keymap_data = (struct matrix_keymap_data *) pdata->keymap_data; Why do you need to cast away constness instead of declaring keymap_data as const pointer? -- Dmitry
WARNING: multiple messages have this Message-ID
From: dmitry.torokhov@gmail.com (Dmitry Torokhov) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] input: MXC: add mxc-keypad driver to support the Keypad Port present in the mxc application processors family. Date: Tue, 26 Jan 2010 01:52:17 -0800 [thread overview] Message-ID: <20100126095217.GC3480@core.coreip.homeip.net> (raw) In-Reply-To: <1263664125.4350.18.camel@realization> Hi Alberto, On Sat, Jan 16, 2010 at 06:48:45PM +0100, Alberto Panizzo wrote: > Version 2 for this driver proposal. > -------------------------------------------------------------------------------- > The MXC family of Application Processors is shipped with a Keypad Port > supported now by this driver. > > The peripheral can control up to an 8x8 matrix key pad where all the scanning > procedure is done via software. > > The hardware provide two interrupts: one for a key pressed (KDI) and one for > all key releases (KRI). There is also a simple circuit for glitch reduction > (said for synchronization) made by two series of 3 D-latches clocked by the > keypad-clock that stabilize the interrupts sources. > KDI and KRI are fired only if the respective conditions are maintained for at > last 4 keypad-clock cycle. > > Those simple synchronization circuits are used also for multiple key pressures: > between a KDI and a KRI the driver reset the sync circuit and re-enable the KDI > interrupt so after 3 keypad-clock cycle another KDI is fired making possible to > repeat the matrix scan operation. > Nicely looking driver, thank you. > This algorithm is done via a threaded management of the keypad interrupt source > and delayed by a proper (and longer) debounce interval controlled by the > platform initialization. This I am not so sure about - the core of the matrix scan routine does not sleep so I wonder if starting a separate thread is not too wasteful in this case - you can easily do whan you want with a timer, no? > + > + /* > + * Search for rows and cols enabled > + */ > + keymap_data = (struct matrix_keymap_data *) pdata->keymap_data; Why do you need to cast away constness instead of declaring keymap_data as const pointer? -- Dmitry
next prev parent reply other threads:[~2010-01-26 9:52 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-01-08 18:58 MXC: input: add mxc-keypad driver to support the keypad interface " Alberto Panizzo 2010-01-08 18:58 ` Alberto Panizzo 2010-01-08 20:33 ` H Hartley Sweeten 2010-01-08 20:33 ` H Hartley Sweeten 2010-01-08 20:33 ` H Hartley Sweeten 2010-01-16 17:48 ` [PATCH v2] input: MXC: add mxc-keypad driver to support the Keypad Port " Alberto Panizzo 2010-01-16 17:48 ` Alberto Panizzo 2010-01-21 16:17 ` Alberto Panizzo 2010-01-21 16:17 ` Alberto Panizzo 2010-01-23 10:46 ` Alberto Panizzo 2010-01-23 10:46 ` Alberto Panizzo 2010-01-23 10:46 ` Alberto Panizzo 2010-01-26 9:52 ` Dmitry Torokhov [this message] 2010-01-26 9:52 ` Dmitry Torokhov 2010-01-26 10:29 ` Alberto Panizzo 2010-01-26 10:29 ` Alberto Panizzo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100126095217.GC3480@core.coreip.homeip.net \ --to=dmitry.torokhov@gmail.com \ --cc=hartleys@visionengravers.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-input@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=maramaopercheseimorto@gmail.com \ --cc=s.hauer@pengutronix.de \ --subject='Re: [PATCH v2] input: MXC: add mxc-keypad driver to support the Keypad Port present in the mxc application processors family.' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.