From: Pavel Machek <pavel@ucw.cz>
To: Sebastian Reichel <sre@debian.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Russell King <linux@arm.linux.org.uk>,
Rob Landley <rob@landley.net>, Pawel Moll <pawel.moll@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Tony Lindgren <tony@atomide.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Sebastian Reichel <sre@ring0.de>,
'Beno?t Cousson' <bcousson@baylibre.com>,
linux-input@vger.kernel.org,
Grant Likely <grant.likely@linaro.org>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv2 1/3] Input: twl4030-keypad - add device tree support
Date: Sun, 27 Oct 2013 12:17:15 +0100 [thread overview]
Message-ID: <20131027111715.GA2437@xo-6d-61-c0.localdomain> (raw)
In-Reply-To: <1382446042-27099-2-git-send-email-sre@debian.org>
Hi!
> Add device tree support for twl4030 keypad driver and update the
> Documentation with twl4030 keypad device tree binding information.
>
> Tested on Nokia N900.
It looks pretty good.
> +++ b/Documentation/devicetree/bindings/input/twl4030-keypad.txt
> @@ -0,0 +1,31 @@
> +* TWL4030's Keypad Controller device tree bindings
> +
> +TWL4030's Keypad controller is used to interface a SoC with a matrix-type
> +keypad device. The keypad controller supports multiple row and column lines.
> +A key can be placed at each intersection of a unique row and a unique column.
> +The keypad controller can sense a key-press and key-release and report the
> +event using a interrupt to the cpu.
> +
> +This binding is based on the matrix-keymap binding with the following
> +changes:
> +
> + * keypad,num-rows and keypad,num-columns are required.
Is "keypad," prefix neccessary here?
> +Optional Properties specific to linux:
> +- linux,keypad-no-autorepeat: do no enable autorepeat feature.
"do not autorepeat". Plus I do not see what is Linux specifc about not
autorepeating... Other systems will likely know about autorepeat, too.
> @@ -324,6 +326,31 @@ static int twl4030_kp_program(struct twl4030_keypad *kp)
> return 0;
> }
>
> +#if IS_ENABLED(CONFIG_OF)
I'm probably missing something here, but why not #ifdef CONFIG_OF?
> @@ -381,7 +426,7 @@ static int twl4030_kp_probe(struct platform_device *pdev)
>
> input_set_capability(input, EV_MSC, MSC_SCAN);
> /* Enable auto repeat feature of Linux input subsystem */
> - if (pdata->rep)
> + if (!kp->no_autorepeat)
> __set_bit(EV_REP, input->evbit);
>
Double negation is nasty to read. I believe code would be more
readable if you switched logic to kp->autorepeat.
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2013-10-27 11:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 12:47 [PATCHv2 0/3] Add Nokia N900 DT support Sebastian Reichel
2013-10-22 12:47 ` [PATCHv2 1/3] Input: twl4030-keypad - add device tree support Sebastian Reichel
2013-10-27 11:17 ` Pavel Machek [this message]
2013-10-27 11:40 ` Sebastian Reichel
[not found] ` <20131027114026.GB14091-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org>
2013-10-27 11:47 ` Pavel Machek
2013-10-27 12:23 ` Tony Lindgren
2013-10-27 16:31 ` Sebastian Reichel
2013-10-30 13:53 ` Grant Likely
2013-10-30 13:59 ` Pavel Machek
2013-10-28 6:42 ` Kumar Gala
2013-10-29 1:06 ` Sebastian Reichel
2013-10-29 8:33 ` Kumar Gala
2013-10-29 10:25 ` Sebastian Reichel
2013-10-22 12:47 ` [PATCHv2 2/3] DTS: ARM: TWL4030: Add keypad node Sebastian Reichel
2013-10-22 12:47 ` [PATCHv2 3/3] ARM: dts: N900: TWL4030 Keypad Matrix definition Sebastian Reichel
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=20131027111715.GA2437@xo-6d-61-c0.localdomain \
--to=pavel@ucw.cz \
--cc=bcousson@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=sre@debian.org \
--cc=sre@ring0.de \
--cc=swarren@wwwdotorg.org \
--cc=tony@atomide.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox