linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>,
	Benoit Thebaudeau <benoit.thebaudeau@advansee.com>,
	David Hardeman <david@hardeman.nu>,
	Trilok Soni <tsoni@codeaurora.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Matus Ujhelyi <ujhelyi.m@gmail.com>,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v2] media: rc: gpio-ir-recv: add support for device tree parsing
Date: Fri, 8 Feb 2013 22:03:57 -0200	[thread overview]
Message-ID: <20130208220357.198c313c@redhat.com> (raw)
In-Reply-To: <1360355887-19973-1-git-send-email-sebastian.hesselbarth@gmail.com>

Em Fri,  8 Feb 2013 21:38:07 +0100
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> escreveu:

> This patch adds device tree parsing for gpio_ir_recv platform_data and
> the mandatory binding documentation. It basically follows what we already
> have for e.g. gpio_keys. All required device tree properties are OS
> independent but an optional property allow linux specific support for rc
> maps.
> 
> There was a similar patch sent by Matus Ujhelyi but that discussion
> died after the first reviews.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
> Changelog
> 
> v1->v2:
> - get rid of ptr returned by _get_devtree_pdata()
> - check for of_node instead for NULL pdata
> - remove unneccessary double check for gpios property
> - remove unneccessary #ifdef CONFIG_OF around match table
> 
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Rob Landley <rob@landley.net>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Cc: Benoit Thebaudeau <benoit.thebaudeau@advansee.com>
> Cc: David Hardeman <david@hardeman.nu>
> Cc: Trilok Soni <tsoni@codeaurora.org>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Matus Ujhelyi <ujhelyi.m@gmail.com>
> Cc: devicetree-discuss@lists.ozlabs.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-media@vger.kernel.org
> ---
>  .../devicetree/bindings/media/gpio-ir-receiver.txt |   16 ++++++
>  drivers/media/rc/gpio-ir-recv.c                    |   57 ++++++++++++++++++++
>  2 files changed, 73 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/gpio-ir-receiver.txt
> 
> diff --git a/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt b/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt
> new file mode 100644
> index 0000000..8589f30
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt
> @@ -0,0 +1,16 @@
> +Device-Tree bindings for GPIO IR receiver
> +
> +Required properties:
> +	- compatible = "gpio-ir-receiver";
> +	- gpios: OF device-tree gpio specification.
> +
> +Optional properties:
> +	- linux,rc-map-name: Linux specific remote control map name.
> +
> +Example node:
> +
> +	ir: ir-receiver {
> +		compatible = "gpio-ir-receiver";
> +		gpios = <&gpio0 19 1>;
> +		linux,rc-map-name = "rc-rc6-mce";

Please change this to:
		linux,rc-map-name = RC_MAP_RC6_MCE;

(as defined at include/media/rc-map.h).

The idea of having those strings defined at the same header file is to:

	- make sure that the same keyboard is spelled at the same way on
all places;

	- avoid people to duplicate IR keytables, using different names;

	- help userspace to get the right table. In the future, the
plan is to remove all keytables from kernelspace, keeping there just the
name of the keytable. The existing userspace code (ir-keytables, part
of v4l-utils) use the keytable name to dynamically load the right table
in runtime and to switch the IR core to only handle the protocol that
it is associated with the loaded keytable.

Regards,
Mauro

  parent reply	other threads:[~2013-02-09  0:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28 19:07 [PATCH] media: rc: gpio-ir-recv: add support for device tree parsing Sebastian Hesselbarth
2013-02-06  8:03 ` [PATCH RESEND] " Sebastian Hesselbarth
2013-02-06 13:48   ` Sylwester Nawrocki
2013-02-06 17:18     ` Sebastian Hesselbarth
2013-02-08 17:57       ` Mauro Carvalho Chehab
2013-02-08 18:12         ` Sebastian Hesselbarth
2013-02-08 19:06           ` Mauro Carvalho Chehab
2013-02-08 19:03       ` Sylwester Nawrocki
2013-02-08 20:38   ` [PATCH v2] " Sebastian Hesselbarth
2013-02-08 21:26     ` Sylwester Nawrocki
2013-02-08 21:36       ` Sebastian Hesselbarth
2013-02-08 21:52         ` Sylwester Nawrocki
2013-02-08 22:47     ` [PATCH v3] " Sebastian Hesselbarth
2013-02-09  0:03     ` Mauro Carvalho Chehab [this message]
2013-02-09  0:45       ` [PATCH v2] " Sebastian Hesselbarth
2013-02-09 13:41         ` Mauro Carvalho Chehab
2013-02-09 17:05         ` Sylwester Nawrocki

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=20130208220357.198c313c@redhat.com \
    --to=mchehab@redhat.com \
    --cc=benoit.thebaudeau@advansee.com \
    --cc=david@hardeman.nu \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tsoni@codeaurora.org \
    --cc=ujhelyi.m@gmail.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).