Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1554031 > unrolled thread

gpio_key.c device tree question

Started bynoman pouigt <variksla@gmail.com>
First post2017-01-09 04:50 +0100
Last post2017-01-10 08:30 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  gpio_key.c device tree question noman pouigt <variksla@gmail.com> - 2017-01-09 04:50 +0100
    Re: gpio_key.c device tree question noman pouigt <variksla@gmail.com> - 2017-01-10 08:30 +0100

#1554031 — gpio_key.c device tree question

Fromnoman pouigt <variksla@gmail.com>
Date2017-01-09 04:50 +0100
Subjectgpio_key.c device tree question
Message-ID<sXz86-79a-7@gated-at.bofh.it>
Hello,

I am trying to see how to disable the sub device nodes in
gpio_keys device node.

I have this in my base dtsi file:

#include "vendor_file.dtsi"

        gpio_keys {
                compatible = "gpio-keys";
                input-name = "gpio-keys";
                pinctrl-names = "gpio_key_active","gpio_key_suspend";
                pinctrl-0 = <&key_active>;
                pinctrl-1 = <&key_suspend>;
                camera_snapshot {
                        label = "camera_snapshot";
                        //snip
                };
        };

I have this in vendor_file.dtsi:
       gpio_keys {
               source_key_1 {
                       label = "source_key_1";
                       //snip
               };
       };

In my current consolidated dtb file all nodes are getting
added i.e. camera_snapshot and source_key_1. How
can i remove camera_snapshot node from the
gpio_keys device node or disable it?


Thanks,

[toc] | [next] | [standalone]


#1555004

Fromnoman pouigt <variksla@gmail.com>
Date2017-01-10 08:30 +0100
Message-ID<sXZ2x-6QO-1@gated-at.bofh.it>
In reply to#1554031
On Sun, Jan 8, 2017 at 7:42 PM, noman pouigt <variksla@gmail.com> wrote:
> Hello,
>
> I am trying to see how to disable the sub device nodes in
> gpio_keys device node.
>
> I have this in my base dtsi file:
>
> #include "vendor_file.dtsi"
>
>         gpio_keys {
>                 compatible = "gpio-keys";
>                 input-name = "gpio-keys";
>                 pinctrl-names = "gpio_key_active","gpio_key_suspend";
>                 pinctrl-0 = <&key_active>;
>                 pinctrl-1 = <&key_suspend>;
>                 camera_snapshot {
>                         label = "camera_snapshot";
>                         //snip
>                 };
>         };
>
> I have this in vendor_file.dtsi:
>        gpio_keys {
>                source_key_1 {
>                        label = "source_key_1";
>                        //snip
>                };
>        };
>
> In my current consolidated dtb file all nodes are getting
> added i.e. camera_snapshot and source_key_1. How
> can i remove camera_snapshot node from the
> gpio_keys device node or disable it?

This issue is fixed with below commit:

commit 809d9516da73345cca587743b57e45e9095d851e
Author: Laxman Dewangan <ldewangan@nvidia.com>
Date:   Wed Jan 13 00:14:19 2016 -0800

    Input: gpio-keys - allow disabling individual buttons in DT

    Add support to disable buttons from DT via status property if given button
    is not supported on given platforms. This will help re-using existing dtsi
    files across multiple platforms.

    Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
>
> Thanks,

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web