linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Vignesh R <vigneshr@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Tony Lindgren <tony@atomide.com>,
	Russell King <linux@armlinux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	John Stultz <john.stultz@linaro.org>,
	S Twiss <stwiss.opensource@diasemi.com>,
	Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>,
	Moritz Fischer <moritz.fischer@ettus.com>,
	Daniel Hung-yu Wu <hywu@google.com>,
	Grant Grundler <grundler@chromium.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] input: misc: Add generic input driver to read encoded GPIO lines
Date: Fri, 12 Aug 2016 13:59:47 -0500	[thread overview]
Message-ID: <20160812185947.GA14685@rob-hp-laptop> (raw)
In-Reply-To: <20160812045229.29241-2-vigneshr@ti.com>

On Fri, Aug 12, 2016 at 10:22:28AM +0530, Vignesh R wrote:
> Add a driver to read group of GPIO lines and provide its status as a
> numerical value as input event to the system. This will help in
> intefacing devices, that can be connected over GPIOs, that provide input
> to the system by driving GPIO lines connected to them like a rotary dial
> or a switch.
> 
> For example, a rotary switch can be connected to four GPIO lines. The
> status of the GPIO lines reflect the actual position of the rotary
> switch dial. For example, if dial points to 9, then the four GPIO lines
> connected to the switch will read HLLH(0b'1001 = 9). This value
> can be reported as an ABS_* event to the input subsystem.
> 
> Signed-off-by: Vignesh R <vigneshr@ti.com>
> ---
>  .../devicetree/bindings/input/gpio-decoder.txt     |  23 ++++
>  drivers/input/misc/Kconfig                         |  12 ++
>  drivers/input/misc/Makefile                        |   1 +
>  drivers/input/misc/gpio_decoder.c                  | 128 +++++++++++++++++++++
>  4 files changed, 164 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/gpio-decoder.txt
>  create mode 100644 drivers/input/misc/gpio_decoder.c
> 
> diff --git a/Documentation/devicetree/bindings/input/gpio-decoder.txt b/Documentation/devicetree/bindings/input/gpio-decoder.txt
> new file mode 100644
> index 000000000000..efd947f52cb3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/gpio-decoder.txt
> @@ -0,0 +1,23 @@
> +* GPIO Decoder DT bindings
> +
> +Required Properties:
> +- compatible: should be "gpio-decoder"
> +- gpios: a spec of gpios (atleast two) to be decoded to a number with
> +  first entry representing the MSB.
> +
> +Optional Properties:
> +- gpio-decoder,max-value: Maximum possible value that can be reported by

Just "decoder-max-value".

With that, the binding looks fine to me:

Acked-by: Rob Herring <robh@kernel.org>

  reply	other threads:[~2016-08-12 18:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12  4:52 [PATCH 0/2] AM335x-ICE: Add support for rotary switch Vignesh R
2016-08-12  4:52 ` [PATCH 1/2] input: misc: Add generic input driver to read encoded GPIO lines Vignesh R
2016-08-12 18:59   ` Rob Herring [this message]
2016-08-17  6:42     ` Vignesh R
2016-08-12  4:52 ` [PATCH 2/2] ARM: dts: am335x-icev2: Add nodes for gpio-decoder Vignesh R
2016-08-12 19:00   ` Rob Herring

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=20160812185947.GA14685@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=grundler@chromium.org \
    --cc=hywu@google.com \
    --cc=john.stultz@linaro.org \
    --cc=jorge.ramirez-ortiz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=moritz.fischer@ettus.com \
    --cc=stwiss.opensource@diasemi.com \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).